Questions tagged [terminal-buffer]
A terminal emulator within vim, eg created by :terminal or term_start()
154
questions
1
vote
0
answers
27
views
How to distinguish between two different terminal exit statuses?
Consider the following example:
term_start(myprogram, {exit_cb: MyExitHandler})
def MyExitHandler()
if exit_status != 0
echom "Error!"
endif
enddef
The function MyExitHandler is ...
0
votes
1
answer
32
views
How can I show inline IPython plots?
I want to plot matplotlib figures inline in ipython in the (wezterm) terminal.
In the terminal proper this works:
However, in Neovim, it does not:
In this question I was told it's not possible for a ...
4
votes
1
answer
158
views
Show sixel images inside Vim terminal
I'm trying to get the img2sixel function to work from a terminal inside of the vim.
Outside of vim, the image ("Hey") appears inline as expected and wanted:
However, this does not work from ...
0
votes
0
answers
25
views
Is there an equivalent of system() for capturing commands outputs or programs running in terminal buffers?
I am aware that system() capture the output of shell commands.
I am wondering if there is a similar command for capturing the output of commands sent to other type of interpreters running in terminal ...
0
votes
1
answer
24
views
How to unlist a terminal buffer opened in a popup window?
I want to unlist a terminal buffer that I open in a popup window.
Here are my attempts:
var buf_no = term_start(&shell, {'term_name': 'foo', 'hidden': 1, 'term_finish': 'close'})
setbufvar(bufname(...
1
vote
1
answer
32
views
Ctrl+w Shift+n after :term does not start a normal window
In Vim, you can start the terminal by :term, and Ctrl+WShift+N allows you to treat the terminal window as a normal Vim window. I tried the same in NeoVim, but it does not work. Is it an expected ...
1
vote
0
answers
34
views
Is there an equivalent to tmux clear-history in vimterminal?
In tmux there is a command which clears any additional history that may have shown up in the buffer.
Does vim have a similar function for clearing out a vim terminal?
0
votes
2
answers
28
views
How to split terminal and start in the other buffer?
I currently have the following abbreviation:
cnoreabbrev tright vert rightb terminal zsh
With this, :tright in normal mode will open a terminal buffer on the right side of the screen, which is great.
...
1
vote
2
answers
90
views
Press CTRL+W in a vimterminal programatically from vimscript?
Say my cursor is in a Vim terminal.
Normally I press Ctrl w Ctrl w to flip to from the Vim terminal to my buffer.
How do I do that with vimscript?
I tried the whole CTRL+SHIFT+V thing when writing the ...
2
votes
1
answer
91
views
What is set_opfunc?
I'm configuring toggleterm.nvim, and in particular I'm putting this keybinding in my config file, as suggested by the plugin author here:
-- Send motion to terminal
vim.keymap.set("n", "...
0
votes
0
answers
37
views
Where is my terminal?
I installed iron.nvim.
I open two Python files with nvim m1.py m2.py.
When I send over some lines to the REPL and then close the first buffer with :bd, I'm left with the terminal window.
I go to the ...
3
votes
1
answer
207
views
What are the differences between built-in terminals in Neovim and Vim?
AFAIK the main difference is that Vim has this :terminal feature as optional. Could you mention another other important differences?
1
vote
1
answer
54
views
Errors in `term_sendkeys()`
:h terminal-to-job shows the following example of term_sendkeys()
call term_sendkeys(buf, "ls *.java\<CR>")
Following this, I added the line to .vimrc:
nnoremap <Leader>test :...
0
votes
0
answers
199
views
How to automatically close a terminal popup window if a python script run in it didn't return any error?
I am wondering if there is a way to automatically close a popup window running a terminal if the execution of the last program didn't report any error and to keep it open if the execution of the last ...
2
votes
5
answers
143
views
Mapping with termwinkey that accepts a v:count
In Vim, typically, prefixing a command repeats the action multiple times.
This is not the case for gt, which goes to the next tabpage. Whereas gt goes to the next tabpage, 2gt always goes to the ...