Skip to main content

Questions tagged [terminal-buffer]

A terminal emulator within vim, eg created by :terminal or term_start()

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 ...
Barzi2001's user avatar
  • 650
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 ...
ElRudi's user avatar
  • 191
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 ...
ElRudi's user avatar
  • 191
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 ...
Barzi2001's user avatar
  • 650
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(...
Barzi2001's user avatar
  • 650
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 ...
T_T's user avatar
  • 189
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?
leeand00's user avatar
  • 3,621
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. ...
Patrick O'Brien's user avatar
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 ...
leeand00's user avatar
  • 3,621
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", "...
robertspierre's user avatar
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 ...
robertspierre's user avatar
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?
sebelk's user avatar
  • 335
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 :...
T_T's user avatar
  • 189
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 ...
Barzi2001's user avatar
  • 650
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 ...
user22476690's user avatar

15 30 50 per page
1
2 3 4 5
11