Skip to content

Commit

Permalink
Cleaned up vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Werth committed Jun 9, 2010
1 parent 4b4fd37 commit b8d2d9d
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions etc/vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
" | Put machine/user specific settings in ~/.vimrc.local |
" -----------------------------------------------------------------------------


set nocompatible
let mapleader = ","


" Tabs ************************************************************************
Expand Down Expand Up @@ -69,9 +69,9 @@ set numberwidth=4
set equalalways " Multiple windows, when created, are equal in size
set splitbelow splitright

"Vertical split then hop to new buffer
:noremap ,v :vsp^M^W^W<cr>
:noremap ,h :split^M^W^W<cr>
" Vertical and horizontal split then hop to a new buffer
:noremap <Leader>v :vsp^M^W^W<cr>
:noremap <Leader>h :split^M^W^W<cr>

" Cursor highlights ***********************************************************
Expand Down Expand Up @@ -105,14 +105,6 @@ set nowrap
set linebreak " Wrap at word


" Mappings ********************************************************************
" Professor VIM says '87% of users prefer jj over esc', jj abrams disagrees
imap jj <Esc>
imap uu _
imap hh =>
imap aa @

" Directories *****************************************************************
" Setup backup location and enable
"set backupdir=~/backup/vim
Expand All @@ -132,7 +124,7 @@ filetype plugin indent on
"autocmd FileType html :set filetype=xhtml


" Inser New Line **************************************************************
" Insert New Line *************************************************************
map <S-Enter> O<ESC> " awesome, inserts new line without going into insert mode
map <Enter> o<ESC>
set fo-=r " do not insert a comment leader after an enter, (no work, fix!!)
Expand All @@ -143,17 +135,10 @@ set fo-=r " do not insert a comment leader after an enter, (no work, fix!!)
set sessionoptions=blank,buffers,curdir,folds,help,resize,tabpages,winsize


" Misc ************************************************************************
set backspace=indent,eol,start
set number " Show line numbers
set matchpairs+=<:>
set vb t_vb= " Turn off bell, this could be more annoying, but I'm not sure how


" Invisible characters *********************************************************
set listchars=trail:.,tab:>-,eol:$
set nolist
:noremap ,i :set list!<CR> " Toggle invisible chars
:noremap <Leader>i :set list!<CR> " Toggle invisible chars

" Mouse ***********************************************************************
Expand Down Expand Up @@ -190,13 +175,26 @@ autocmd FileType c set omnifunc=ccomplete#Complete
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete


" Misc ************************************************************************
set backspace=indent,eol,start
set number " Show line numbers
set matchpairs+=<:>
set vb t_vb= " Turn off bell, this could be more annoying, but I'm not sure how
set nofoldenable " Turn off folding

imap uu _
imap hh =>
imap aa @
" Professor VIM says '87% of users prefer jj over esc', jj abrams disagrees
imap jj <Esc>

" -----------------------------------------------------------------------------
" | Plug-ins |
" -----------------------------------------------------------------------------

" NERDTree ********************************************************************
:noremap ,n :NERDTreeToggle<CR>
:noremap <Leader>n :NERDTreeToggle<CR>
" User instead of Netrw when doing an edit /foobar
let NERDTreeHijackNetrw=1
Expand All @@ -219,13 +217,13 @@ let NERDTreeMouseMode=1
" ruby extconf.rb
" make
let g:CommandTMatchWindowAtTop = 1
map ,f :CommandT<CR>
map <Leader>f :CommandT<CR>

" fuzzyfinder ********************************************************
" I'm using CommandT for main searching, but it doesn't do buffers, so I'm
" using FuzzyFinder for that
map ,b :FufBuffer<CR>
map <Leader>b :FufBuffer<CR>
"let g:fuzzy_ignore = '.o;.obj;.bak;.exe;.pyc;.pyo;.DS_Store;.db'


Expand Down

0 comments on commit b8d2d9d

Please sign in to comment.