Live data from Hacker News

A Good Vimrc

dougblack.io

11–20 of 178 posts

Re: A Good Vimrc

#11
Nice writing. One point/one question:

. section titles can be finished with {{{1 and then no closing brackets are necessary. It will just wrap to the next {{{1 occurence.

. regarding nvim: how can I find out what the defaults are there? Probably I have quite a lot of definitions which are no longer needed...

Re: A Good Vimrc

#12
Disabling the search highlight seems like a rather lowly use for leader+space. Great guide though, didn't know about quite a few options in here, wildmenu is great.

I switched to vim from subl about a month ago - it took a bit of getting used to but I'm loving it now. I still use subl for some multi cursor wizardry but that's less and less common now.

I found the disabling the arrow keys in normal mode was the point of no return!

Re: A Good Vimrc

#13
post #10

This is a very nice write up, but the tabs/spaces part of it makes no sense at all. "I like it, since it means my source code looks the same on every machine." That reason just makes no sense at all. There's only one reason for configuring tabs to be anything but tabs, and that's because someone else set the standard. So if you're editing python or bash, and you don't feel like being a rebel with a cause, you set exp…

There's also https://github.com/tpope/vim-sleuth, by Tim Pope.

Re: A Good Vimrc

#14
I don't use vim as my go to editor so I may be asking a silly question; does it just use idiotic defaults or something? I've only met a couple 'vim users' who could just hop onto someone else's vim setup and be productive, and I've never met a single vim user who could use someone else's setup without making comments about everything being different.

I guess the question is do people modify vim cause they can or cause they have to?

Re: A Good Vimrc

#15

I don't use vim as my go to editor so I may be asking a silly question; does it just use idiotic defaults or something? I've only met a couple 'vim users' who could just hop onto someone else's vim setup and be productive, and I've never met a single vim user who could use someone else's setup without making comments about everything being different. I guess the question is do people modify vim cause they can or caus…

For me, it's because I can. When I find a job I do often, I add it to the config, when I find a tool that makes a job easier I pick it up. Bare, freshly installed vim is quite useable, but is missing the affordances of my personally customized environment.

It's kind of like the difference between being able to cook and walking into a strange kitchen and immediately knowing where everything is. In my home I'm comfortable, I know that the vegetable peeler is in a different drawer than the steak knives. In a friend's home, I'm just going to have to ask where something is every few minutes if I want to get work done.

Re: A Good Vimrc

#17

I don't use vim as my go to editor so I may be asking a silly question; does it just use idiotic defaults or something? I've only met a couple 'vim users' who could just hop onto someone else's vim setup and be productive, and I've never met a single vim user who could use someone else's setup without making comments about everything being different. I guess the question is do people modify vim cause they can or caus…

Correct, the defaults are indeed idiotic, probably because they are from the last century. I even have a freaking plugin installed to properly close buffers (https://github.com/cespare/vim-sbd/).

It's indeed harder to use vim without my customizations. I guess it's more like a "build-your-own-editor from parts" kind of thing.

Re: A Good Vimrc

#19

I don't use vim as my go to editor so I may be asking a silly question; does it just use idiotic defaults or something? I've only met a couple 'vim users' who could just hop onto someone else's vim setup and be productive, and I've never met a single vim user who could use someone else's setup without making comments about everything being different. I guess the question is do people modify vim cause they can or caus…

On my home machine I have a vimrc of about 30 lines, but I could do without most of it, I could probably reduce it to about 5 lines if I had to. So whenever I use vim on a computer at university or on a new machine in the workplace, as long as it has syntax highlighting and auto indent on, which it usually does, that's fine for me.

Re: A Good Vimrc

#20

I don't use vim as my go to editor so I may be asking a silly question; does it just use idiotic defaults or something? I've only met a couple 'vim users' who could just hop onto someone else's vim setup and be productive, and I've never met a single vim user who could use someone else's setup without making comments about everything being different. I guess the question is do people modify vim cause they can or caus…

The default vim config is pretty barebones.

Actually, one of the main goals of Neovim[1] is to provide better defaults[2], such has syntax highlighting.

[1] https://neovim.io/

[2] https://github.com/neovim/neovim/issues/276

Post reply on HN