Created
April 23, 2009 18:31
-
-
Save davidphasson/100667 to your computer and use it in GitHub Desktop.
Current .vimrc from mac laptop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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