Live data from Hacker News

Vim After 15 Years (2017)

blog.langworth.com

61–70 of 116 posts

Re: Vim After 15 Years (2017)

#61
post #38
post #34

Earlier quoted context omitted.

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…

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.

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 (2017)

#62

Earlier quoted context omitted.

I feel pretty much the opposite. IDE's seem incredibly limiting and feature-poor compared to editors like vim and emacs, which can do just about anything. Regarding your specific examples, both vim and emacs have file histories and if your files are under version control it's easy to get diffs. Searches are super powerful in both vim and emacs, and it's easy to search across multiple files as well using various scrip…

Can vim and/or emacs do refactoring? That is a feature that I use daily and couldn’t live without

Of course, both coc and lsp are your friends there. Want to change variable or function of class name or whatever? No problem. Take this piece of code and wrap it into a function, and where it once stood just place the function call? No problem. Etc.

Re: Vim After 15 Years (2017)

#63
I would still love to learn vim if only for the nerd credentials. However I cannot imagine how I would reproduce the workflow to even come close to approaching my current productivity level with VS Code.

I'd love to sit down with a vim expert for a day and see how much of my workflow I could replicate.

Re: Vim After 15 Years (2017)

#64

Another Vim tip: use sessions. vim -S will recover a session file. I set up these items in my .vimrc to make sessions a little easier to work with: The + key (which has a useless default role of moving to the next line) is mapped to save the current session: :nmap + :wa exe "mksession! " . v:this_session Then, a :S command for creating a new session, e.g. :S foo. :command -nargs=1 S exec "mksession! " . expand('$top/…

https://github.com/xolox/vim-session

I actually have in normal mode ,ss for save session and ,so for opening them. Central location of session dirs and that's it. Save session saves everything from files open, positions, tabs, you name it.

Re: Vim After 15 Years (2017)

#65
post #17
post #16

Earlier quoted context omitted.

This is something I've been thinking about a lot recently, especially since listening to John Carmack interview ( https://www.youtube.com/watch?v=I845O57ZSy4 ) and him saying that almost nobody uses IDEs at Meta. I think it is totally possible to be (even very) productive in VIM. I do think, though, that a person who is productive in VIM would be more productive if he used a proper IDE. This is my experience after I…

> that a person who is productive in VIM would be more productive if he used a proper IDE. What features does a "proper IDE" offer that, at least Neovim, does not or cannot provide?

Complex IDEs offer a promise (backed by $$$).

Class hierarchy visualization, database schema mappings, the latest & greatest in NLP & code completion via plugins. That "just works."

Ultimately, a sufficient amount of configuration adds all those things to Vim/Emacs. Ditto VS Code on a smaller scale.

The issue is how much time.

I use all the obscure features of IDEs. Navigate to next issue, bookmarks, you name it, I've got it, for large codes.

Implementing... all... of the features Intellij/Rider provides out of the box for JVM/React stack in Vim is... an undertaking.

Don't get me wrong. I love SpaceVim, and if I worked in a domain like firmware, I'd be far more comfortable with it.

Maintaining a Vim config that's integrates every tool I need for JVM and React (and machine learning, and all the other domains) is impossible.

Re: Vim After 15 Years (2017)

#66
Sadly, the Vim/Emacs configuration burden is growing every year.

IDE developers just keep inventing new tools. GitHub Copilot is the latest, who knows what's next?

Especially for Rust, JVM & Java. Rust without a IDE warnings is... extremely difficult. Unless you're extremely practiced with it.

As time goes on, feature parity with fully featured IDEs like Jetbrains is steadily becoming harder.

I'd readily consider a "nvim distribution" via Patreon at this point.

Configuring Vim to catch-up with Intellij is becoming a part time job.

Re: Vim After 15 Years (2017)

#67
post #38
post #34

Earlier quoted context omitted.

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…

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.

> 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 (2017)

#68
post #38

Earlier quoted context omitted.

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.

> 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.

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 (2017)

#69
post #38
post #34

Earlier quoted context omitted.

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…

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.

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 (2017)

#70
post #29

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…

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.
Post reply on HN