Live data from Hacker News

Efficient Editing With vim

jmcpherson.org

51–60 of 125 posts

Re: Efficient Editing With vim

#51
post #43
post #22

I find it amusing that he asserts "blockwise selection mode. Extremely powerful and available in very few other editors". Blockwise selection mode is available in almost every Windows editor I use - from the Delphi IDE, Visual Studio, even to Notepad2, Shift+Alt does block selection, or alternatively Alt + mouse selection.

plus I still have to see a use for it. Usually I just go linewise or, inside a line, with movements like f) or $.

You can use it to block indent/unindent code, I find that quite useful.

Re: Efficient Editing With vim

#52
post #7

Amazingly, this is the first I've heard of fx/tx/Fx. How ridiculously awesome.

I have this printed out and taped up right next to my monitor: http://wint1.kaist.ac.kr/files/attach/images/59/450/vi-vim-c... It's helped me polish off those last few vim commands that I never got used to. I recommend looking at it daily.

I thought I was a Vim master and I just looked at that and discovered once again how stupid and inefficient I've been this whole time. This sort of thing keeps happening to me with Vim.

Re: Efficient Editing With vim

#53
post #13

Earlier quoted context omitted.

gt and gT in command mode also do next tab and previous tab

also #gt will go that tab number. I've changed my tab text to show the number in parenthesis before the name.

For those who prefer alt navigation, you can add to your gvimrc

  " tab navigation
  map   1gt
  map   2gt
  map   3gt
  map   4gt
  map   5gt
  map   6gt
  map   7gt
  map   8gt
  map   9gt
  map   10gt

Re: Efficient Editing With vim

#54
post #35
post #19

Earlier quoted context omitted.

By force of habit, when I wanted to close an IM window, I have typed :q Instead of switching to the mouse and hitting the "x". Then I had to explain to the person that I wasn't sticking my tongue out at them.

I've hit Ctrl-W to try to delete a word, and ended up closing an IRC window. It's not exclusive to vim. :)

I've found it easy to avoid misusing Ctrl-w because of the fact I use it so much to close tabs in Firefox. You just need to have two different uses for something, both of which you use very regularly, to get used to not accidentally misusing them, I've found.

Re: Efficient Editing With vim

#55
post #42

Earlier quoted context omitted.

I am still waiting for Vim FPS style (WSAD navigation keys, sniper scopes to skip words and all... sure it might need 3d graphics but hey, its the price you pay).

I, however, am waiting for an FPS, vim-style!

Damned straight. I want World of Vimcraft, yesterday!

. . . or maybe Vim of Warcraft. I guess VoW is a better acronym than WoV.

Re: Efficient Editing With vim

#56
post #21
post #14

Warning: learning Vim makes you look for Vim like commands in any program you interact with using the keyboard. Everything else will be frustrating.

20-year user of vi here... yes, once you get used to vi, going back to an editor for humans is hard.

Yeah -- giving up my transhuman lifestyle would be difficult.

Re: Efficient Editing With vim

#57

Earlier quoted context omitted.

I have this printed out and taped up right next to my monitor: http://wint1.kaist.ac.kr/files/attach/images/59/450/vi-vim-c... It's helped me polish off those last few vim commands that I never got used to. I recommend looking at it daily.

I've got that cheat sheet saved on my computer and I've looked at it several times before, but today was the first time I realized that you can hit '&' to repeat the last :s command on the current line. Very slick!!

Yep, and 'g&' is really helpful. It runs the last substitute across the entire file, preserving flags.

Re: Efficient Editing With vim

#58
post #39
post #14

Warning: learning Vim makes you look for Vim like commands in any program you interact with using the keyboard. Everything else will be frustrating.

Have you tried vim like browsing? http://vimperator.org/trac/wiki/Vimperator For keyboard lovers.

I'm using it now, as a matter of fact.

Re: Efficient Editing With vim

#60
post #42

Earlier quoted context omitted.

I am still waiting for Vim FPS style (WSAD navigation keys, sniper scopes to skip words and all... sure it might need 3d graphics but hey, its the price you pay).

I, however, am waiting for an FPS, vim-style!

I use hjkl in all my games. That, or asdf. Keeps me from getting wrist cramps.

True story.

Post reply on HN