-
-
Save humus/8b77857433121114a0506c44d5e39120 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap ygl :<C-u><C-r>=getline('.')<cr><cr> | |
nnoremap <silent> <C-p> :call CtrlPWhatTodoWhenCtrlpIsCalled()<cr> | |
nnoremap <silent> <C-n> :CtrlPMRU<cr> | |
fun! CtrlPWhatTodoWhenCtrlpIsCalled() "{{{ | |
let actual_dir = getcwd() | |
let dir = projectroot#get() | |
if dir != '' | |
CtrlPMixed | |
elseif expand('%:t') == '' | |
CtrlPMRU | |
else | |
execute 'CtrlP ' . expand('%:p:h') | |
endif | |
endfunction "}}} | |
let g:filesep=!has('win32') ? '/' : '\' | |
noremap! %% <C-r>=expand('%:h') . g:filesep<cr> | |
let g:ctrlp_map = '<F13>' | |
" Uncomment the following to have Vim jump to the last position when | |
" reopening a file | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal! g'\"" | endif | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment