没有孩子健康就没有中国梦
百度 ■大清河 本市将实施大清河流域综合治理工程。
Question about the functionality that let Vim interact with shell command typically triggered Cia the :! command.
101 questions
3
votes
1
answer
283
views
Prevent output of a shell command from staying in the terminal
Suppose we did something like:
launch vim with $ vim --clean
execute a shell command :!echo "hello"
After step 1, if we exit Vim the terminal will contain:
$ vim --clean
$
However after ...
1
vote
1
answer
46
views
How to delay Vim from escaping its shell?
While editing .c files in insert mode I would like to have a mapping (e.g. <F2>) that save and compile the source file of the current buffer and run the executable corresponding to the source.
I ...
1
vote
2
answers
169
views
Sourcing node in vimrc
I'd like to use coc.nvim for completion. However, this plugin requires the JavaScript runtime Node.js. Installing Node.js adds the following code to the shell rc file, (in my case .zshrc):
export ...
0
votes
0
answers
44
views
Shell command execution and errors
While working I typically launch the EXE I'm building from neovim using a shell command to test things out. This works fine when the code works but has unexpected behavior if the code throws an ...
4
votes
1
answer
443
views
How do I open the current file in the default application using Neovim?
In the terminal, I can open a file with its default application using this command:
open example.txt
In some Linux systems, I need to use xdg-open instead of open, like this:
xdg-open example.txt
...
0
votes
1
answer
208
views
Pipe a (n)vim command to a bash command
I would like to process in a shell script the output of a neovim command such as echo &runtimepath. I found an online answer here suggesting to use:
nvim --headless --cmd 'echo &runtimepath' --...
0
votes
1
answer
176
views
Neovim not loading User-level shell (bash) profile when running on a remote server
I installed Neovim on a remote server.
Everything runs fine, except that among the very few plugins I use, Telescope does not work properly since it does not find the rg (ripgrep) command.
Two ...
1
vote
1
answer
129
views
How to show outputs of a ":!cmd" command on a new screen, rather than at the bottom of my screen?
Whenever I type a shell command, like:
:!ls
Neovim will display it at the bottom of my screen. I'd like it to, instead, clear the whole window, and display it at the top. Is that possible?
1
vote
0
answers
70
views
`term_start` fails to have `-m` option for shell like bash when using the shell path to invoke
I uses vim 9.1 shipped with bash 5.2.26(1)-release (x86_64-pc-msys) both installed by git-bash.
:h terminal-use says :term will start one "terminal emulator" and ran the job.
Then when I ...
-1
votes
2
answers
143
views
system() without shell
Is there a way to execute a host OS command directly, without spawning a shell that in turn runs the command? Preferably passing an argument list, in execvp() style? For example
" hypothetical
...
1
vote
1
answer
86
views
Getting buffer name in a shell script
I have a shell script meant to run within vim. I'd like it to insert the name of the file I'm editing but I can't figure out how to do it. Is there a way to, perhaps, call bufname() from within a ...
1
vote
1
answer
121
views
Command-line option to dump buffer to stdout upon exit? [duplicate]
Say I do the following in my shell (but where cat is actually another command that does meaningful work with stdin):
$ cat | very | long | pipeline
typing some
input lines
here...
^D
$
However, my ...
2
votes
1
answer
982
views
Using the WSL terminal with Neovim
I have Neovim installed on Windows. I use WSL for running Python and C code. So I'd like to map a key to get Neovim to run a shell command in WSL directly from the Neovim editor. But I seem to be ...
1
vote
0
answers
121
views
How to paste an item selected by external FZF in the cursor position?
I know I can paste output of external shell command with :read! ls.
But :read! ls|fzf doesn't work for me.
Is there a way for me to go from vim to shell, use fzf to select an item, then go back to vim ...
0
votes
0
answers
137
views
Shell commands in Vim vs. Neovim?
When I run a shell command in Neovim like :!ls the results come up in a little minibuffer.
In Vim, the Vim instance is temporarily closed and the results are printed to the terminal without my ...