From ad3c395dca98fc0a0ab8d7363c7616677b8d95de Mon Sep 17 00:00:00 2001 From: James Dixon Date: Mon, 20 Jul 2020 16:59:33 -0400 Subject: [PATCH] add open-browser.vim to fix broken netrw gx --- vim/vimrc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 9baddd6..7e4b7f1 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -40,6 +40,8 @@ call plug#begin(pluginDir) Plug 'tpope/vim-eunuch' Plug 'tpope/vim-repeat' Plug 'editorconfig/editorconfig-vim' + "browser/url opener + Plug 'tyru/open-browser.vim' "git Plug 'tpope/vim-fugitive' "visual @@ -68,8 +70,14 @@ let g:netrw_liststyle = 3 let g:netrw_preview = 1 let g:netrw_alto = 0 let g:netrw_usetab = 1 +let g:netrw_browsex_viewer = "xdg-open" let g:NetrwIsOpen = 0 "for toggle function +"netrw gx is borked and open-browser is way better +let g:netrw_nogx = 1 +nmap gx (openbrowser-smart-search) +vmap gx (openbrowser-smart-search) + "ale let g:ale_linters = { \ 'javascript': ['prettier', 'eslint'], @@ -239,9 +247,6 @@ command! Q q command! WQ wq command! Q1 q! -"function calls -command! -nargs=+ SearchGoogle call SearchGoogle(join([])) - "general functions "----------------- "toggle functions @@ -289,14 +294,6 @@ function! ToggleNetrw() "make netrw toggleable