Added clear search on <esc> and cleaned up vimrc

+ mapped <esc> to also clear highlighted search
+ cleaned up unused mappings, comments, etc. from the vimrc
This commit is contained in:
Nick Nisi
2013-02-10 09:45:45 -06:00
parent 6377243b5a
commit d23254e3a0

View File

@@ -11,7 +11,7 @@ Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim' Bundle 'kien/ctrlp.vim'
Bundle 'scrooloose/nerdtree' Bundle 'scrooloose/nerdtree'
Bundle 'mileszs/ack.vim' Bundle 'mileszs/ack.vim'
Bundle 'scrooloose/syntastic' " Bundle 'scrooloose/syntastic'
Bundle 'Raimondi/delimitMate' Bundle 'Raimondi/delimitMate'
Bundle 'tpope/vim-commentary' Bundle 'tpope/vim-commentary'
Bundle 'tpope/vim-endwise' Bundle 'tpope/vim-endwise'
@@ -33,6 +33,7 @@ Bundle 'nono/vim-handlebars'
Bundle 'tsaleh/vim-matchit' Bundle 'tsaleh/vim-matchit'
Bundle 'benmills/vimux' Bundle 'benmills/vimux'
Bundle 'mattn/zencoding-vim' Bundle 'mattn/zencoding-vim'
Bundle 'int3/vim-taglist-plus'
filetype plugin indent on filetype plugin indent on
@@ -194,16 +195,17 @@ set laststatus=2 " show the satus line all the time
" General mappings/shortcuts for functionality " General mappings/shortcuts for functionality
" Additional, plugin-specific mappings are located under " Additional, plugin-specific mappings are located under
" the plugins section " the plugins section
"
" nnoremap K :q<cr>
" remap esc and disable to force learning " clear search results on escape
nnoremap <silent> <esc> :nohlsearch<cr><esc>
" remap esc
inoremap jk <esc> inoremap jk <esc>
" inoremap <esc> <nop>
" remove extra whitespace " remove extra whitespace
nmap <leader><space> :%s/\s\+$<cr> nmap <leader><space> :%s/\s\+$<cr>
" shortcut to save
nmap <leader>, :w<cr> nmap <leader>, :w<cr>
" set paste toggle " set paste toggle
@@ -260,24 +262,11 @@ map <silent> <C-j> :call WinMove('j')<cr>
map <silent> <C-k> :call WinMove('k')<cr> map <silent> <C-k> :call WinMove('k')<cr>
map <silent> <C-l> :call WinMove('l')<cr> map <silent> <C-l> :call WinMove('l')<cr>
" nnoremap <C-S-H> :vertical resize -5<cr>
" nnoremap <C-S-J> :resize +5<cr>
" nnoremap <C-S-K> :resize -5<cr>
" nnoremap <C-S-L> :vertical resize +5<cr>
map <leader>wc :wincmd q<cr> map <leader>wc :wincmd q<cr>
" equalize windows " equalize windows
map <leader>= <C-w>= map <leader>= <C-w>=
" Edit Shortcuts
" these automatically populate the current filepath
cnoremap %% <C-R>=expand('%:h').'/'<cr>
map <leader>ew :e %%
map <leader>es :sp %%
map <leader>ev :vsp %%
map <leader>et :tabe %%
" toggle cursor line " toggle cursor line
nnoremap <leader>i :set cursorline!<cr> nnoremap <leader>i :set cursorline!<cr>