Hacker News new | past | comments | ask | show | jobs | submit login

"This is especially important if you have to edit a file on a remote server"

This may have been true a decade ago, but editors like Visual studio code now have remote editing abilities over SSH.

I regularly have 50+ files open at a time for editing/compiling and I've never found editors like VI very helpful.

If I need to make a quick edit to a config file, it does the job.




Now imagine that SSH going from a Citrix windows desktop running on a Windows 10 VM on your linux laptop. Every key press reacts in around a second. Welcome to banking "security"!

Now let's say I want to `d5}`, to delete the next 5 paraghraph. In vi(m) I can do this by telling it "hey vim, delete those 5 damn paragraph!"

In fancy VScode I have to say more like... "Hey editor, wait a sec, I'm moving my cursor over there and select a couple lines which happens to be 5 paragrahs, OOOPS, I went a bit too far, now let's go back. YES, now delete them!".

Other examples:

- "increment this number by 5" - "delete this html tag recursively" - "indent the next 20 lines" - "remove all the arguments from this function call" - etc.

Vim has a language, _that_ is the powerful part.

To be fair, thankfully VSCode (and any of the other fancy IDEs) have basic vim-functionality providing plugins.


> Now imagine that SSH going from a Citrix windows desktop running on a Windows 10 VM on your linux laptop. Every key press reacts in around a second. Welcome to banking "security"!

Oh god are you one of my colleagues?


So if you have an incredibly shitty setup, and have no idea how vscode works, then it might be worth it. Got it.


I have a quite good setup, in general.

Unfortunately this is some external requirement I cannot do anything about. Also, as opposed to many people, I actually got to work and know both the IDE-world (including VScode), and the vim world. I have a base for comparison.

Hopefully you "got that" too.


There are also times when the available bandwidth is limited, so just having to use fewer keystrokes to edit a file speeds up the process. I was able to connect to remote linux servers over dial-up and edit files on those servers with vim without issue. Editing and saving over ssh was more of a hassle since it took longer to save the file (and I save pretty often).


vscode remote will actually perform better than vim over laggy ssh because the UI portion is completely local.


So it is with vim.

Anyway, unfortunately given setup won't even be viable with anything running "local", since in the mentioned citrix environment we cannot install anything, so no vscode, no local vim, no nothing...


Something that I always find lacking in these discussions is that the VIM evangelists never mention the way that I use vim: strictly as a keyboard-only editor plugin.

I tried using vim-only setups but there's so much configuring and weird things. Nothing to me has worked as great as my current VSCode + Vim plugin setup. It's the best of both worlds, as I get the quite frankly absurd speed improvements of VIM while also the great user-friendliness and ease of VScode


VSCode is great and has a lot of advantages. I still use vim in a terminal because of tmux. Unfortunately that means I have to give up some of vscode's advantages.


I'd love to hear more about this. What VS Code plugin are you using to accomplish edits over SSH? I checked out Remote Development, but it is actively unable to function with the open-source version of VSCode:

https://github.com/VSCodium/vscodium/issues/240#issuecomment...


> This may have been true a decade ago, but editors like Visual studio code now have remote editing abilities over SSH.

VS Code and vi have different use cases. Contrary to what you said, most people are not going to open VS Code to make a quick edit to a config file. If that works for you, fine, but the overhead of starting electron is significant.


You are right that it is not as necessary as before but there are still plenty of times where vi was still the faster option. Since Vi is so lightweight, opening large files remotely might be useful vs vscode remote ssh.

But yea vscode remote is really good.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: