Created
June 24, 2011 14:56
-
-
Save brianjmiller/1044951 to your computer and use it in GitHub Desktop.
my .vimrc
This file contains 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
" include other paths to look for config files | |
:set runtimepath=~/.vim,$VIMRUNTIME | |
" some basic options | |
:set nocompatible | |
:set showmatch | |
:set nowrap | |
:set ruler | |
:set showmode | |
:set backspace=2 | |
:set textwidth=0 | |
:set novisualbell | |
:set ls=2 | |
:set cpoptions=$ | |
:set viminfo='5,h,n~/.vim/.viminfo | |
" confirm quitting when multiple files open or changes have not been saved | |
:set confirm | |
" perform indenting smartly | |
:set smartindent | |
:set expandtab | |
:set tabstop=4 | |
:set shiftwidth=4 | |
" to set the title of the window where you are working | |
:set title | |
:auto BufEnter * let &titlestring = hostname() . ":" . expand("%:p") | |
:auto BufEnter * let &titleold = hostname() . ":" . getcwd() | |
" key mappings let you do things fast | |
:map t j. | |
" helps colors when using a black/dark background | |
:set background=dark | |
" turn syntax highlighting on | |
:syntax on | |
" restore the screen on exit | |
:set t_ti=^[7^[[?47h t_te=^[[?47l^[8 | |
" put comments at proper indentation, not at beginning of line | |
:inoremap # X^H# | |
" load skeleton files when creating a new file with a particular extension | |
:au BufNewFile *.pl 0r ~/.vim/skeleton.pl | |
:au BufNewFile *.pm 0r ~/.vim/skeleton.pm | |
:au BufNewFile *.sql 0r ~/.vim/skeleton.sql | |
:au BufNewFile *.js 0r ~/.vim/skeleton.js | |
" for git | |
:autocmd BufNewFile,BufRead COMMIT_EDITMSG set filetype=gitcommit | |
":colorscheme zenburn | |
:set nohlsearch | |
:set foldmethod=indent | |
:set foldlevel=0 | |
" To not load plugin that causes incredibly annoying paren, brace, etc. highlighted match | |
:let loaded_matchparen = 1 | |
" add 'gp' to select most recent paste/change - http://vim.wikia.com/wiki/Selecting_your_pasted_text | |
:nnoremap <expr> gp '`[' . strpart(getregtype(), 0, 1) . '`]' | |
" Make filename tab completion more bash-like | |
:set wildmode=longest,list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment