Live data from Hacker News

Vim – Minimal Setup Explained

guckes.net

71–80 of 114 posts

Re: Vim – Minimal Setup Explained

#71

Earlier quoted context omitted.

I use `jk` or `jj` instead of esc. Its so much easier imap jj

I tried this, but it (understandably) caused a delay whenever I typed j alone in insert mode

It only matters if you are tying "jj". If you are typing "just", it's just as fast and the "delay" is just visual.

Re: Vim – Minimal Setup Explained

#72

Many decades ago, you had to resort to abbreviations so that you could use memory in the most efficient way possible. Computer hardware at that time was more expensive than labor. People having to adapt to how computers worked was the doctrine at that time. But in 2022, this is no longer true. Even the most limited platform you can think of can comfortably run vim. A $5 Raspberry Pi Zero is overkill for vim. And now,…

Why did you write "2022" instead of "two thousand twenty two", and "$5" instead of "five dollars"?

Re: Vim – Minimal Setup Explained

#73

Earlier quoted context omitted.

I use `jk` or `jj` instead of esc. Its so much easier imap jj

I tried this, but it (understandably) caused a delay whenever I typed j alone in insert mode

You can map both jk and kj to Esc, which will allow you to press both of them simultaneously. Then you can set your timeout quite low when in insert mode.

Re: Vim – Minimal Setup Explained

#74
post #2

While the information in there is good, a bunch of the settings are now redundant¹. The ones that jumped out to me were esckeys, ruler and showcmd. Not that I'm saying you can't — or shouldn't — re-set options, just that the linked documentation is a little dated. FWIW, I personally re-set a couple of default options mostly so that I have a point of reference for how an option works when I'm digging about in my confi…

defaults.vim was and still is an abject idea that we sadly can't get rid off, now that it has been there for a few years. The least desirable property of defaults.vim is also present in sensible or in system-wide vimrcs written by package maintainers: you get a black box where things are added/changed/removed without your knowledge or consent. "Your" so-called minimal setup is going to evolve over time, but not accor…

Same here. Vim's new "default" to tie middle-click paste to vim's buffer rather than the X selection drives me up the wall, every time. It's not just that I have multiple machines to administer, it's that there's multiple users (roles) to configure separate things. And for every user my default workflow is now broken.

I've given up on vim. I'm now teaching myself Emacs on my own machine, and replace vim with neovim everywhere I can.

Re: Vim – Minimal Setup Explained

#75
post #2

While the information in there is good, a bunch of the settings are now redundant¹. The ones that jumped out to me were esckeys, ruler and showcmd. Not that I'm saying you can't — or shouldn't — re-set options, just that the linked documentation is a little dated. FWIW, I personally re-set a couple of default options mostly so that I have a point of reference for how an option works when I'm digging about in my confi…

defaults.vim was and still is an abject idea that we sadly can't get rid off, now that it has been there for a few years. The least desirable property of defaults.vim is also present in sensible or in system-wide vimrcs written by package maintainers: you get a black box where things are added/changed/removed without your knowledge or consent. "Your" so-called minimal setup is going to evolve over time, but not accor…

I took a second to see who the "we" is in your last sentence. The site vimways.org is unusable because its certificate has expired.

Also, amen. Having used vi since before vim, I actually have a few settings to restore vi features and quirks that I like ( cpoptions+=vxZ!$- ).

Re: Vim – Minimal Setup Explained

#77

The only thing I've really struggled with when trying to get into using vim full-time is navigating my project. In VSCode I basically hit CTRL+SHIT+F -> "portion_of_a_function_name_or_something" constantly. I abuse the heck out of global search. Is there a way of navigating your project in vim that's similar/easier? How do vim people quickly navigate their code without going "what was the name of that file with that…

Vim has the concept of and (you can :h these for more info), which are basically the things that vim will jump across when you press 'w' or 'W'. You can combine this with grep and the location list to find symbol usage across multiple files. nnoremap g :grep You can then use :cnext and :cprev (or focusing the window and selecting an entry) to navigate between them. As others have stated, you can also use ctags (plugi…

Worth noting that :grep can be configued to use ag, rg, ack or git grep which can add some modern conviences like respecting prohect specific ignore lists and there are plugins that build more on top for each specific tool.

Re: Vim – Minimal Setup Explained

#78
post #76

I prefer VsCode these days - but every now and then a Vim macro is needed - the rare case where multiple cursors won't cut - I just C-p Open in Vim [1]... for fun and saving a few minutes (not always) [1] https://marketplace.visualstudio.com/items?itemName=jonsmith...

Doesn't the VSCode vim plugin support Vim macros as well?
Post reply on HN