Live data from Hacker News

Vim: revisited

mislav.uniqpath.com

91–100 of 117 posts

Re: Vim: revisited

#91
post #4

Nicely done. A new or returning vimmer will profit from following his advice. His best recommendation is at the top: don't configure a lot of settings and plugins at first. Start with a minimal setup, and slowly work up from there when needed . In particular, don't copy someone's huge .vimrc. In fact, that's good advice for any tool or technology: start minimal, and only add what you need, when you know you need it.…

Out of curiosity, why would you suggest choosing from the default schemes? I picked my scheme from a downloaded bundle and then installed a plugin to make it work on a 256 colour terminal.

Because that minimizes futzing around. Certainly if the colorscheme makes a difference to you, and you can't find one that satisfies you in the defaults, then you should try to find a better one, but I think you should try the defaults first. Trying to use what's already there is in keeping with minimizing the urge to "install all the things!"

Re: Vim: revisited

#92

Earlier quoted context omitted.

One problem I had with Pathogen using git submodules (and presumably Vundle as well) was the inability to tweak my plugins. I wanted the ability to be able to modify several of the plugins I had installed and I couldn't figure out a nice way of doing this. In the end I opted for git subtrees but this also seems like an overcomplicated solution.

For tweaking plugins, you should use .vim/after/plugin/NAME.vim files. Otherwise, clone the repository, make your changes, and initiate a pull request.

The after/plugin thing is new to me, thanks.

Re: Vim: revisited

#93
post #91

Earlier quoted context omitted.

Out of curiosity, why would you suggest choosing from the default schemes? I picked my scheme from a downloaded bundle and then installed a plugin to make it work on a 256 colour terminal.

Because that minimizes futzing around. Certainly if the colorscheme makes a difference to you, and you can't find one that satisfies you in the defaults, then you should try to find a better one, but I think you should try the defaults first. Trying to use what's already there is in keeping with minimizing the urge to "install all the things!"

Fair enough. I'm currently using Freya since I have a love of low contrast dark schemes with muted colours.

http://www.vim.org/scripts/script.php?script_id=1651

Re: Vim: revisited

#94

Why people always emphasis h/j/k/l when we already have arrow keys? Do you really waste a lot of time moving your fingers between them? Also, arrow keys work in insert mode.

It's absolutely worth it. After many years, I don't even think about it any more. I just navigate using the home row. In fact, when I look at the keys, I can't tell you which ones go in which direction. I have to think about what my fingers do when I want to go in that direction. After time, it becomes sub-conscious, like playing a videogame.

Re: Vim: revisited

#95
I have exclusively used vim as my editor for about 8 years. I'm efficient with it, but there are still many fancy things I don't do. My rule of thumb is this: if I find myself performing a task over-and-over, and being bothered by it, chances are good there's a more efficient way to do it in vim. Then and only then will I look up the better way to do it. Because I'm solving a problem I frequently have, I will learn the new thing.

Re: Vim: revisited

#96
post #75

"vim has two main modes, normal mode ... and the insert mode" i stopped reading here because i knew what was coming next. the omen was fulfilled by the next line: "in insert mode, now you type text as your normally would. Pressing exits back to normal mode." its command mode vs insert mode. any vi user should know that.. it's the very first thing vi bludgeons you with.

:help command-mode goes to the same place as :help normal-mode. I'd rather call it normal mode, because that isn't easily confused with the command-line mode.

It also emphasizes that inserting text is rare. You will spend more time not inserting new text, but navigating the file.

Re: Vim: revisited

#97

Earlier quoted context omitted.

I'm much faster in vim since I gave up (for the most part) on hjkl (arrow keys are banned for obvious badness). / ? # * combined with f and t are so much faster. The only time I use j/k is 10j/10k for looking through files. Hence, your question is somewhat misguided ;)

And what country is your keyboard from? Unless you mean you specifically use search for every motion...?

I use colemak now, but this holds true in qwerty as well (most of the time). I don't use search for EVERYTHING, just most of the time it's faster.

Re: Vim: revisited

#98
post #81

Pro tip: after you paste code, it might not be indented correctly in the new context. You can select just pasted lines and autoindent them with V`]=. This should fix the indentation in most cases. A better alternative: issue the ":set paste" command just before pasting text. That way you keep the original indentation.

You can also use a "]" before the "p" (i.e., "]p") to make a new paste follow the existing indentation.

Re: Vim: revisited

#99
post #4

Nicely done. A new or returning vimmer will profit from following his advice. His best recommendation is at the top: don't configure a lot of settings and plugins at first. Start with a minimal setup, and slowly work up from there when needed . In particular, don't copy someone's huge .vimrc. In fact, that's good advice for any tool or technology: start minimal, and only add what you need, when you know you need it.…

And if you're not satisfied by any of existing Vim color schemes you can always convert bunch of Textmate ones here: http://ku1ik.com/2011/10/22/coloration-vim-256-colors.html

Re: Vim: revisited

#100
post #40

critical: Map Caps Lock to control and use control-[ instead of escape. It's very easy to do on most OS's today and not having to move your hand from the home row when you switch into command mode is as big as proper use of jump commands imo. I also agree to avoid all massive .vimrc files. If you don't understand it, don't use it. Simple.

I have had a lot of trouble remapping Caps Lock on Mac OS X. What's your method?
Post reply on HN