Closed zchee closed 7 years ago
@zchee Hmm, it seems to work on my environment with neovim.
C:\Users\%USERNAME%\AppData\Local\nvim
for %USERPROFILE%\vimfiles
%USERPROFILE%\vimfiles\init.vim
with the following content:set rtp+=$HOME/vimfiles/bundle/open-browser.vim
I have the same problem. I use neovim on macos sierra and Plug for Plugin-Control.
Plug 'tyru/open-browser.vim'
I use the settings
let g:netrw_nogx = 1 " disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)
let g:openbrowser_default_search = 'duckduckgo'
and I get the error message
opening 'http://duckduckgo.com/?q=joonty%2Fvdebug' ...
open-browser failed to open URI...
v:exception = Vim(throw):E730: using List as a String
v:throwpoint = function openbrowser#_keymapping_smart_search[13]..openbrowser#search[16]..openbrowser#open[60]..openbrowser#__open_browser__[43]..openbrowser#__system__[1]..<SNR>147_system, line 53
open-browser doesn't know how to open 'http://duckduckgo.com/?q=joonty%2Fvdebug'.
@tomsteg oh, I forgot g:netrw_nogx
, thanks.
but I can not reproduce both...
my whole init.vim
is:
let g:netrw_nogx = 1 " disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)
let g:openbrowser_default_search = 'duckduckgo'
set rtp+=$HOME/vimfiles/bundle/open-browser.vim
and the OS is Windows 10.
I can reproduce the problem in my environment.
opening 'http://9p.io/sys/doc/asm.html' ...
open-browser failed to open URI...
v:exception = Vim(throw):E730: using List as a String
v:throwpoint = function openbrowser#_keymapping_smart_search[1]..openbrowser#_keymapping_open[6]..openbrowser#open[60]..openbrowser#__open_browser__[43]..openbrowser#__system__[1]..<SNR>203_system, line 53
open-browser doesn't know how to open 'http://9p.io/sys/doc/asm.html'.
Press ENTER or type command to continue
app-editors/neovim-0.2.0::gentoo
:version
shows the following:
NVIM v0.2.0
Build type: RelWithDebInfo
Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wall -Wextra -peda
ntic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_
SOURCE -I/tmp/portage/app-editors/neovim-0.2.0/work/neovim-0.2.0_build/config -I/tmp/portage/app-editors/neovim-0.2.0/work/neovim-0.2.0/src -I/usr/include
-I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/tmp/portage/app-editors/neovim-0.2.0/work/neovim-0.2.0_build
/src/nvim/auto -I/tmp/portage/app-editors/neovim-0.2.0/work/neovim-0.2.0_build/include
Compiled by root@home
Optional features included (+) or not (-): +acl +iconv +jemalloc +tui For differences from Vim, see :help vim-differences
system vimrc file: "/etc/vim/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Press ENTER or type command to continue
My whole init.vim can be downloaded here: https://github.com/tomsteg/dotfiles/blob/master/config/nvim/init.vim
and my version is
NVIM v0.2.1-7-g13ec5214
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY
_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstr
ict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARA
TIONS -I/tmp/neovim-20170502-61364-7ej51/build/config -I/tmp/neovim-20170502-61364-7ej51/src -I/usr/local/inc
lude -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/opt/gettext/include -I/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOS
X.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include -I/tmp/neovim-20170502-61364-7ej51/build/src/nvim/auto
-I/tmp/neovim-20170502-61364-7ej51/build/include
in vim with almost the same settings it works
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 16 2017 17:38:30)
MacOS X (unix) version
Included patches: 1-717
I will test it later.
https://github.com/tyru/open-browser.vim/blob/master/autoload/vital/_openbrowser/Process.vim#L154
It must be string(a:str)
.
@mattn @Shougo Thanks! I will create a fixed branch for it.
turns out that this is really just hiding a bug introduced by https://github.com/josephholsten/open-browser.vim/commit/7e336cb5c49a2c333cd30810fe5dc2d49801b67d#diff-ba9e646c7d0ac2e1814a7ff377e7b838R152
Looks like we'll need to disable background for nvim.
Workaround for mac users:
let g:openbrowser_browser_commands = [
\ {"name": "open",
\ "args": ["{browser}", "{uri}"],
\ "background": 0}
\]
longterm, the Right Way is https://github.com/vim-jp/vital.vim/issues/533
The workaround for macusers works for me. Thanks a lot.
Fixed in #100. Thanks a lot!! >@zchee @tomsteg @yuttie @mattn @Shougo @josephholsten
@tyru Wow! Thanks!! I'll test it!
I'd hitting below error on 2ed22fe722e745e1e2f4b11c462ba457887908f4. Sorry, I do not debug and test yet(testing with
vim
, git bisect or etc), but I wanted to send it out early and see what you thought @tyru.Ran
<Plug>(openbrowser-smart-search)
on 'http://9p.io/sys/doc/asm.html'. Occur onNVIM v0.2.1-444-gc07e144c8
.