Can't open/output the file in the browser on Windows
bohrshaw opened this issue · comments
After this commit: tyru/open-browser.vim@616949c, I can no longer output the file in the browser.
Some incompatibilities must be introduced in that commit. Likely, the file URL format is no longer recognizable by open-browser. But I failed to inspect what's wrong.
Same issue here. Did some research on 5e3d1c9 and tyru/open-browser.vim@6cb4bd3
.vimrc
set nocompatible
filetype plugin indent on
syntax enable
set runtimepath+=~/.vim/bundle/repos/github.com/thinca/vim-quickrun
set runtimepath+=~/.vim/bundle/repos/github.com/tyru/open-browser.vim
let g:quickrun_config = {
\ '_':
\ {
\ 'outputter': 'multi',
\ 'outputter/multi/targets': ['buffer', 'quickfix'],
\ },
\ 'vim':
\ {
\ 'outputter': 'browser',
\ 'runner': 'vimscript',
\ },
\ }
test.vim
" https://github.com/thinca/vim-quickrun
echo 'foo'
Results
:QuickRun
Does nothing.
:QuickRun
without outputter
setting
Runs the code, opens the output buffer and the quickfix windows too with the
content foo
- QuickRun works.
Pressing gx
on the url
Opens the site in the brower - Open-Browser works.
:call openbrowser#open("https://reddit.com")
Opens the site in the browser -
https://github.com/thinca/vim-quickrun/blob/master/autoload/quickrun/outputter/browser.vim#L32
(call openbrowser#open(self._file)
)
should work.
Watching self._file
Echoing the contents of self._file
before
https://github.com/thinca/vim-quickrun/blob/master/autoload/quickrun/outputter/browser.vim#L30
(try
)
when running on the test file (echomsg self._file
). The output is
C:\Users\nyolcas\AppData\Local\Temp\VIBF2B9.tmp.html
which is an existing
file with the right content.
Conclusion
Everything seems to works, but the output is not opened in the browser.
I will look for the commit 616949c if I have some time.
@bohrshaw @BimbaLaszlo Thanks for report & investigation.
This is the problem of open-browser.vim .
Now I fixed this issue. please check.
tyru/open-browser.vim#85
Works fine for me. Thanks (for the plugin itself too)!