Skip to content

Instantly share code, notes, and snippets.

@draftcode
Created December 14, 2012 04:31
Show Gist options
  • Select an option

  • Save draftcode/4282709 to your computer and use it in GitHub Desktop.

Select an option

Save draftcode/4282709 to your computer and use it in GitHub Desktop.
Convert cygwin style file path.
" 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