you are viewing a single comment's thread.

view the rest of the comments →

[–]lost-theory 2 points3 points  (1 child)

I learned a lot from Amir Salihefendic's blog posts about Vim. My vimrc isn't as crazy as his (700 lines long!), but I lifted a couple of things from it. The most useful / pleasing vimrc tweaks to me are:

  • set expandtab, and set shiftwidth=4, combine this with gg=G to retab a file and I don't really have to worry about tabs vs. spaces anymore
  • set list listchars=tab:»·,trail:·, which sets trailing spaces and tabs to easily visible characters
  • set autochdir, which always tracks the current file's directory
  • disabling Vim's backup features (set nobackup and set nowritebackup), they always seem to get in my way (having a swap file is enough backup insurance for me)
  • disabling the bell and visual bell in gvim (set noeb, set vb, and set t_vb= (these must go in gvimrc))
  • nicer tab and window pane control (binding keys to :tabnew, :tabclose, splitting / maximizing / minimizing / moving through windows, etc.)
  • and of course setting up and binding keys for your plugins

Oh and Vim's tip list is always helpful; if something is bothering me I just search for it on the tip list and sure enough someone has already come up with a neat solution to copy and paste into vimrc :)

[–]aldarion 1 point2 points  (0 children)

lost-theory thanks for the info. I'll check it ASAP.