Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using List as a String error(on Neovim) #98

Closed
zchee opened this issue Jul 13, 2017 · 15 comments
Closed

using List as a String error(on Neovim) #98

zchee opened this issue Jul 13, 2017 · 15 comments

Comments

@zchee
Copy link

zchee commented Jul 13, 2017

I'd hitting below error on 2ed22fe.
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 on NVIM v0.2.1-444-gc07e144c8.

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>211_system, line 53
open-browser doesn't know how to open 'http://9p.io/sys/doc/asm.html'.
@tyru
Copy link
Owner

tyru commented Jul 14, 2017

@zchee Hmm, it seems to work on my environment with neovim.

  1. Downloaded nvim-win64.zip from https://github.com/neovim/neovim/wiki/Installing-Neovim
  2. Create junction file C:\Users\%USERNAME%\AppData\Local\nvim for %USERPROFILE%\vimfiles
  3. Create %USERPROFILE%\vimfiles\init.vim with the following content:
set rtp+=$HOME/vimfiles/bundle/open-browser.vim

@tomsteg
Copy link

tomsteg commented Jul 17, 2017

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'.

@tyru
Copy link
Owner

tyru commented Jul 18, 2017

@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.

@yuttie
Copy link

yuttie commented Jul 18, 2017

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

Environment

  • Gentoo Linux
  • Neovim is installed from the official package 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

@tomsteg
Copy link

tomsteg commented Jul 18, 2017

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

@tomsteg
Copy link

tomsteg commented Jul 18, 2017

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

@Shougo
Copy link

Shougo commented Jul 19, 2017

I will test it later.

@Shougo
Copy link

Shougo commented Jul 19, 2017

https://github.com/tyru/open-browser.vim/blob/master/autoload/vital/_openbrowser/Process.vim#L154

It must be string(a:str).

@tyru
Copy link
Owner

tyru commented Jul 19, 2017

@mattn @Shougo Thanks! I will create a fixed branch for it.

josephholsten added a commit to josephholsten/open-browser.vim that referenced this issue Jul 21, 2017
@josephholsten
Copy link

turns out that this is really just hiding a bug introduced by josephholsten@7e336cb#diff-ba9e646c7d0ac2e1814a7ff377e7b838R152

Looks like we'll need to disable background for nvim.

@josephholsten
Copy link

josephholsten commented Jul 21, 2017

Workaround for mac users:

let g:openbrowser_browser_commands = [
    \ {"name": "open",
    \  "args": ["{browser}", "{uri}"],
    \  "background": 0}
    \]

@josephholsten
Copy link

longterm, the Right Way is vim-jp/vital.vim#533

@tomsteg
Copy link

tomsteg commented Jul 22, 2017

The workaround for macusers works for me. Thanks a lot.

tyru added a commit that referenced this issue Jul 22, 2017
tyru added a commit that referenced this issue Jul 22, 2017
Fix: using List as a String error(on Neovim) (ref #98, #99)
@tyru
Copy link
Owner

tyru commented Jul 22, 2017

Fixed in #100.
Thanks a lot!! >@zchee @tomsteg @yuttie @mattn @Shougo @josephholsten

@tyru tyru closed this as completed Jul 22, 2017
@zchee
Copy link
Author

zchee commented Jul 22, 2017

@tyru Wow! Thanks!!
I'll test it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants