Live data from Hacker News

Efficient Editing With vim

jmcpherson.org

41–50 of 125 posts

Re: Efficient Editing With vim

#41
post #4

See, this is one of the things I love about Vim: there's always something new to learn! Somehow I had overlooked "K" to go to man pages. The other thing I love about Vim is the excellent documentation! I wanted to know more about "K" so I typed ":help K" and learned that, for example, if you're editing Ruby and would rather use 'ri' in place of 'man', all you have to do is add ":set keywordprg=ri" to your .vimrc (and…

Actually, you would use an ftplugin or autocmd to :set keywordprg=ri only when ft=ruby, which is what the ruby.vim files do. In fact, they are already part of the standard runtime files distribution.

Re: Efficient Editing With vim

#42
post #21

Earlier quoted context omitted.

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

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!

Re: Efficient Editing With vim

#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 $.

Re: Efficient Editing With vim

#44
post #40
post #35

Earlier quoted context omitted.

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 hit ctrl-w and closed a window while taking a test in class.

When I first switched to my Mac, when I'd switch between split windows (ctrl w w), I'd often accidentally close my Terminal session (command w). The Apple Command sat where I expected ctrl to be.

Re: Efficient Editing With vim

#45
post #32
post #4

See, this is one of the things I love about Vim: there's always something new to learn! Somehow I had overlooked "K" to go to man pages. The other thing I love about Vim is the excellent documentation! I wanted to know more about "K" so I typed ":help K" and learned that, for example, if you're editing Ruby and would rather use 'ri' in place of 'man', all you have to do is add ":set keywordprg=ri" to your .vimrc (and…

Just a note, but ':help' doesn't always go to what you want. For example the option 'smartindent' (set with ':set smartindent') can be abbreviated as ':set si', but ':help si' takes you to the help for the ':sim[alt]' command. It's useful to note that when searching through help you type something like: :help 'si' To get help on a variable and: :help :si To get help on a command. The first form would take you to the…

:help si (type :help space s i and control-d after the i) will give you all available variations in help on si, including 'si' and si among many others.

CTL-D is a sort of intelli-suggest in context (except it's move 1/2 page down in command mode)

:help gives variations of help in your installation.

:help (help then space then control-D) gives more variations.

:help help (ask for help on help, with a control-D immediately after the last p) gives more variations on help.

:help c_CTRL-D (literally typed just like that) is the help entry for using CTL-D on the command line.

:help CTRL-D (everything up to the first D literally, then control-D) lists all the different help subjects for CTRL-D in various contexts.

: (control-D immediately after typing colon) lists all the things you can do on the command line, including help.

Help.

Re: Efficient Editing With vim

#46
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 $.

It's mostly useful for ASCII diagrams, in conjunction with overwrite mode.

Re: Efficient Editing With vim

#47
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.

I created this bash alias cause I was typing it so much at the the command line. alias :e=vim

hahahaha same here!

Re: Efficient Editing With vim

#48
post #23

Earlier quoted context omitted.

I would kill for GMail to add vim-like text editing.

Have you heard of the "It's All Text" Firefox extension? It copies the content of any textarea to a tempfile and opens it up in an external editor of your choice. Writes to the tempfile are copied back to the textarea. It's not quite in-browser vim, but it's pretty close. https://addons.mozilla.org/en-US/firefox/addon/4125

of course, if you use vimperator you have ctrl-i for that

Re: Efficient Editing With vim

#49
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'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!!

Re: Efficient Editing With vim

#50

Earlier quoted context omitted.

I once wrote ":tabnew something.js" in my IM window and sent it before I realized that the wrong window had focus. The person replied with, "bash: :tabnew: command not found." I told him, "I was hoping you were vim, actually".

HA! Also using vim will cause your escape key to be heavily hit constantly after typing anything especially if you are not sure what mode you are in, then only realizing you are not in vim period.

Oh god I do this so much it's getting to be painful.
Post reply on HN