Hacker News new | past | comments | ask | show | jobs | submit login
Best Vim Tips (wikia.com)
60 points by epall on Aug 4, 2009 | hide | past | favorite | 8 comments



Good post, I'm (more or less) an emacs guy, but vimtutor + this + 1 to 2 days of my time might certainly convince me of switching to vim.

(warning, by no means am I trying to instigate yet another emacs vs vim thread but here I go)

Not to hate on emacs, since it has served me well as an advanced editor for the past year or so, but I sometimes feel so lost in its sea of features and a never-ending config file that I often end up saying to myself "If I only I could take the time to learn lisp maybe I could really start using emacs that way it should be used", nevertheless, learning vim versus learning lisp is certainly more cost-effective for my time.


Note that VIMScript has grown into a pretty nice extension language for Vim in Vim 7.2.


I really love vim, but Vimscript is imho braindead. Yes, you can do pretty much everything in it, but it's an example of a very poor language design. Perhaps not even Perl can beat it in its manifold syntax.


Well, VIMScript was not "designed". It kind of grew all over the place.


tab completion also works for help: it cycles through all help keywords that contain the present text (not just suffixes, as in normal tab-completion). eg. try

    :he lvis
and press tab.

I like the inline arithmetic:

    CTRL-R=5*5
Note the "=" comes first. I just discovered that "CTRL-R5" inserts that line from your cut-and-paste history (or something).


CTRL-R inserts from the register that follows it.

See :help i_CTRL-R and :help registers


Wow, I didn't know about several of these. Thanks for this!


This is just the tip of the iceberg.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: