Live data from Hacker News

Vim – Minimal Setup Explained

guckes.net

101–110 of 114 posts

Re: Vim – Minimal Setup Explained

#101

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…

‘:!ctags -R’ and ‘:ta function’ (or ‘^]’ for the identifier under the cursor). Works well enough for me, even in Real Vi (TM).

Re: Vim – Minimal Setup Explained

#102
post #63

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,…

Quite apart from the fact that many (most?) vim short forms have long form equivalents, and vim has autocomplete - this argument feels misguided to me, mostly because I don't see why it would be limited to just vim. It seems natural, if you hold such a position, to also advocate abandoning CLIs like `ls`, `cd`, `jq`, `aws`, et al? - and I would despise having to put up with stuff like: $ change-directory foo/bar $ am…

Yes, but they all have shorthand aliases.

When writing a script or documenting you use the long form, when using a shell you use short form.

Re: Vim – Minimal Setup Explained

#103

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…

I use neovim now and have switched my search over to using Telescope.nvim which is a fuzzy search basically. It lets you do pretty much what you say allowing me to type -f and partially type things to remember where I am with a preview pane. Seems moderately fast most of the time for the monolith I work on.

The only catch with this is that it's neo vim only. It works incredibly well and can fuzzy find lots of things not just files.

Re: Vim – Minimal Setup Explained

#104

Question for Vim users: how do you get used to hitting Esc very often? I know some switch Cap with Esc but still clunky.

I type using my old Sun keyboard still. The escape key is where the tilde key is on normal US PC keyboards. So the pinky stretch is quite easy.

(Also the control key is where the caps lock is. Also another fine position.) :)

Re: Vim – Minimal Setup Explained

#106
post #60

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 supports ctags[0] lookup out of the box which fits your need somewhat. I tend to use FZF[1] which has functions for leveraging ripgrep and silver surfer for searches. It can also use find. FZF also has dialogues for paring down results in real time (i.e., as you type) There are also plugins that are much more nuanced and more involved for searching symbols and providing autocomplete. Duoplete, vimcomplete, youcom…

Yup. FZF is where it's at. :Files to jump to a file, :Rg to search around for some content.

I also keep vinegar around for when I want to poke around at the contents of a directory.

Re: Vim – Minimal Setup Explained

#107
post #90
post #79

Found the post pretentious

Did you not like the style, or the content? Do you have a better alternative to suggest?

I found it pretentious on first read. The first feature: `nocmp` is not explained well enough and is vague. What is buffer in `hidden`? Not beginner friendly. As a neovim user, I haven't had the need to all these settings.

Re: Vim – Minimal Setup Explained

#108

Earlier quoted context omitted.

Please, no. Someone else's vimrc is the last thing newcomers need.

I sort of agree. When I was first getting into Vim, reading a couple of well documented vimrcs really helped me out.

I also agree in theory, but Ben McCormick's ~/.vimrc is tiny and is easy to understand for newbies, so I'm OK with it.

But yes, adopting the rule that you should never put anything in your ~/.vimrc that you don't understand from building it up over time and usage is a good one.

Re: Vim – Minimal Setup Explained

#109
post #63

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,…

Quite apart from the fact that many (most?) vim short forms have long form equivalents, and vim has autocomplete - this argument feels misguided to me, mostly because I don't see why it would be limited to just vim. It seems natural, if you hold such a position, to also advocate abandoning CLIs like `ls`, `cd`, `jq`, `aws`, et al? - and I would despise having to put up with stuff like: $ change-directory foo/bar $ am…

Welcome to the cargo cult hell that descriptively named all the things.

Re: Vim – Minimal Setup Explained

#110

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,…

Autocomplete doesn't cut it. You end up hitting "tab" more times than it takes to just type out a two or three character command.
Post reply on HN