Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " defaults
- :set ts=4 sw=4 noet ai
- :set pastetoggle=<F8>
- :set background=dark
- :set nowrap
- :set hlsearch
- :set viminfo='20,<1000
- " disable the annoying HTML link underlining
- :hi link htmlLink NONE
- :hi link htmlItalic NONE
- " enable mouse
- :set mouse=a
- " Switch syntax highlighting on, when the terminal has colors
- if &t_Co > 2 || has("gui_running")
- syntax on
- endif
- " set some custom tab spacings
- autocmd BufRead *.xml set ts=2 sw=2 noet
- autocmd BufRead *.xsl set ts=2 sw=2 noet
- autocmd BufRead *.php set ts=4 sw=4 noet
- autocmd BufRead *.tpl set ts=2 sw=2 noet
- autocmd BufRead *.py set ts=4 sw=4 et
- autocmd BufRead *.rb set ts=2 sw=2 et
- autocmd BufRead *.html.erb set ts=2 sw=2 et
- " Automatically chmod +x Shell and Perl scripts
- "autocmd BufWritePost *.sh !chmod +x %
- "autocmd BufWritePost *.pl !chmod +x %
- " don't show help when F1 is pressed
- map <F1> <ESC>
- "ignoremap <F1> <ESC>
- "Open file at last edited location
- au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") |
- \ exe "normal g'\"" | endif
- "---------+
- " Comments \
- "-----------+
- map ,# :s/^/#/<CR>
- map ,/ :s/^/\/\//<CR>
- map ,> :s/^/> /<CR>
- map ,! :s/^/!/<CR>
- map ,; :s/^/;/<CR>
- map ,- :s/^/--/<CR>
- map ,c :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//<CR>
- " Common Command Typos
- command! Q quit " converts ... :Q => :q
- command! W write " converts ... :W => :w
- command! Wq wq " converts ... :Wq => :wq
- command! Wn wn " converts ... :Wn => :wn
- command! WN wN " converts ... :WN => :wN
- set dictionary-=~/funclist.txt dictionary+=~/funclist.txt
- set complete-=k complete+=k
Add Comment
Please, Sign In to add comment