News for hackers. Stuff that matters.
Re:Vim After 15 Years by statico on Wednesday October 26, 2022 @07:39PM (#33351105)
Author here. Many will be disappointed to know that I've been using VS Code almost exclusively since 2019 (with the Vim plugin of course).

I've been meaning to write a follow-up article, but unfortunately writing is low on the priority list. The main reason is that these days, when I _am_ coding, I mostly write TypeScript and React on my local machine (not much SSH these days), and VS Code Just Works™. I tried twice to get neovim and LSP stuff working but never could, and I can't justify spending time twiddling my editor these days. And as much as I love the terminal, using multiple font sizes lets me fit more information on the screen.

My dotfiles are always available: https://statico.link/dotfiles

(Also, I lost all the great comments on my blog somehow, so sorry to those who left them. I had Commento running for a while but it appears to be abandoned. Disqus has them but I refuse to use Disqus anymore because it's awful.)

Re:Vim After 15 Years by statico on Wednesday October 26, 2022 @07:47PM (#33351172)
Another thing: I think I use VS Code more because I spend much less time in the terminal than I did 5, 10, or 20 years ago. Everything happens in the browser now. I used to write lots of tools and services and commands for myself based in the terminal, but now web-based tools have replaced most of them.

Some notable examples of things I would have used the command line for a decade ago:

- Gmail for email (I'll switch to Fastmail someday)

- The eight billion other chat apps I use — I dropped IRC many years ago but used IRCCloud to ask NetHack questions recently

- CyberChef for exploring binary data

- Pixlr for image tweaking

- Google Sheets, Airtable, and Notion for notes & databases

- A password manager for passwords

- Pinboard for bookmarks

- NextDNS & PiHole for DNS settings

- Postico for Postgres (not web-based, but massively I'm tremendously more productive with it than with psql)

Re:Vim After 15 Years by statico on Wednesday October 26, 2022 @07:52PM (#33351221)
I do miss the terminal in a lot of ways. I feel a lot of nostalgia for the days when I got all my work done with just 2x2 terminals taking up the entire screen. (You could just fit them in with 1024x768 and the 8px high Tixus font.) But in 2022 it feels impossible to live entirely in a terminal unless you're in very specific areas of work.
Re:Vim After 15 Years by Beltalowda on Wednesday October 26, 2022 @10:03PM (#33352131)
I think very few people "live entirely in a terminal". I've never been all that big on IRC or mutt and the like, or "do X from the terminal!"-type programs, but a huge chunk of what I do is writing stuff (code, or just plain text), and Vim works pretty well for that. I also find it works very well for managing files and such; for example a few weeks ago I took over an old Go project, and I wanted to fix some of the "if foo == false" conditions to just "if !false", as well as reformat with the newest version of gofmt, so:

    for f in **/*.go~vendor/*; gofmt -w $f
    for f in **/*.go~vendor/*; gofmt -w -r 'a == false -> !a' $f
I guess maybe you have some buttons for that VSCode, but this sort of stuff is pretty fast to type out, and you have a lot of control like "exclude this directory" (like the vendor directory in the example). You can also do more advanced stuff; some time ago I wanted to see how much space my qemu images were using so I could use reasonable defaults for new versions:

    for f in *.qcow2; printf '%-30s %-15s %s\n' \
        $f \
        "$(qemu-img info $f | grep -o '^virtual size: [0-9.]* [KMG]iB' | sed 's/virtual //')" \
        "$(qemu-img info $f | grep -o '^disk size: [0-9.]* [KMG]iB' | sed 's/disk size/used/')"
Which is a bit hacky, but it's a one-time command and it prints a reasonable nice-ish table. This kind of stuff is much harder from a GUI.

It's really flexible and just as "simple" or simpler once you know all the tricks. Learning all the tricks of course takes a long time; say hello to my teenage years with no friends or girlfriend.

Anyway, aside from file management and Vim I do almost everything in the browser, and more or less always have, but for some things it's hard to beat a good shell.

Re:Vim After 15 Years by bachmeier on Wednesday October 26, 2022 @10:41PM (#33352416)
> But in 2022 it feels impossible to live entirely in a terminal unless you're in very specific areas of work.

To be honest, that was true 25 years ago for most of us. Some programmers could have perhaps gotten away with only the terminal, but most people using computers in their work have long had to use word processors, spreadsheets, and other critical GUI software if we wanted to keep our jobs.

Re:Vim After 15 Years by statico on Wednesday October 26, 2022 @10:49PM (#33352468)
Admittedly I was a student at the time, so I had a lot of time to explore and make things work.

I used mutt for email, irssi and the bitlbee proxy for chat, wrote styled docs with LaTeX, etc. When I interned at IBM in 2005 I was even able to get Lotus123 or whatever horrible email thing they used to work with mutt, and my supervisor even encouraged me because he wanted to use it, too.

Re:Vim After 15 Years by alwillis on Wednesday October 26, 2022 @10:49PM (#33352470)
Nobody lives entirely in terminal these days; but terminals have gotten much nicer.

Running Neovim in something like WezTerm, Kitty or Alacrity is closer to what it was like to use a GUI version of Vim (like MacVim) not too long ago.

Full-color support, full OpenType support (like ligatures), built-in multiplexing at least in WezTerm, in a fast, GPU-accelerated UI.

Neovim's support for the same LSPs as VS Code + support for Treesitter.

+1 for LSP-Zero, which makes configuring LSPs and linters trivially easy for Neovim.

I'm not suggesting that you or anyone else should use Neovim instead of VS Code, but I've certainly read enough blog posts about TypeScript and Rust developers moving from VS Code or IntelliJ to Neovimn for a variety of reasons. I've seen Neovim core developers coding on YouTube and Twitch and they look pretty productive to me.

I've attempted to use VS Code; it usually starts okay but doesn't end well and I go back to Neovim.

Neovim hasn't made it to version 1.0 but so far, it's on the right track and I love the vibe of the Neovim community.

Re:Vim After 15 Years by agumonkey on Thursday October 27, 2022 @03:37AM (#33354420)
never tried self-hosted cryptpad for collaborative docs (not as featured as gdocs or ms office but still) ?
Re:Vim After 15 Years by myuzio on Friday October 28, 2022 @02:05AM (#33368186)
Same thing happened to me since 2021, weirdly enough my VIM setup was quite close to yours. Nowadays, I'm using VSCode + vim plugin, which is kind of the best of the two worlds.

What I miss however from the good-old development in Terminal days:

1. How distraction-free terminal is by default without all the popups and extra things on the screen

2. How I could do anything in my development environment without having a mouse

Therefore naturally I checked your dotfiles and I think I will try to adopt your keybindings. Thanks for sharing.

Re:Vim After 15 Years by aidos on Wednesday October 26, 2022 @08:08PM (#33351352)
Neovim has improved a lot in the last couple of years. When I initially switched to native lsp it was a giant confusing mess. There was a lot of wading through GitHub issues trying to pull enough info together. Eventually my understanding of all of the underlying machinery got to a reasonable place (and as a result I have much better control over how I set everything up), but it was a battle. Things are slicker now though.
Re:Vim After 15 Years by lordgroff on Wednesday October 26, 2022 @08:39PM (#33351538)
Interesting, I just switched from vs code BACK to (neo)vim. For me the killer feature of vscode was remote, but imagine my surprise to see that was one of many proprietary things in the platform. And then I discovered mutagen, and that opened up my avenue for thinking about neovim again.

The neovim lsp story with lspzero is as pain free as I can imagine things to be, so that also helps. In this day and age for the languages I use, neovim is a lovely and blazing fast IDE.

Finally, for the way I like to work, the terminal is often the IDE. One thing I couldn't ever get used to was terminal inside the editor rather terminal being the primary thing. It's why my many attempts at Emacs failed too.

Re:Vim After 15 Years by statico on Wednesday October 26, 2022 @08:44PM (#33351577)
I get that. I used to get pretty far with tmux and using Vim to send commands to other tmux panes. But now with web-based tools, live reloading, and utils that watch the filesystem to re-run things, the terminal-inside-an-IDE approach seems fine because I don't need to switch to it as often.
Re:Vim After 15 Years by pama on Wednesday October 26, 2022 @09:32PM (#33351906)
So Emacs is going to be your next move? /s
Re:Vim After 15 Years by statico on Wednesday October 26, 2022 @09:44PM (#33351992)
I used Emacs from 2010-2012 just to know what I was missing. I liked using it and tinkering with it, but when it came to being productive, all of the tooling felt out of date and hard to use in comparison to Vim.

I said then that if someone would make a text editor and IDE that used JavaScript from the ground up instead of elisp, that it would dominate, and that's what seems to have happened with VS Code.

Re:Vim After 15 Years by seanw444 on Thursday October 27, 2022 @12:27PM (#33360018)
I respect your settlement on VS Code. What works, works. But 2010-2012 was seemingly ages ago compared to how well the Emacs ecosystem has modernized in such a short, recent timespan. You may find it appealing again, if you're ever interested. With the work done on speeding it up via native compilation, I don't think I'll ever find a better editor for myself, personally.
Re:Vim After 15 Years by Scarbutt on Thursday October 27, 2022 @12:35AM (#33353160)
Finally, for the way I like to work, the terminal is often the IDE. One thing I couldn't ever get used to was terminal inside the editor rather terminal being the primary thing. It's why my many attempts at Emacs failed too.

Emacs can run the in a terminal too, that's how I have been using it forever inside tmux.

Re:Vim After 15 Years by mthwsjc_ on Thursday October 27, 2022 @05:14AM (#33355113)
oh wow, lspzero. I didnt know about this before. I love neovim, but I dont like spending time trying to make LSP features work.
Re:Vim After 15 Years by winrid on Wednesday October 26, 2022 @09:27PM (#33351871)
I run a service - fastcomments.com - that you could migrate to. You can self-service import your disqus, or commento data if it's more up to date. The flex tier starts at $0.99/mo and is sufficient for small sites.

amazing what you can accomplish with a nice IDE :)

Re:Vim After 15 Years by nerdyadventurer on Wednesday October 26, 2022 @10:55PM (#33352519)
Is not VS code slow, code change and eslint errors showing up take couple of seconds, so I was thinking about trying NeoVim for the first time.
Re:Vim After 15 Years by mollerhoj on Thursday October 27, 2022 @01:55AM (#33353685)
I recently setup neovim with lsp, fzf and like 10 plugins in pure lua. I was surprised that it took me just a few hours. I've spent too much time fighting viml in the past and it kept me from looking at the config for like 3 years. But holy f, things have gotten soo much better. Lua for vim is.. actually good. Like I grok the apis.

I know what its like to be burnt but messing with config, but man I cannot recommend kitty + neovim highly enough. It's absolutely AMAZING.

Re:Vim After 15 Years by radiKal07 on Thursday October 27, 2022 @02:05AM (#33353750)
I also use kitty + neovim. I highly agree.
Re:Vim After 15 Years by checkyoursudo on Thursday October 27, 2022 @02:54AM (#33354124)
I've been a heavy vim user for I don't even know how long. What does neovim get me over vim? Looking at the charter page on the website, the only thing that really stands out to me is Lua.

"Deliver a first-class Lua/LuaJIT scripting alternative to Vimscript." The rest seem fine but not really a reason to switch, and I don't know Lua so I'm not sure that's a reason either.

Is this the main reason? Are there other good reasons?

Re:Vim After 15 Years by pmoriarty on Thursday October 27, 2022 @03:17AM (#33354274)
You could script plain old vim in Lua long before NeoVim existed.
Re:Vim After 15 Years by radiKal07 on Thursday October 27, 2022 @08:11AM (#33356358)
Lua is the only difference but it makes all the difference. From my understanding, Lua is nicer than Vimscript, this means more people will create more interesting and better Lua plugins, that can only be used in neovim. LuaJIT is also fast.
Re:Vim After 15 Years by Izkata on Thursday October 27, 2022 @11:37AM (#33359214)
vim does support python plugins, not just vimscript...
Re:Vim After 15 Years by lemper on Thursday October 27, 2022 @02:40AM (#33354014)
no, i am not disappointed at all. if anything, i sympathise with you. the older i get, the less i care about the nitty gritty detail of how should i set my editor up. i just want to install editor which detects (and installs the ide-like tooling support) the programming i use, churn some shitty code away, and be done with it. nowadays, like you, i just use vscode and vsvim. most of the time, it works and that is what matters.
Re:Vim After 15 Years by agumonkey on Thursday October 27, 2022 @03:36AM (#33354416)
what's your vscode setup ? people at work use it in an ad-hoc fashion and it's surprisingly messy (tabs disappearing, git interface confused), we're also looking for partial reformat and on save fixes (whitespace and such)

in any case, thanks for your comment

Re:Vim After 15 Years by yodsanklai on Thursday October 27, 2022 @08:24AM (#33356487)
> I've been using VS Code almost exclusively since 2019 (with the Vim plugin of course).

I think it's more reasonable to use VSCode rather than trying to turn Vim into a monster it wasn't supposed to be. I see Vim a simple modal editor, which can be integrated in other tools such as IDEs.

Re:Vim After 15 Years by jpcrs on Friday October 28, 2022 @09:41AM (#33371271)
I also recently migrated from nvim to VSCode (First with vim plugin, now with vscode-neovim plugin).

Maybe I'm in the wrong side, but I always tried to replicate the IDE experience on nvim, and it was a frustrating experience because there was also something else missing, at the end I had to manage 30+ Plugins that could break at any time.

Even though the vim experience inside VSCode is far from perfect (really lacking when we compare with IdeaVim for example), it's a breath of fresh air being able to manage my plugins/lsp/etc with a single click.

The only thing that I miss daily is something like Telescope/fzf. VSCode fuzzy search works fine for file names inside the open project, but searching for file content/other projects/previous open files is really bad.

Recently tried to develop something similar on vscode just for fun (Even I don't use it tho, just accepted the limitation): https://github.com/jpcrs/Binocular