Live data from Hacker News

Vim: revisited

mislav.uniqpath.com

101–110 of 117 posts

Re: Vim: revisited

#101

Good advice, although I personally disagree with him on the Janus front. Janus is what got me to switch full time to Vim a few months ago, after having used Vim off and on for over a decade, mainly on the command line or for edits that were to difficult or repetitive to get done in more "friendly" editors/IDEs like TextMate and Visual Studio. Janus provided just enough familiarity and convenience to make a full-time…

Agreed he seems to just dismiss Janus randomly, instead prefering to tell people to what...assemble the plugins by hand and just copy his vimrc config? not ideal.

Re: Vim: revisited

#102

Earlier quoted context omitted.

I use VIM and sometimes use the arrow keys. These come in really handy when you have a lot of small edits to make that can't be readily automated (not really that frequent). However the huge shift in mentality has to go from the idea that you are working with a "text editor" (which VIM and EMACS are not IMHO) and a text processor which I would argue these are. When you start thinking about processing rather than edit…

I don't see any problem with using the arrow keys. As someone said, when programming typing isn't my bottleneck, thinking is. Full touch-typing speed is a must for court clerks -- not for programmers, and also not even for writers.

I didn't see the problem with arrow keys either. They really do break flow though. I only recently discovered how much better the home key navigation is over arrow keys. Every time you move you hands away from the home row you incur a small mental task of making sure that you move your hand over there and that the hand is correctly positioned. It sounds trivial but it really adds up to one less thing to think about.

Couple this with inoremap jj and it eliminates the majority of large movements away from the home row.

Say you are in the middle of a word that you want to change compare: Arrow key right until at end of word, i, backspace until at start of word, type new word, Esc three excursions from home row.

Ciw, type new word, jj. No excursions from home row and less of a mental load.

Re: Vim: revisited

#103

Not really sure why the hate for nerdtree. "Don’t use the NERD tree plugin. It is clumsy, will hurt your workflow with split windows, and it’s not particulary pretty either. You never needed a file browser pane in the first place." "It is clumsy" We're talking about VIM, with dozens of keystrokes to invoke everything but emacs already. The whole thing is a bit clumsy! I use it every day and have for a decade but it's…

I work exclusively in split windows, vertical and horizontal both, and I don't work without NERD Tree anymore.

    nnoremap n :NERDTreeToggle
I suggest remapping NERDTree's help function from ? to H so it doesn't interfere with search-up.

Re: Vim: revisited

#104

I'm puzzled by why syntastic was so counterproductive for him. It's helped me more times than it's hurt. Does he have autowrite on? Some additional tips: * As your # of plugins grow it helps to isolate plugin-specific config to separate files. Example: https://github.com/cldwalker/vimfiles/tree/master/after/plug... . * If you want to stop seeing vim as a series of unforeseen tricks, take the time to learn the 300-400…

300-400 keybindings? Even the flashcard utility only has ~250 in total.

Do you mean 30-40?

Re: Vim: revisited

#105
post #89

Not really sure why the hate for nerdtree. "Don’t use the NERD tree plugin. It is clumsy, will hurt your workflow with split windows, and it’s not particulary pretty either. You never needed a file browser pane in the first place." "It is clumsy" We're talking about VIM, with dozens of keystrokes to invoke everything but emacs already. The whole thing is a bit clumsy! I use it every day and have for a decade but it's…

You've misinterpreted the "hurt your workflow with split windows" bit. You understood it as if NERD Tree's split window is what hurts your workflow. I was saying that my existing split window workflow was hurt by presence of the NERD Tree.

AHHHH - that makes more sense.

I toggle nerdtree on and off often, so it's there when I need it, and gone when I don't, so I don't notice it getting in the way of my split windows all that much.

Re: Vim: revisited

#106
post #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?

It's in the keyboard preference pane under "modifier keys".

Re: Vim: revisited

#107
post #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?

Prefs -> Keyboard -> Modifier keys.

Re: Vim: revisited

#108
post #41

set relativenumber I had been using Vim for years, and this is fundamentally one of the most useful settings I came across. I think it's only available it the latest rel. Funny side note, I was out on the town one night and saw a bunch of guys and girls hacking on their laptops... in a club. I noticed one guy using Vim, came up behind him and told him he has a good taste in editors. It turns out he's Jay Freeman (sau…

Thanks a lot! For a vimrc also supporting other version than 7.3:

  if version >= 730
    set relativenumber
  endif

Re: Vim: revisited

#109
post #100

Earlier quoted context omitted.

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

Prefs -> Keyboard -> Modifier keys.

Oh, sorry, I should clarify -- I want to remap it to Esc.

Or, to be more precise, I want Caps Lock to somehow switch modes in vim in a terminal app. If that means configuring something on both sides, the OS and vim, I'm cool with that.

I've tried a number of things but nothing seems to work right.

Re: Vim: revisited

#110
This is a incredibly useful overview. My jaw dropped when I read about all the uber-jump commands! I've been setting markers, but this is 100x better. This is exactly why I read every single post about vim, because I always learn something new.
Post reply on HN