Live data from Hacker News

History and Effective Use of Vim

begriffs.com

101–110 of 226 posts

Re: History and Effective Use of Vim

#101
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…

You should take a look at language server clients for vim e.g. coc-nvim. I don't personally used one so I can't say what works or not.

[0] https://github.com/neoclide/coc.nvim

Re: History and Effective Use of Vim

#102

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'm the same way, and I hit the same spot with my desktop OS. I don't need any more individualization than I can put on a machine in 5-10 minutes.

The reason vi(m) is awesome is because it's everywhere and it's (pretty much) the same.

Re: History and Effective Use of Vim

#103
post #81

Earlier quoted context omitted.

I bind my CAPSLOCK to ECAPE that way instead of the escape key killing my hand my left pinky finger can just naturally get me out of insert mode by hitting CAPSLOCK.

Do yourself a favor and figure out how to bind caps lock to press for escape, hold for control. I use a programmable keyboard (web search for QMK if you're interested) but there are software options too. You'll never look back and you'll be baffled how you ever lived without it.

i have ctrl-shift-command-option+hjkl mapped to the arrow keys in any app.(works in tandem with the next config so it's just the press of the caps lock key)

caps+(any other key) mapped to ctrl-shift-command-option+that key(useful to bind to extra shortcuts in an app).

a single just caps lock press alone bound to escape.

and finally right shift + caps lock is bound to toggle caps lock on and off.

works pretty well for me for a long while now.

karabiner elements on macos lets you do all that with "complex modifications" though the config is a bit dumb to do manually as they expect you to download configs from the web.

Re: History and Effective Use of Vim

#104

Earlier quoted context omitted.

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…

Reading about that undo bug gave me a knot in my tummy. Damn.

Yup. I had the same issue with vscodevim which causes me to ditch vscode entirely.

Re: History and Effective Use of Vim

#105

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…

Yup. I've been using vi[m] on an almost daily basis since about 1989...wow, that's 30 years. In those decades, I have resisted putting anything in my .vi[m]rc except: set tabstop=4 set expandtab set shiftwidth=4 set shiftround That's it. And I agree with you, it's a very happy place for me.

swapping ; and : is a must for me at this stage from sheer muscle memory... trips me up every time i run into a new setup

so I've saved my .vimrc to a gist and I just curl it every time I remote into a new environment

https://gist.github.com/airstrike/e361d94dbe4bb90f4fe6ff4418...

Re: History and Effective Use of Vim

#106
post #9

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…

On a lot of machines, C-[ (control + left bracket) maps to escape. But some programs don't seem to acknowledge this? Like in firefox, doing that changes tabs, but in Emacs + evil mode it's how I "ESC."

There's an interesting reason for this related to the ASCII table and bit shifting, but I can't find a description of the exact mechanism for it. H and [ are in the same column as escape and delete respectively, and control shifts the bits in the character codes by some amount. Maybe someone smarter than me can elucidate.

Re: History and Effective Use of Vim

#107

Earlier quoted context omitted.

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…

You should take a look at language server clients for vim e.g. coc-nvim. I don't personally used one so I can't say what works or not. [0] https://github.com/neoclide/coc.nvim

I use coc-nvim and can attest that it is really good. I used to use YouCompleteMe, and while that plugin is really powerful it's also overly complicated and breaks a lot.

Re: History and Effective Use of Vim

#108
post #10

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…

Just a quick note, you can use Ctrl +[ rather than Escape. Saves your fingers from constantly having to reach for that corner.

That's what I do, and lately I've been recommending it more often to others when I hear them complain about the lack of a hardware Esc key on MacBook Pros.

Re: History and Effective Use of Vim

#109
post #10

Earlier quoted context omitted.

Just a quick note, you can use Ctrl +[ rather than Escape. Saves your fingers from constantly having to reach for that corner.

I bind my CAPSLOCK to ECAPE that way instead of the escape key killing my hand my left pinky finger can just naturally get me out of insert mode by hitting CAPSLOCK.

That's good for some people, but I have Caps Lock bound to Commmand/Ctrl. The above default key combo works well for me since that way only my right pinky leaves the home row.

Re: History and Effective Use of Vim

#110

> Some of the clones: > > nvi - 1980 for 4BSD > [ ... ] > elvis - 1990 for Minix and 386BSD This is incorrect; nvi is in fact a mid 1990's fork of Elvis, worked over for better POSIX compliance by Keith Bostic. > vim - 1991 for Amiga Though that was the first public release, Moolenaar had worked on it since 1988. It was based on Tim Thompson's Stevie, which had been released, in 1987 (noted in the table).

Thanks for the correction, can you give me a more precise date for nvi? I can update the article.

OK, I dug something up.

There is this page:

https://sites.google.com/a/bostic.com/keithbostic/vi/

Where if you download the Nvi archive, you get 1.79 from 1996.

In the tarball's docs/ directory, there is a changelog which goes back to 0.92 -> 0.93 (Mon Dec 20, 1993). 0.94 went to 1.00 on January 10, 1994.

Post reply on HN