Created
December 14, 2012 04:31
-
-
Save draftcode/4282709 to your computer and use it in GitHub Desktop.
Convert cygwin style file path.
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
| " quickrun: hook/cygpath: Convert source file path. | |
| " Author: draftcode <draftcode@gmail.com> | |
| " License: zlib License | |
| let s:save_cpo = &cpo | |
| set cpo&vim | |
| let s:hook = { 'config': { 'enable': 0 } } | |
| function! s:hook.on_normalized(session, context) | |
| let a:session.config.srcfile = system( | |
| \ "cygpath.exe -w " . a:session.config.srcfile) | |
| endfunction | |
| function! quickrun#hook#cygpath#new() | |
| return deepcopy(s:hook) | |
| endfunction | |
| let &cpo = s:save_cpo | |
| unlet s:save_cpo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment