Skip to content

Instantly share code, notes, and snippets.

@nileema
Created August 28, 2015 06:23
Show Gist options
  • Save nileema/a0683bac86fb71216020 to your computer and use it in GitHub Desktop.
Save nileema/a0683bac86fb71216020 to your computer and use it in GitHub Desktop.
// Install CTRL-P
git clone https://github.com/kien/ctrlp.vim.git ~/.vim/bundle/ctrlp.vim
// Add this to vimrc
"""""""""""
" CTRL P
""""""""""
set runtimepath^=~/.vim/bundle/ctrlp.vim
" Set no max file limit
let g:ctrlp_max_files = 0
" Search from current directory instead of project root
let g:ctrlp_working_path_mode = 0
" Ignore these directories TODO => Set your directories to ignore
set wildignore+=*/target/**
" set wildignore+=*/vendor/**
" Search in certain directories a large project (hardcoded for now)
cnoremap %proj <c-r>=expand('~/Projects/some-project')<cr>
" ga = go api
map <Leader>ga :CtrlP %proj/api/<cr>
" gf = go frontend
map <Leader>gf :CtrlP %proj/some/long/path/to/frontend/code/<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment