Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugin/g.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if !exists("g:vim_g_open_command")
endif
endif

if !exists("g:vim_g_perl_command")
let g:vim_g_perl_command = "perl"
if !exists("g:vim_g_python_command")
let g:vim_g_python_command = "python3"
endif

if !exists("g:vim_g_query_url")
Expand Down Expand Up @@ -75,8 +75,8 @@ fun! s:goo(ft, ...)
" Target command: start "" "<url>"
silent! execute "! " . g:vim_g_open_command . " \"\" \"" . g:vim_g_query_url . query . "\""
else
silent! execute "! goo_query=\"$(" . g:vim_g_perl_command .
\" -MURI::Escape -e 'print uri_escape($ARGV[0]);' \"" . query . "\")\" && " .
silent! execute "! goo_query=\"$(" . g:vim_g_python_command .
\" -c 'import urllib.parse; print(urllib.parse.quote(\"". query."\"))')\" && " .
\g:vim_g_open_command . ' "' . g:vim_g_query_url . "$goo_query" . '" > /dev/null 2>&1 &'
endif
redraw!
Expand Down