Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (56 sloc) 1.58 KB
" Don't use Ex mode, use Q for formatting
map Q gq
"make Y consistent with C and D
nnoremap Y y$
" toggle highlight trailing whitespace
nmap <silent> <leader>s :set nolist!<CR>
" Ctrl-N to disable search match highlight
nmap <silent> <C-N> :silent noh<CR>
" Ctrol-E to switch between 2 last buffers
nmap <C-E> :b#<CR>
" ,e to fast finding files. just type beginning of a name and hit TAB
nmap <leader>e :e **/
" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
" ,n to get the next location (compilation errors, grep etc)
nmap <leader>n :cn<CR>
nmap <leader>N :cp<CR>
" ,d to diffupdate
nmap <leader>d :diffupdate<CR>
nmap <leader>dp :diffput<CR>
nmap <leader>dg :diffget<CR>
"set completeopt=menuone,preview,longest
set completeopt=menuone,preview
" driving me insane this thing
command Q q
command Qa qa
command QA qa
command -nargs=* -complete=file W w <args>
command -nargs=* -complete=file E e <args>
" center display after searching
nnoremap n nzz
nnoremap N Nzz
nnoremap * *zz
nnoremap # #zz
nnoremap g* g*zz
nnoremap g# g#z
""""""""""" awesome stuff from vimbits.com
" keep selection after in/outdent
vnoremap < <gv
vnoremap > >gv
" better navigation of wrapped lines
nnoremap j gj
nnoremap k gk
" easier increment/decrement
nnoremap + <C-a>
nnoremap - <C-x>
" remove trailing spaces
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<cr>
" easy split navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" fast expand current file's directory in command mode
cnoremap %% <C-R>=expand('%:h').'/'<cr>
Jump to Line
Something went wrong with that request. Please try again.