Skip to content

Instantly share code, notes, and snippets.

@earlgreyxxx
Created November 1, 2020 10:15
Show Gist options
  • Save earlgreyxxx/1cb577a8015c9c4afdc5a06a5cbf59e0 to your computer and use it in GitHub Desktop.
Save earlgreyxxx/1cb577a8015c9c4afdc5a06a5cbf59e0 to your computer and use it in GitHub Desktop.
" Set CMD 既定値に戻す
function! Fsetcmd()
set shell&
set shellcmdflag&
set shellslash&
set shellquote&
set shellxquote&
set shellxescape&
set grepprg&
echo 'change shell to default windows cmd'
endfunction
" Set WSL
function! Fsetwsl()
let &shell = 'bash'
let &shellcmdflag = '-c'
let &shellslash = 1
let &shellquote='"'
let &shellxquote = ''
let &shellxescape = ''
let &grepprg = 'grepwsl -n'
echo 'change shell to WSL bash'
endfunction
command! Setcmd call Fsetcmd()
command! Setwsl call Fsetwsl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment