Live data from Hacker News

How I boosted my Vim

nvie.com

21–30 of 69 posts

Re: How I boosted my Vim

#21
post #13

One thing that continues to impress me is how much bigger than popular belief Vim is. There is a plethora of options you can set in your vimrc file (just now I found out about wildignore, and I'm kind of a Vim addict) and there are fucking lot of commands (try [I ), and that's not considering Ex mode. Customization is way easier than in Emacs, you just unzip an archive in your .vim dir and (99% of the time) it works.…

thank you for making '[I' my hey-i-learned-a-neat-thing-of-the day!

(from the doc, [I: Display all lines that contain the keyword under the cursor. Filenames and line numbers are displayed for the found lines. The search starts at the beginning of the file.)

sweet!)

Re: How I boosted my Vim

#23
post #20
post #6

I have a similarly hacked up Emacs environment and it's actually gotten to the point that I'm taking a hard look at IDEs again. Having all this functionality available in a single integrated package with a visual debugger thrown in is starting to look strangely appealing.

IMO, IDEs are better for almost everything, except for actual text editing. For that, vim and emacs are still the best (I prefer vim for plain text editing prowess, but emacs has a lot of other goodies which make it closer to an IDE, but still not as good). Obviously, these are only my personal opinions.

I agree. If I'm just editing text, like an email or a readme or a blog post or a typical config file, I'd rather have a quick, lean, dedicated text editor. Some of these editor-as-IDE environments start to feel a little like an incredibly pimped-out Pinto though.

Re: How I boosted my Vim

#25
post #20
post #6

I have a similarly hacked up Emacs environment and it's actually gotten to the point that I'm taking a hard look at IDEs again. Having all this functionality available in a single integrated package with a visual debugger thrown in is starting to look strangely appealing.

IMO, IDEs are better for almost everything, except for actual text editing. For that, vim and emacs are still the best (I prefer vim for plain text editing prowess, but emacs has a lot of other goodies which make it closer to an IDE, but still not as good). Obviously, these are only my personal opinions.

I agree that this is true, if you have no desire to learn how Emacs and your chosen modes work. If you are willing to dig in, the ability to fix your tools with a simple C-M-x is indispensable, and is a feature that no IDE has.

What features do you think Emacs is missing?

Re: How I boosted my Vim

#26
post #10

This is actually a really good guide. I use vim daily at work, and my .vimrc shares most of these settings. One big productivity boost for me was remapping the Escape key to something a little more convenient. I just remapped the ESC key altogether, but this can throw you off if you find yourself working at lots of different computers. If you prefer something less permanent, you can map a key sequence to ESC. I like…

weird

I use in insert mode (not to be confused with in command mode, which jumps to the buffer below).

Re: How I boosted my Vim

#27
Great guide! My .vimrc had most of these settings, but I picked up a few things that made life much easier. Below are some tricks that I use which might make useful additions.

Binding the key to capslock has been really useful for me. http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_XWindow... explains how you can do this, although it's done externally and not in Vim. Just include the script in your shell rc file and you're good to go.

Experienced users can hide the menu and tool bars with:

set guioptions-=m "remove menu bar

set guioptions-=T "remove toolbar

Extra screen space for your code is always nice!

Another amazingly useful plugin is MiniBufExplorer (http://www.vim.org/scripts/script.php?script_id=159). This allows you to open multiple buffers in the same vim window, and with the key binds given in the plugin page you can switch between buffers just like you switch between tabs in Firefox. It's really useful when you follow tags in a large source directory.

And for people who can't seem to find just the right colour scheme: Color Scheme Pack plugin (http://www.vim.org/scripts/script.php?script_id=625). It has over a 100 different themes, nicely categorized.

Re: How I boosted my Vim

#28
post #20
post #6

I have a similarly hacked up Emacs environment and it's actually gotten to the point that I'm taking a hard look at IDEs again. Having all this functionality available in a single integrated package with a visual debugger thrown in is starting to look strangely appealing.

IMO, IDEs are better for almost everything, except for actual text editing. For that, vim and emacs are still the best (I prefer vim for plain text editing prowess, but emacs has a lot of other goodies which make it closer to an IDE, but still not as good). Obviously, these are only my personal opinions.

I use the ViEmu plugin for Visual Studio. It makes for an awesome environment.

http://www.viemu.com

Re: How I boosted my Vim

#29
post #7
post #2

Oh, and man… never ever let Vim write a backup file! They did that in the 70’s. Use modern ways for tracking your changes, for God’s sake. set nobackup set noswapfile backup files are one thing, but turning off swap files is a terrible idea. vim can crash, you can accidentally close the window, your ssh session can die, etc. if you exit vim cleanly then the swap files will be transparent, so i don't see the point in…

> vim can crash It can?

Never had vim crash, but I've had the OS crash. Or X server. Better safe than sorry.
Post reply on HN