Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just keep swap files and backup ones in my .vim/ directory

  set backupdir=~/.vim/backup
  set backup
  set directory=~/.vim/tmp
This to see line numbers on the left (i find it a bit more readable instead of watching at the bottom-right)

  set number
added a simple way to speedup my writing with (I know it's crappy but it works ...until you need to add just one bracket/quote)

  " autocomplete parenthesis, brackets and braces
  inoremap ( ()<Left>
  inoremap [ []<Left>
  inoremap { {}<Left>
  
  " autocomplete quotes
  inoremap	'  '<Esc>:call QuoteInsertionWrapper("'")<CR>a
  inoremap	"  "<Esc>:call QuoteInsertionWrapper('"')<CR>a
  inoremap	`  `<Esc>:call QuoteInsertionWrapper('`')<CR>a
  
  function! QuoteInsertionWrapper (quote)
    let col = col('.')
    if getline('.')[col-2] !~ '\k' && getline('.')[col] !~ '\k'
      normal ax
      exe "normal r".a:quote."h"
    end
  endfunction
and mapped f1/f2 to switch buffer

  noremap <f1> :bprev!<CR>
  noremap <f2> :bnext!<CR>
Some of this wall of text was stolen from a nice, but a bit too big, vimrc i found somewhere

If you need something specific try http://vim.wikia.com/



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

Search: