Skip to content

Instantly share code, notes, and snippets.

@acuppy
Created February 6, 2015 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acuppy/f308c22b3d750d2a4b6b to your computer and use it in GitHub Desktop.
Save acuppy/f308c22b3d750d2a4b6b to your computer and use it in GitHub Desktop.
" shortcuts
inoremap jk <Esc>
:hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
:hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
:nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
autocmd BufWritePre * :%s/\s\+$//e
" close buffer
nmap <leader>d :bp<bar>sp<bar>bn<bar>bd<CR>
" close all buffers
nmap <leader>D :bufdo bd<CR>
" Switch between buffers
noremap <S-tab> :bp<CR>
noremap <tab> :bn<CR>
" open a new tab with ctrl-t
nnoremap <C-t> :tabnew<CR>
" cycle tabs left and right with ctrl
nnoremap <C-h> :tabp<CR>
nnoremap <C-l> :tabn<CR>
" \a to Ack (search in files)
nnoremap <leader>a :Ack
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
set relativenumber
set mouse=a
set re=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment