Skip to content

Instantly share code, notes, and snippets.

@willopez
Last active August 29, 2015 14:12
Show Gist options
  • Save willopez/f7862958666c3f90c75a to your computer and use it in GitHub Desktop.
Save willopez/f7862958666c3f90c75a to your computer and use it in GitHub Desktop.
Vim experiments
Article
http://www.codeography.com/2013/06/17/replacing-all-the-things-with-unite-vim.html
Repo
https://github.com/terryma/dotfiles
" Use Ag to search files via ctrlp
unlet g:ctrlp_user_command
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" easy tags
let g:easytags_async = 1
let g:easytags_auto_update = 0
let g:easytags_auto_highlight = 0
" NERDTree
map <Leader>nn :NERDTreeToggle<cr>
map <Leader>nf :NERDTreeFind<cr>
" CTRL-P
map <Leader>b :CtrlPBuffer<cr>
" Disable search highlighting
map <Leader>h :noh<cr>
" CTRL-P
map <Leader>f :CtrlPFunky<cr>
" Replace word with contents of register 0
:map <leader>r cw<C-r>0<ESC>
" Write buffer
map <Leader>p :w<cr>
" Navigate to quickfix window
map <Leader>c :cope<cr>
" close quickfix window
map <Leader>q :cclose<cr>
" Delete buffer
map <Leader>d :bp<bar>sp<bar>bn<bar>bd<CR>
" Seach with Ag
map <Leader>s :Ag<Space>
" load file using CtrlP
map <Leader>l :CtrlP<cr>
" Add semicolon to end of line
map <leader>e :nohlsearch<cr> :s/$/;/<cr> :noh<cr>
" Cycle between open panes 'Next pane'
map <leader>n <c-w><c-w>•
" Update Tags
map <Leader>tt :UpdateTags /home/dev/tracker/ --languages=php --php-kinds=cif --exclude=web/* --exclude=app/* --exclude=.git --exclude=bin --exclude=*tests* --exclude=*/Tests/* <CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment