Live data from Hacker News

History and Effective Use of Vim

begriffs.com

61–70 of 226 posts

Re: History and Effective Use of Vim

#61

I started my programming career determined to be a vim guru and do all my programming with vim. This was misguided and after a year of wasted productivity and wasted time fiddling with plugs and dealing with broken stuff (surely by my own hand) I switched to a professional IDE and I rapidly became a much better developer. I use vim constantly now but in it's most plain vanilla form, for the purpose of editing files w…

To each their own! I'm a very effective python AND go programmer / sysadmin who uses vim for most all of my IDE stuff. I've also managed Linux professionally since 2005 and played with it since 1998 so it isn't for everyone.

My main vim plugins for this use case:

* go.vim * nerdtree * git-gutter * YouCompleteMe * syntastic + flake8 * black.vim # python equiv of gofmt

This is only for my workstations. I prefer vanilla configs for servers.

Re: History and Effective Use of Vim

#62
post #43

I rarely ever use actual vim, mostly when I'm in the terminal. But I have vim plugins for most IDEs I use (VS code, intellij, XCode). It makes editing so much faster. When I have to get by without it I feel as if someone put weights around my wrists. The reason I don't use Vim is because it's frankly not a smooth experience for most languages (unless you fiddle around a lot, and even then I found Ide+vim plug-in supe…

After a several month effort to learn vim bindings and use them full-time, I eventually ended up weaning myself back off because the plugins for the editors I actually use all seemed to come with considerable downsides.

vscode-vim caused odd performance issues, and I encountered significant bugs with the undo stack (namely hitting 'u' would sometimes take out the last 10-15 changes instead of just one). IDEAvim would randomly go completely unresponsive for me, sometimes requiring just re-opening the file and sometimes requiring a restart of the entire IDE. And last I checked the Xcode plugin requires re-signing the entire binary with a self-signed certificate because the new plugin system won't support modal editing.

I was quite happy with neovintageous in Sublime, as well as Sublime's excellent performance in general, but no matter how many plugins I installed it could never seem to come close to the smarts of the other tools I was using.

Ultimately I just arrived the the conclusion that I'm never going to be happy with any editor and decided to make the best of what I could with a consistent set of keybindings across the tools I use.

That said, every time I edit my hosts file or something on a remote server and reach for vim, I wonder if I made the wrong choice. I'm really hoping Language Server Protocol becomes the standard and we reach the point where it no longer matters what editor we use.

Re: History and Effective Use of Vim

#63
post #31

Earlier quoted context omitted.

Does that work in all shells?

https://en.wikipedia.org/wiki/Job_control_(Unix) I haven't used many esoteric environments, but wikipedia says it "exists in most modern Unix shells" and the timeline for first adding it was the late 70s early 80s.

Job control was first implemented in csh, another Bill Joy invention, although I believe that particular feature was added by someone else.

Re: History and Effective Use of Vim

#64

Been using vim since 1998 and rarely stray unless I'm typing notes for something unimportant and them I use Nano. Back in the day when I was a Unix admin, we often worked in full screen terminals and when editing a config file didn't like having to close the vim instance to go look at something, so learned about this little gem: :sh (go back to shell and do your thing and leave vim running) Ctrl-d to return to intact…

Or just CTRL+z and then 'fg' to go back.

This is exactly what I do all the time and works nicely.

Re: History and Effective Use of Vim

#65
post #25
post #16

Earlier quoted context omitted.

On my keyboard I need ALT GR for [. On a side note, I'm rather disappointed that the ESC key didn't get updated with modern keyboards. The keyboard vi was designed on had ESC where Capslock now resides.

I despise and hate with passion the Capslock key. On linux I always run setxkbmpap -option caps:escape. I wish the same could be done on Windows. I got used to it so much that I find myself from time to time writing catpital letters when I'm on Windows or foreign setup. My hate for the key came years before I thought about the possibility of remapping it. Similarly, I hate the F1, a key that when accidentally pressed…

> I wish the same could be done on Windows

You can:) https://vim.fandom.com/wiki/Map_caps_lock_to_escape_in_Windo...

Re: History and Effective Use of Vim

#66

After years of a love/hate relationship with Vim (I love what it does, but have configuring it), I had an epiphany: by sticking with the defaults, whether they are my preferred choices or not, I can instantly understand how to use Vim in any environment. Once you get used to biting the bullet and hitting escape instead of jj, or ctrl+c, it just works, everywhere. If you abandon the urge to pimp out your Vim with a bi…

I use a bunch of plugins and I've never had trouble remembering the defaults in the odd case I'm unable to use my own config.

I don't get why the top comment on all vim threads is always recommending using poor defaults your whole life so you can avoid learning to configure it or avoid a second of confusion when you're ssh'd somewhere.

Maybe everyone else besides me spends all their time ssh'd into random servers.

Re: History and Effective Use of Vim

#67
post #21

After years of a love/hate relationship with Vim (I love what it does, but have configuring it), I had an epiphany: by sticking with the defaults, whether they are my preferred choices or not, I can instantly understand how to use Vim in any environment. Once you get used to biting the bullet and hitting escape instead of jj, or ctrl+c, it just works, everywhere. If you abandon the urge to pimp out your Vim with a bi…

I've taken this approach halfway and only install plugins/config that I can easily do without. Things like git-gutter [0] and a line at the 80th column [1] are great, but I don't depend on them when I log into a remote machine. If I really want some features, I have them somewhat organized in my .vimrc [2]. It's a great compromise; I find that I haven't thought about major editor configuration in a couple of years. […

I would recommend ditching gitgutter for vim-signify: https://github.com/mhinz/vim-signify

It is less buggy and doesn't refresh until you save, which I find to be less distracting.

Re: History and Effective Use of Vim

#68
post #25

Earlier quoted context omitted.

I despise and hate with passion the Capslock key. On linux I always run setxkbmpap -option caps:escape. I wish the same could be done on Windows. I got used to it so much that I find myself from time to time writing catpital letters when I'm on Windows or foreign setup. My hate for the key came years before I thought about the possibility of remapping it. Similarly, I hate the F1, a key that when accidentally pressed…

> I wish the same could be done on Windows You can:) https://vim.fandom.com/wiki/Map_caps_lock_to_escape_in_Windo...

Yes, technically it's possible, but it is too complex and too permanent to run on every machine and server I log into. Perhaps I should set those registry keys on my own Windows VM though. Thanks for the reference.

Re: History and Effective Use of Vim

#69

I started my programming career determined to be a vim guru and do all my programming with vim. This was misguided and after a year of wasted productivity and wasted time fiddling with plugs and dealing with broken stuff (surely by my own hand) I switched to a professional IDE and I rapidly became a much better developer. I use vim constantly now but in it's most plain vanilla form, for the purpose of editing files w…

> I really wish however that every Linux system had a clone of the old DOS edit command which was beautifully simply and straightforward and met most needs highly intuitively.

The nano editor experience is pretty close to the old DOS edit feeling.

Re: History and Effective Use of Vim

#70

I realized why Vim has always felt a little off to me. The primary navigational commands are mostly on the right hand, which as a left handed person feels very weird to me. While Emacs commands favor neither hand (if anything they favor the left with C-f, C-b, C-a, C-e, C-x C-s, M-x, etc). Just a small observation.

You may enjoy a dvorak keyboard. Up and down (j and k) are the c and v keys. Left and right (h and l) are j and p.
Post reply on HN