Skip to content

Instantly share code, notes, and snippets.

@davidphasson
Created April 23, 2009 18:31
Show Gist options
  • Save davidphasson/100667 to your computer and use it in GitHub Desktop.
Save davidphasson/100667 to your computer and use it in GitHub Desktop.
Current .vimrc from mac laptop
set number
set shiftwidth=4
set tabstop=4
syntax on
set smartindent
" Tab key mappings
nmap th :tabprev<cr>
nmap tl :tabnext<cr>
nmap tn :tabnew<cr>
nmap tc :tabclose<cr>
nmap tf :tabfind
" Git key mappings
nmap ga :!git add %<cr>
nmap gc :!git commit % -m "
nmap gp :!git push
nmap gl :!git pull
nmap gs :!git status<cr>
" viminfo
" '10 : files to remember marks
" "100 : lines per register
" :20 : lines of command line history
" % : saves and restores buffer list
" n... : where to save
set viminfo='10,\"100,:20,%,n~/.viminfo
" Last known cursor pos, vim tip 80
autocmd BufReadPost *
\ if line("'\"") > 0 |
\ if line("'\"") <= line("$") |
\ exe "normal '\"" |
\ else |
\ exe "normal $" |
\ endif |
\ endif
" os x clipboard
" vnoremap <silent> <Leader>y !pbcopy<CR>u
" nnoremap <silent> <Leader>p :read !pbpaste<CR>
if has("autocmd")
" Ruby files: use 2 space indenting
augroup module
autocmd BufRead,BufNewFile *.rb set expandtab tabstop=2 shiftwidth=2
augroup END
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment