From 17c48252ec669ca3197fdac0f00514c82016929b Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 4 Sep 2011 14:13:23 -0400 Subject: Added vimrc --- _vimrc | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 _vimrc (limited to '_vimrc') diff --git a/_vimrc b/_vimrc new file mode 100644 index 00000000..a610f2c7 --- /dev/null +++ b/_vimrc @@ -0,0 +1,96 @@ +set nocompatible + +noremap \ , +let mapleader = "," + +set backspace=indent,eol,start " allow backspacing everything +set hidden +set backup +set history=50 +set ruler " show cursor position all the time +set showcmd " show incomplete commands +set incsearch +set ignorecase +set smartcase +set guioptions-=t " no tear-off menus +if has('mouse') + set mouse=a +endif +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch +endif + +augroup vimrcEx +au! +" jump to the last cursor position +autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif +augroup END + +set autoindent +set smartindent +colorscheme twilight +set nu + +" 4-space indents +set tabstop=4 +set shiftwidth=4 +set expandtab + +filetype plugin indent on +autocmd FileType ruby setlocal expandtab shiftwidth=2 + +"set showmatch " jump to matching bracket +set guioptions-=T " no toolbar in gvim +"set cc=80 " highlight 80th column +set guifont=Monospace\ 9 + +set spell +"set fdm=syntax " fold by syntax + +highlight OverLength ctermbg=darkred ctermfg=white guibg=#592929 +match OverLength /\%81v.\+/ + +nnoremap ' ` +nnoremap ` ' + +"better tab complete +set wildmenu +set wildmode=list:longest +set wildignore=*.o,*.d,*~ + +set title " change terminal title + +runtime macros/matchit.vim " smarter % + +nmap n :silent :nohlsearch + +" Show trailing whitespace with ,s +set listchars=tab:>-,trail:ยท,eol:$ +nmap s :set nolist! + +set shortmess=atI + +" Easy X copy/paste +map p "+p +map P "+P +map y "+y +map Y "+Y +map d "+d +map D "+D + +set visualbell t_vb= + +set cursorline + +" Insert hard tab +imap + +set browsedir=buffer " GUI Open starts in CWD + +map Q gq + +command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | wincmd p | diffthis -- cgit 1.4.1