You can use the gx command to open a URL in vim. Is this possible when using vim within Ubuntu in WSL?
Asked
Active
Viewed 1,832 times
2
jtpereyda
- 2,517
1 Answers
6
In vim, run:
let g:netrw_browsex_viewer="cmd.exe /C start"
Based on this answer, this answer, and this quetion.
You can also put this in your .vimrc file. Since I share my vimrc file between computers, I used the following to make .vimrc_local file for this OS-specific setting:
" From: https://devel.tech/snippets/n/vIIMz8vZ/load-vim-source-files-only-if-they-exist/
function! SourceIfExists(file)
if filereadable(expand(a:file))
exe 'source' a:file
endif
endfunction
call SourceIfExists("~/.vimrc_local")
jtpereyda
- 2,517