Make gx work in WSL

This commit is contained in:
Kenneth Benzie 2022-11-06 11:21:09 +00:00
parent 4c142d2fa5
commit 32610db521
2 changed files with 7 additions and 0 deletions

3
autoload/wsl.vim Normal file
View File

@ -0,0 +1,3 @@
function! wsl#isDetected() abort
return $WSLENV !=# ''
endfunction

4
vimrc
View File

@ -102,6 +102,10 @@ Pack 'tpope/vim-fugitive'
Pack 'tpope/vim-eunuch' Pack 'tpope/vim-eunuch'
" vim-vinegar - improved directory browser " vim-vinegar - improved directory browser
Pack 'tpope/vim-vinegar' Pack 'tpope/vim-vinegar'
if wsl#isDetected()
" Make gx work in WSL
let g:netrw_browsex_viewer='cmd.exe /C start'
endif
" vim-abolish - CamelCase to under_score to mixedCase " vim-abolish - CamelCase to under_score to mixedCase
" TODO: Copy the good bit remove this plugin " TODO: Copy the good bit remove this plugin
Pack 'tpope/vim-abolish' Pack 'tpope/vim-abolish'