1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:00:03 +08:00

Make openbrowser not lazy loaded (#3479)

This commit is contained in:
Wang Shidong 2020-04-28 15:15:58 +08:00 committed by GitHub
parent a9036c37c8
commit 7e2f9097c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 21 deletions

View File

@ -41,9 +41,7 @@ function! SpaceVim#layers#core#plugins() abort
endif
call add(plugins, ['gruvbox-community/gruvbox', {'loadconf' : 1, 'merged' : 0}])
call add(plugins, ['tyru/open-browser.vim', {
\'on_cmd' : ['OpenBrowserSmartSearch', 'OpenBrowser',
\ 'OpenBrowserSearch'],
\'on_map' : '<Plug>(openbrowser-',
\ 'merged' : 0,
\ 'loadconf' : 1,
\}])
call add(plugins, ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper',

View File

@ -1,31 +1,21 @@
"for open-browser {{{
" This is my setting.
let g:netrw_nogx = get(g:, 'netrw_nogx', 1) " disable netrw's gx mapping.
"nmap gx <Plug>(openbrowser-smart-search)
"vmap gx <Plug>(openbrowser-smart-search)
"" Open URI under cursor.
nnoremap go <Plug>(openbrowser-open)
"" Open selected URI.
vnoremap go <Plug>(openbrowser-open)
" Open URI under cursor.
nmap go <Plug>(openbrowser-open)
" Open selected URI.
vmap go <Plug>(openbrowser-open)
" Search word under cursor.
nnoremap gs <Plug>(openbrowser-search)
nmap gs <Plug>(openbrowser-search)
" Search selected word.
vnoremap gs <Plug>(openbrowser-search)
vmap gs <Plug>(openbrowser-search)
" If it looks like URI, Open URI under cursor.
" Otherwise, Search word under cursor.
nnoremap gx <Plug>(openbrowser-smart-search)
nmap gx <Plug>(openbrowser-smart-search)
" If it looks like URI, Open selected URI.
" Otherwise, Search selected word.
vnoremap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)
vnoremap gob :OpenBrowser http://www.baidu.com/s?wd=<C-R>=expand("<cword>")<cr><cr>
nnoremap gob :OpenBrowser http://www.baidu.com/s?wd=<C-R>=expand("<cword>")<cr><cr>
vnoremap gog :OpenBrowser http://www.google.com/?#newwindow=1&q=<C-R>=expand("<cword>")<cr><cr>
nnoremap gog :OpenBrowser http://www.google.com/?#newwindow=1&q=<C-R>=expand("<cword>")<cr><cr>
vnoremap goi :OpenBrowserSmartSearch http://www.iciba.com/<C-R>=expand("<cword>")<cr><cr>
nnoremap goi :OpenBrowserSmartSearch http://www.iciba.com/<C-R>=expand("<cword>")<cr><cr>
" In command-line
":OpenBrowser http://google.com/
":OpenBrowserSearch ggrks
":OpenBrowserSmartSearch http://google.com/
":OpenBrowserSmartSearch ggrks
"}}}