Last active
August 29, 2015 14:05
-
-
Save pehlert/354f4b24d8140d16566c to your computer and use it in GitHub Desktop.
This file contains 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
function! RelativeFileComplete() | |
let oldpwd = getcwd() | |
lcd %:p:h | |
call feedkeys("\<C-x>\<C-f>") | |
execute 'lcd' oldpwd | |
return '' | |
endfunction | |
imap <C-f> <C-r>=RelativeFileComplete()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
function! RelativeFileComplete()
let g:oldpwd = getcwd()
lcd %:p:h
call feedkeys("")
return ''
endfunction
imap =RelativeFileComplete():exe 'lcd ' . g:oldpwd