Live data from Hacker News

History and Effective Use of Vim

begriffs.com

11–20 of 226 posts

Re: History and Effective Use of Vim

#11

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.

Re: History and Effective Use of Vim

#12

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.

What made you pick those 4 if I may ask?

Re: History and Effective Use of Vim

#13
post #5

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…

this + nvi had more direct lineage to true vi, Keith Bostic was in the Bill Joy headspace, but it kind-of got stuck. Vim diverged in ways which used to annoy me but I've come to accept. I won't mention "the other editor family" here but it is interesting to see the things in that one, which I miss in this one (for me at least) which are principally the ability to cut-paste regions, and a set of things which became sc…

Maybe this is betraying my ignorance of emacs, but Ctrl-V?

Re: History and Effective Use of Vim

#15

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.

most of those, plus

set hlsearch

Re: History and Effective Use of Vim

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

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.

Re: History and Effective Use of Vim

#17
post #7

To anyone who hasn't tried it - http://www.vimgolf.com/ is probably the quickest and most fun way to take your skills to the next level.

I recommend the book "Practical Vim" too: https://pragprog.com/book/dnvim2/practical-vim-second-editio...

I remember learning a fair amount from it when I read it a few years ago (and should probably read through it again at some point).

Re: History and Effective Use of Vim

#18
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 and running vim instance.

As an aside, if you decide to use nano to edit config files, make sure you use nano -w (no wrap), otherwise you may find yourself with a non-bootable OS instance.

Re: History and Effective Use of Vim

#19

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.

Re: History and Effective Use of Vim

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

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