xolox / vim-shell Goto Github PK
View Code? Open in Web Editor NEWImproved integration between Vim and its environment (fullscreen, open URL, background command execution)
Home Page: http://peterodding.com/code/vim/shell/
Improved integration between Vim and its environment (fullscreen, open URL, background command execution)
Home Page: http://peterodding.com/code/vim/shell/
When Vim is not in fullscreen and :Open
is executed the external application (file browser, web browser) opens in front of Vim and get the focus - which I believe is the expected behavior, as you'd normally use the application that was just started.
But if :Fullscreen
is executed before :Open
then the external application opens but Vim retains the focus. Is there an option to make the external application to get the focus?
I am reading a .txt file in Vim 7.4, on Windows 7.
When I F-6 on a .txt or .text file URI in Vim, the file opens in NotePad.
file:///C:/Users/wolf/Documents/a.txt
file:///C:/Users/wolf/Documents/b.text
When I click on a.txt or b.text from Explorer, the file opens in Vim. The irony :)
From Explorer > Properties > Opens with: Vi Improved - A Text Editor.
Is there a way to make vim-shell open .txt files in Vim?
vim-shell opens these file types as expected:
.doc
.odt
.cvs
.bmp
vim-shell is unresponsive when I F-6 on these file types:
.markdown (Explorer opens it in Vim)
vim-shell opens these file types in NotePad:
.txt (Explorer opens it in Vim)
.text (Explorer opens it in Vim)
Commit 49bd3bf (Merge branch 'master' into dev) turned the plugin unusable for me. Currently I'm using previous commit (I've git bisect
the offending commit).
Here's the error log when trying :Fullscreen
(sorry, I tried hard to disable VIM translation, didn't find how):
Erro detectado ao processar /home/francisco/.vim/addons/github-xolox-vim-shell/autoload/xolox/shell.vim:
linha 348:
E117: Função desconhecida: xolox#misc#os#is_win
E15: Expressão inválida: xolox#misc#os#is_win()
Erro detectado ao processar function xolox#shell#fullscreen:
linha 7:
E117: Função desconhecida: xolox#misc#os#is_win
E15: Expressão inválida: xolox#misc#os#is_win()
Erro detectado ao processar function xolox#shell#fullscreen..xolox#shell#maximize:
linha 7:
E117: Função desconhecida: xolox#misc#option#get
E15: Expressão inválida: xolox#misc#option#get('shell_fullscreen_items', 'mTe')
linha 8:
E121: Variável indefinida: fullscreen_items
E116: Argumentos inválidos para a função split(fullscreen_items, '.\zs')
E15: Expressão inválida: split(fullscreen_items, '.\zs')
linha 14:
E121: Variável indefinida: fullscreen_items
E15: Expressão inválida: fullscreen_items =~# 'e' && &stal != 0
Erro detectado ao processar function xolox#shell#fullscreen:
linha 47:
E117: Função desconhecida: xolox#misc#msg#warn
In truth, errors start to happen all the time, not just when executing vim-shell commands.
I am using both of your plugins vim-shell and vim-misc, great work!
You put the help text of 'xolox#misc#os#exec()' both in vim-shell/doc/shell.txt and vim-misc/doc/misc.txt, which will incur 'neobundle' to complain of 'duplicated helptags', becuase the neobundle, I guess, adopts a strategy that is to collect all plugins' doc files under its charge to a centralized place (i.e. .vim/neobundle/.neobundle/doc) for sake of performance.
I use vim-shell to open links to other vim files.
opens the vim files in a new instance of Vim.
Is there a way to make open the vim files in the current window?
I am using vim 7.4 on Linux.
Thank you for writing vim-shell, the fastest way to open links.
platform is win7, 64b, using vim7.4 32b
All was working with an older version, I have also updated vim-misc. Not sure what else do I need to do?
thanks!
In a dual monitor setup under Windows 7 64bit (main left, secondary to the right) I can go without problem in/out fullscreen mode by pressing F11 (default) and vim fills one screen as intended.
When I am already in fullscreen mode and press Ctrl+F11 to "show" menu bar, the window grows to the right on the next screen. When I press Ctrl+F11 again, the menu bar disappears again and the windows grows again more to the right.
Going out and again in normal fullscreen (F11), window size is corrected to "one screen fullscreen".
Stretching happens only to the right side. Tested it with fullscreen on secondary monitor to the right.
Hello,
I can't pinpoint when it started to happen but it seems xolox#shell#highlight_urls()
is slowing down Vim.
Vim would hang for a while and more often than not disable syntax highlighting because redraw time its the timemout.
When it happens and I press CTRL+C
, I get:
Error detected while processing function xolox#shell#highlight_urls:
line 14:
E409: Unknown group name: .*String.*
E475: Invalid argument: CommentEmail /\<\w[^@ \t\r<>]*\w@\w[^@ \t\r<>]\+\w\>/ contained containedin=.*Comment.*,.*String.*
Interrupt: Press ENTER or type command to continue
I'm using
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 4 2020 22:40:59)
macOS version
Included patches: 1-350
Compiled by Homebrew
And c19945c
I have the following line in my c.vim.
set makeprg=make\ %:r
So when I type make at vim command line when editting filename.c, it will run make filename.
This does not with MakeWithShell though. I know I can change it to
let &l:makeprg = 'make '.expand('%:r')
but the first configuration is just more elegant.
Hi Peter,
Thanks for your work with Vim plugins!!
I 'm still starting using them (just moving from open.vim to shell.vim), but I'm impressed with the great ideas of easytags and session.
I've started using shell.vim due to the DLL in order to avoid the command prompt windows.
The Fullscreen
command is also very nice. I didn't intended to use it, but I've changed my mind after I tried it for some time. Unfortunately it is conflicting with some silent make
commands present on some mappings.
I've some mappings to execute tasks such as [build], [clean], [clean+build] and [build+run] that are based on silent make
. The problem is that when gVim is fullscreen and silent make
is executed it leaves fullscreen for a while, as a command prompt get the window focus. This also make the start menu bar to hide gVim statusline
, which is used to display some status messages.
I was wondering if it is possible to use xolox#shell#execute()
to run the make
command, but it isn't easy to see how this can be accomplished. I was thinking about using 'makeprg'
and 'shell'
options, but as 'shell'
is already used by xolox#shell#execute()
this probably won't work.
Have you already went through this issue, or have any ideas?
Hi there,
if I try to open https://github.com/vim-scripts/SuperTab-continued. with pressing it will fire up the browser with the URL https://github.com/vim-scripts/SuperTab-continued - so it doesn't parse the dot at the end of the file.
Hi,
I read through the documentation of the plugin how I can customize which Browser is called when I press F6 to open a link. The default browser is Firefox and I want to use Chrome instead. Even the documentation of your open.vim plugin (http://peterodding.com/code/vim/open-associated-programs/) says:
that the xolox#open#url() function takes a string argument containing a URL or e-mail address and opens it in your favorite or >the best available web browser / email client.
On line 61 of open.vim https://github.com/xolox/vim-open-associated-programs/blob/master/open.vim you are calling
call xolox#open#file(url, 'firefox', 'google-chrome')
Is it possible to pass the arguments in this function with a predefined variable so that the user can put the option into the .vimrc
I'm running gvim 7.3 with vim-shell and vim-misc on Windows 7. The :Open
command works great for urls without query strings, but I'd like to create mappings that yank the current word and start a search query on duckduckgo and jquery. They use ?s= and ?q= to start queries.
Here's a screenshot of my mapping and the error I'm getting with Vim:
Here's the mapping in text format:
"Search JQuery API Docs online against the word under cursor
nnoremap <Leader>jqa "zyw:exec "Open http://api.jquery.com/?s=".@z<CR>
"Jump start a DuckDuckGo Search
nnoremap <Leader>ddg :Open http://duckduckgo.com/?q=
Is it possible to get :Open
to recognize these as urls?
Hi
I use vundle to manage my plugins and clone vim-shell and vim-easytags in seperate folds in "vimfiles/", then vim tell me undefined function "xolox#misc#option#get". When I comment "Bundle vim-shell", this error message won't appear.
And then I found "...\vim-shell\autoload\xolox\misc\option.vim" has no funtion "get".
Would you please update that?
I use the following in vimrc, seems not work:
au VimEnter * :Fullscreen
au BufEnter *.tex :Fullscreen
Any solutions?
I'm using netrw.vim
on a windows 7 machine and there is a console flash from vimrun when the file is saved. Is there a way to use netrw.vim
to suppress this?
Thanks!
Hey Peter,
Great work on all Vim plug-ins, really enjoying vim-session and vim-easytags. I have an issue with shell.dll from vim-shell on Windows 7 and the 64-bit build of Vim from Google Code. I am not sure how exactly to debug it and I've tried everything I can think of (with my limited Vimscript abilities). All I get to is a very cryptic message: E364: Library call failed
. I imagine it could be caused by the 32-bit nature of the DLL and Vim being entirely 64-bit?
Have you tried the .dll on 64-bit installs (not just 64-bit OS, but rather 64-bit Vim)? I could try installing the Windows SDK and re-compiling the DLL to target x64, but before I go ahead and do that I wanted to pick your brain.
Hello Peter,
I've just noticed that :MakeWithShell
doesn't works very well when compiling C# code.
Using compiler msbuild (from https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/q644Mx3ehYM) and :make
on files with errors, followed by :cwindow
does open the quickfix window. Replacing make with :MakeWithShell
doesn't opens the quickfix
, similar to sucessful compilation result.
Is it possible to change :MakeWithShell
so it works like :make
on this case?
After upgrading to vim-shell 0.12.7, I get the following error on GVIM startup on Windows/x64, caused by the easytags plugin:
Error detected while processing function <SNR>259_InitEasyTags..<SNR>259_CheckCtags..xolox#misc#os#exec..xolox#shell#execute_with_dll:
line 12:
E605: Exception not caught: execute_synchronous('C:\Windows\system32\cmd.exe /c (ctags --version) 1>"D:\TEMP\VIA8873.tmp" 2>"D:\TEMP\VIB8874.tmp"') failed! (output: exit_cod�)
(The last character of the output is U+0080 PADDING CHARACTER!)
This can then be reproduced with other calls to xolox#misc#os#exec()
. The problem does not occur with a 32-bit GVIM on the same system; downgrading to the previous commit of shell-x64.dll
also fixes the problem, so the issue seems to be related to the latest build of that DLL.
I'm on Windows 7 Ultimate SP1 English 64-bit, and can reproduce this on 2 different systems, and using both a self-compiled Vim 7.3.823/x64 as well as with the old 7.3.000 64-bit build provided by George Reilly.
Please let me know if you need any other information. Thanks!
When a session is save the full screen mode is persisted. But after reloading the session, exiting fullscreen shows a tabline that is corrupted. Entering and exiting fullscreen mode doesn't restores the tabline to its normal graphics.
Hi,
Thanks for creating this convenient vim plugin!
I'm trying to switch to vim-shell
from vim-conque
.
In vim-conque
., I normally visual select text and transfer and run them into a Python
or Scheme
shell with a shortcut <F9>
.
In the documentation of vim-shell
, I noticed VimShellSendString
and VimShellSendBuffer
.
Then I should create a shortcut with VimShellSendString
to send text to a shell, right ?
How do you configure and use vim-shell
?
Thanks in advance.
Hongying
I use Vim to write prose and notes; Opening links from markdown files is a huge convenience.
So I installed vim-shell on Windows 7 with Vundle and Vim 7.4.
But vim-shell is not working. Maybe I did something wrong on the install.
This is in my _vimrc file:
Plugin 'file:///C:/Users/wolf/vimfiles/vim-misc/autoload/xolox/misc.vim'
Plugin 'file:///C:/Users/wolf/vimfiles/shell/autoload/xolox/shell.vim'
Do I have it set up right?
Thank you.
I'm looking to support Vim for https://github.com/sebdah/vim-delve. It currently only supports Neovim, because of the use of the :terminal
feature in Neovim.
I'd need to call vim-shell and have it run a command (not in the background). See what I'm doing for Neovim here https://github.com/sebdah/vim-delve/blob/master/plugin/delve.vim#L201. I couldn't find a way to do that in vim-shell, am I missing something or is it not yet supported?
If I set shellslash in my vimrc for both linux and windows environments (I like uniform front slashes everywhere, even windows). I get this error when starting up with easytags on windows:
shell.vim 0.9.13: Failed to get output of command "C:\Windows\system32\cm
d.exe /c ctags --version > 'C:/Users/walesi/AppData/Local/Temp/VIA9EB2.tm
p' 2>&1"! at function 49_InitEasyTags..49_CheckCtags..xolox#sh
ell#execute, line 32
easytags.vim 2.7: Plug-in not loaded because Exuberant Ctags isn't installed!
Please download & install Exuberant Ctags from http://ctags.sf.net
It all comes down to the part in autoload/xolox/shell.vim with the shellescape()
105 if a:synchronous
106 let tempout = tempname()
107 let cmd .= ' > ' . shellescape(tempout) . ' 2>&1'
108 endif
The double quotes from the shellescape() are what make the temp file access impossible in the execute command. I can fix the problem by removing the shellescape, but I don't know if that is the only way
Thanks for all your work on the vim plugins, really enjoying the full screen in windows.
One thing I often do in other editors is jump from a small window to fullscreen to get a closer look at some code, and then toggle back to the smaller window when done.. The current default behaviour of fullscreen() leaves the window maximised after toggling full screen off. I've attached a patch that makes the function save the window size and position the same way it saves the guioptions.
I'm new to vim, so apologies if you've covered this already (or if it's even in vim proper somewhere). Don't know if this will work on anything other than gVim under windows.. I'm just hacking :)
--- shell.vim.bak Fri Dec 17 12:58:48 2010
+++ shell.vim Fri Dec 17 12:53:27 2010
@@ -142,6 +142,9 @@
" and tab line. Remember which components were actually hidden and should be
" restored when leaving full-screen later.
if !s:fullscreen_enabled
+ let s:olines = &lines
+ let s:ocolumns = &columns
+ let s:opos = getwinposx() . ' ' . getwinposy()
let s:go_toggled = ''
for item in split(g:shell_fullscreen_items, '.\zs')
if &go =~# item
@@ -184,6 +187,9 @@
let &stal = s:stal_save
unlet s:stal_save
endif
+ let &lines = s:olines
+ let &columns = s:ocolumns
+ exec ':winpos ' . s:opos
endif
" Toggle the boolean status returned by xolox#shell#is_fullscreen().
while in full screen, type
:set guioptions += m
F11(to exit full screen)
F11(to enter full screen again)
:set guioptions -=m
and white border on the left will be gone
Is it possible to add an option so that :Fullscreen command will not make the maximized Vim window stay "allways on top" ?
It would be nice to be able to Alt+Tab to other windows, even if my Vim window is in full-screen mode.
I believe this should also solve issue #9 Open&Fullscreen focus
Is there an option to avoid messages being displayed when going to fullscreen, when I go to fullscreen there's a long message which I'd prefer to avoid if possible.
when it is not in full screen, Windows+Left etc work right, but they stop working in full screen mode
Following the same idea of :MakeWithShell
and :LMakeWithShell
, is it possible to create :GrepWithShell
?
This would make possible to integrate :Fullscreen
with ack.vim.
I'm running into a problem where the Open command isn't getting the correct URL. I think the problem is that the URLs for message links have a % sign in them.
The link should be:
message://%3cCAC1F077.18CFC%[email protected]%3e
Calling :Open on this tells mail to open:
message://%253cCAC1F077.18CFC%[email protected]%253e
Mail doesn't know how to open this due to the spurious %25's.
Hi
first of all thanks for the great plugin!
I am wondering how I could open a visually selected path / file / url ... with Open
(or the underlying function). On Windows I often have a path like "C:\some directory\with a file.docx"
. So the <F6>
/ the Open
command does not work because of the spaces. I would love to be able to visually select it and to open it with e.g. <F6>
(copy and pasting it into the command window with Open
works).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.