Questions tagged [external-command]

Questions about calling external (shell) commands from within Vi or Vim.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
150 views

How to utilize the Cygwin ack tool from Vim 7.4?

I used Cygwin perl and cpan to download, compile and test a working ack, struggling with a clean working model. Primarily using win32 Vim, it seems like I can only utilize the Cygwin ack if I change ...
2
votes
0answers
40 views

Adjust terminal size using a system call from within Vim

All, I have a little function I'm trying to fix. I'd like to change my terminal Vim window size using the ASCII escape sequence \e[8;40;130t so that my writing window size stays the same when I use a ...
2
votes
0answers
97 views

Use external commands within venv virtual environment

Same question as Use Vim with virtualenv, except for these differences: I'm using bash, not zsh using venv, not virtualenv or virtualenvwrapper I have a keybinding to run the current buffer as a ...
2
votes
0answers
68 views

Alter how oldfiles are displayed

Is it possible to "preprocess" the oldfiles list so that it's easier to navigate visually? As far as I can tell, the contents of the oldfiles list are presented as ordinary absolute paths, but with ...
1
vote
0answers
55 views

How do I prevent Vim from showing my terminal when executing an external command?

I'm running a long, blocking command using execute in Vim as part of a script. Vim shows the underlying terminal while executing the command, which is pretty distracting. function! DoSomething(query) ...
1
vote
0answers
101 views

How to make vim shell command wait for keypress?

I have assigned the macro !clear && gcc % && ./a.out to the key 'r'. So when I press '@r', I expect vim to: Clear the shell compile the current C file run the output The problem is ...
1
vote
0answers
169 views

What encoding does :! use?

I'd like low-level control over exactly what bytes I send and receive from a process spawned from some vimscript. What encoding is used for communications with commands started with :!foo? Can I ...
1
vote
0answers
58 views

How does one automatically run a function when any error message appears?

I would like to play sounds for accessibility reasons. Do I need to patch and compile (neo)vim to provide some sort of OnError autocmd? edit: more generically I'm looking for a way to hook into ...
1
vote
0answers
53 views

Reading in content from an external command with utf-8

I've got the following vim script to show a perldoc or per man page into a new tab and then rewrap it the text so it's more readable (I have a very wide monitor). nnoremap K :execute "tabnew <bar&...
1
vote
0answers
34 views

When defining a command which uses an external tool (like :perldo), how do I cancel upon error?

I created a Vim command which will invoke perl6 as a filter, analogous to :perldo, though of course it isn't as powerful as :perldo. (Being an external command rather than an internal interpreter, ...
1
vote
0answers
167 views

File emptied when command not found

Given this command: ex -sc '%!alfa' -cx file I get this result: sh: alfa: command not found which is to be expected. However an unintended side effect of this is that the file is emptied and saved....
0
votes
0answers
99 views

How does (neo)vim set $PATH for system(['command'])

When I want to call an external program, I have the option of spawning a shell or not. system('my command') will spawn a shell (executing your .bashrc/etc and all it seems). system(['my command']) ...
0
votes
0answers
25 views

error output when using commands proxied via WSL (asyncrun plugin)

I have wsl - ubuntu installed under Windows 10. Some ubuntu's commands are proxied to use in cmd by create .bat files and add them to PATH environment of windows10, pattern like following: @echo off ...