As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [terminal]

A terminal emulator (or terminal, for short) displays characters, colours, and the cursor on the screen. Vi & Vim are run inside of a terminal, gVim is not.

99 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
2k views

Use :terminal to display file with ansi escape codes

I want to display a file in Neovim with ansi terminal escape codes interpreted. I created a file which contains ansi escape codes (only colors for now, we can think about others as a bonus): echo '\e[...
Lucas's user avatar
  • 1,579
6 votes
0 answers
746 views

Getting balloonevalterm to work (terminal version)

I'm trying to get balloonevalterm to work in the terminal version of vim, but for some reason it does not yet work. Here's my macros.vim file: function! MyBalloonExpr() let macros = { \ 'MACRO' : ...
Jens's user avatar
  • 363
6 votes
0 answers
2k views

Why does `set t_ve=' hide cursor in terminal

Vim's documentation lists t_vi as "cursor invisible" and t_ve as "cursor visible", but provides no hints on usage. Naively, I would have guessed that Vim would send the t_vi sequence when you somehow ...
BPS's user avatar
  • 308
6 votes
2 answers
556 views

Properly restore terminal title after suspending vim

I'm using Vim 7.3 on OS X Terminal version 2.6.1 (OS X version 10.11.2). If it's relevant, my version is compiled without X11. When I open a file in Vim, the terminal title bar changes to show the ...
ravron's user avatar
  • 161
5 votes
0 answers
117 views

Intermittently cannot switch from Vim terminal to other panes

I've looked at quite a few other posts and haven't found a similar problem. I've recently begun using WSL and Vim and love it. Most of the time, it works great and I use CTRL-W-h/j/k/l to navigate ...
Christina Nguyen's user avatar
5 votes
0 answers
286 views

MacOS Terminal CPU spike after exiting Vim

I'm using Vim 8.1 from homebrew on MacOs 10.14.6. Whenever I exit vim back to the terminal, the first keypress in the terminal afterward results in a beachball and CPU spike to 100%, with terminal ...
Andrew Barnett's user avatar
5 votes
0 answers
414 views

How do I make vim's terminal use my emulator's cursor shape?

I am using ibeam a.k.a vertical bar cursor right now. When I switch to terminal mode in vim, it changes the cursor shape to block - but doesn't restore it after I quit the terminal. I tried changing ...
Nishant's user avatar
  • 197
5 votes
0 answers
984 views

(Solved-ish) neovim: Don't close :terminal buffer after process exit

In Vim, when I run, for example, :terminal python3, and, when I'm done, exit python, the terminal window stays open as a readonly buffer, which I can inspect freely. In Neovim, I always get "[Process ...
LunarLambda's user avatar
5 votes
0 answers
538 views

Why are Vim 8 :term colours with gvim different from those in plain vim :term or bash?

Vim 8 :term colours in gvim happen to be different from those seen in plain vim :term or bash. How come? How does one obtain the same bash colours in gvim? EDIT: I have been reading a bit more about ...
Serge Stroobandt's user avatar
4 votes
0 answers
165 views

Pasting from vim to an ipython terminal

I have an open ipython terminal open, and I'd like to paste the visual selection to it, with prepending "%cpaste" and appending "--" This is what I came up with function! ...
Uri Goren's user avatar
  • 141
4 votes
0 answers
758 views

Wrong color-theme displayed

I recently saw this video about tmux and vim and instantly fell in love with the color theme used in the video. Luckily the presenter (Nick Nisi) provides a link in the video-description to his .vimrc ...
LastSecondsToLive's user avatar
3 votes
0 answers
176 views

Why do <S-Left> and some other keys not work in vim under tmux?

I know at least about <S-Left>, <S-Right>, <C-Left>, <C-Rigth>. But I guess there are others. I'm mostly interested in the why. Because knowing a reason often makes finding a ...
x-yuri's user avatar
  • 349
3 votes
0 answers
40 views

Mouse highlight lines issue, root cause of data deletion / messed up

[https://gofile.io/d/zA8QPs]video of vim highlight issue1 I like vim a lot, the stability is wonderful.. However there is 1 protection feature that i need to have most. I am used to use vim with both ...
purityKEF's user avatar
3 votes
0 answers
145 views

Function keys: won't work with macros (I tried a lot)

Specs: Vim 8.0 patch 500 gnome-terminal 3.18.3 on Ubuntu 16.04 running Unity Function keys in my vim slightly misbehave, however, in an annoying way: I can't completely use them in my macros. After ...
simlei's user avatar
  • 113
3 votes
0 answers
2k views

disable cursor blinking in terminal-vim

I thought this would be a 10 second google search, but no. I found a bazillion sources how to disable cursor blinking in GVim. But I would like to disable it in terminal vim. My terminal cursor is set ...
lo tolmencre's user avatar
3 votes
0 answers
760 views

How to detect terminal enter in vim8

Vim8 now has a terminal feature, how can I detect when a terminal is started? Neovim has TermOpen and TermClose autocommand events, does vim8 has an equivalent?
tracyone's user avatar
  • 345
2 votes
1 answer
158 views

Cannot open terminal ini nvim

I installed Plugin terminal using the vim-terminal plugin and try to execute :TerminalSplit bash but before the terminal open I got a warning message. Python 2 interface is not installed, using Python ...
Muhammad Fhadli's user avatar
2 votes
1 answer
612 views

Remapping Ctrl+backspace in insert mode to delete one word back

I want to bind Control+Backspace in insert mode to delete a word. I'm able to bind Control+Del in both insert and normal modes, but I can only seem to bind Control+Del in normal mode. I've checked ...
User's user avatar
  • 21
2 votes
0 answers
109 views

How can I prevent the cursor from blinking in Elvis in Xterm?

The cursor of vi (elvis) keep blinking under on a Raspberry Pi with the Rasbian distribution. It occurs with Xterm, not the xfce-terminal. On the computer or via ssh session. With the same setup (....
belmondo's user avatar
2 votes
0 answers
42 views

How does vim terminal talk to the root terminal emulator?

I use vterm to denote terminal inside vim, rterm to denote root terminal emulator in this post: rterm--->vim--->vterm Question1 All rendition is done by rterm? All escape sequence and text must ...
dedowsdi's user avatar
  • 6,058
2 votes
0 answers
39 views

Running a python command with terminal-generated signals enabled

I'm trying to do a long blocking read call inside a python script supplied with the python command: python3 << EOF import ctypes libc=ctypes.CDLL("libc.so.6") ch = ctypes.create_string_buffer(1)...
Petr Skocik's user avatar
2 votes
0 answers
713 views

Make Ctrl + arrows work inside neovim

I'm using PuTTY as SSH client and zsh as a shell. When I just connect to a host and don't run nvim, I can see that control-left/right keys work correctly and send a different key from simply pressing ...
Thunderbeef's user avatar
2 votes
0 answers
88 views

Using an iTerm color scheme inside a Vim :terminal window

My normal terminal color scheme is set via a color preset in iTerm. When I open a terminal window in Vim (:terminal) that color scheme doesn't get applied, presumably because Vim has no knowledge of ...
gmolau's user avatar
  • 121
2 votes
0 answers
780 views

vim does not redraw the screen properly when scrolling the page up or down line-by-line

I am connected to a Windows SSH server from a Linux client, on Windows I end up in a Powershell. For small,quick edits I use the official vim windows console binary. It seems to work without ...
Alex Stragies's user avatar
2 votes
0 answers
126 views

Implement "Press any key to close" in neovim terminal buffer

When running shell commands in a terminal buffer I often just want to examine the output, and then close the buffer. Let's say I call :term ls. How would I implement a simple "Press any key to close" ...
sieste's user avatar
  • 123
2 votes
0 answers
107 views

Color questions for macOS

I just got a mac and have been trying to setup Vim 8 on the built-in terminal. I am mostly having some difficulties with colors. 1) After set number, how do I change the line number colors? I tried ...
domoremath's user avatar
2 votes
0 answers
423 views

Changing background color of cursor during selection

Coming from Sublime, I find the following behaviour frustrating. When I select some text, the first (or last depending upon which way you select) character flashes between the text color and your ...
ditto's user avatar
  • 275
2 votes
0 answers
350 views

Send SIGINT to iTerm from vim

I'm using vim-rspec on a mac with macvim and iterm. I'm using this command to clear the iTerm screen and run the test in iTerm. let g:rspec_command = "clear && rspec {spec}" let g:...
Mio's user avatar
  • 433
2 votes
0 answers
67 views

How can I set tex filetypes to use plaintex solarized coloring

I use solarized for my terminal color. When I first create a new tex file and begin writing, I get the plaintex colorscheme, which I like. But once I save and reopen, I get the tex colorscheme, which ...
Kevin O'Hara's user avatar
1 vote
0 answers
27 views

term_sendkeys({buf},{keys}) move cursor to the next line if {keys} is empty

I am running gvim 9.0 on Windows 10. I am developing Python code. I am using Miniconda and I run gvim from a Miniconda CMD shell. For this reason I prepared a .bat file for starting gvim with the ...
Barzi2001's user avatar
  • 404
1 vote
0 answers
13 views

Is it possible to suppress the output of term_sendkeys()

Sometimes there are lots of lines to be sent from the editor to the terminal and therefore thethe latter scroll a lot as soon as it execute the received commands. That may not be too nice to see ...
Barzi2001's user avatar
  • 404
1 vote
2 answers
184 views

How to elegantly return to text file after executing a `:terminal` command similar to `:!`?

I want to return to the open file after I executed command with :terminal <command> First off, I am using neovim. So to get to the situation, I want to improve: follow these steps : create a ...
A.Dumas's user avatar
  • 111
1 vote
0 answers
18 views

Does the filename store in ~/.vim/view have particular meaning?

I noticed that in my ~/.vim/view folder all the file have the following format: '~=+Documents=+temp=+IADS_cwk2=+iads_cw2.tex=' '~=+tempdir=+temp=+web=+blog1.html=' '~=+t.tex=' '=+...
Jiang Yuanhao's user avatar
1 vote
0 answers
64 views

gVim ':terminal' accents don't work

I am using gVim in Xubuntu 20.04. My version is vim 8.2.4295. If I use a regular terminal, like xterm, and open Vim and then type ':terminal', I can use accents, e.g., íàê, etc. while in the vim-...
Carlos's user avatar
  • 11
1 vote
0 answers
107 views

synchronizing vim-terminal pwd and vim pwd

I'm looking for a way to synchronize the vim-terminal pwd and vim pwd. so for example in normal terminal, navigate to directory a >cd /a/ open vim terminal > vim -c ":term ++curwin" ...
Nimrod Weinberg's user avatar
1 vote
1 answer
142 views

How can I execute a non named file on terminal with NeoVIm?

Some time ago, I've made this question where I asked how to execute a file on the terminal with NeoVim... The solution I found was the following :terminal bash % . Knowing that, I made the following ...
raylight's user avatar
  • 475
1 vote
0 answers
72 views

How to pre-render a terminal buffer before displaying it in a popup

I am currently trying to write my first plugin. So this is my first attempt at vimscript. I want to display the output of a shell command in a popup window. This can easily achieved with: command Cat ...
neolith's user avatar
  • 123
1 vote
3 answers
1k views

Toggle Vim Terminal with Mapping like VS Code

I am trying to implement toggling of the Vim terminal like VS Code by doing <C-~>. But am not sure how to go about it. I find executing :term to open and to close tedious. I figured having a ...
TheGreatZab's user avatar
1 vote
0 answers
42 views

Strange code sequence <80>ýa <80>ý` recorded with -w

I was noticing when I exit Insert Mode using ctrl+[, and very quickly press ctrl+w q wanting to quit, every time I will end with ctrl+w dropped for unknown reason and a pending q. I tried starting vim ...
Masquue's user avatar
  • 81
1 vote
0 answers
493 views

error: there was a problem with the editor "vi" -- while trying to change deployment file

Facing this error error: there was a problem with the editor "vi" when trying to change a deployment file in the Kubernetes cluster (AKS) kubectl edit deploy xxxxx -o yaml upon exiting the ...
Manoj vardhan reddy's user avatar
1 vote
1 answer
366 views

Vim display won't refresh in XQuartz

I got a new laptop (macOS Big Sur 11.5.1) and vim does not work correctly in an XQuartz terminal window. Many commands that should erase characters on the screen (such as backspacing while in insert ...
Nicholas Loehr's user avatar
1 vote
0 answers
230 views

How to clear pieces of other windows/popups stuck to screen

I'm running 8.1.2269 in a terminal on Ubuntu 20.04 (with Regolith). What sometimes happens, is pieces from other windows, sometimes popups get stuck on the screen. What I mean by this is for example ...
fbence's user avatar
  • 543
1 vote
0 answers
872 views

Change colour of character under cursor?

I'd like the character under my cursor to always be black in normal mode, so it contrasts with the cursor. I'm using windows terminal, which doesn't support this directly, and vim (not gvim), so guifg ...
Matt Smith's user avatar
1 vote
0 answers
68 views

Vim process hung on background systematically

Edit #1 - I found a plausible reason. I suspect that the Vim process got stuck o background whenever I closed a terminal window with Vim still running. I've been careful to :qa Vim and 'logout' the ...
Enrique Dominguez's user avatar
1 vote
0 answers
184 views

What are the acceptable values for termwinkey?

What are the acceptable values for termwinkey? From VIM's documentation, it appears that any single keystroke (multi-byte or not) should be valid. However, setting it to <D-'> (my first choice) ...
Mark Wilbur's user avatar
1 vote
0 answers
735 views

how to make vim colorscheme work on big sur terminal?

some say I need to install iTerm because osx terminal only support 16 colors but when I check the terminal.app it use xterm-256 and it support 256 color test some say default osx doesn't support 256 ...
buncis's user avatar
  • 111
1 vote
0 answers
220 views

Vim ignores color 255, as if it doesn't support the 256 ones

Update: it works, if I set the main bg color (white) as ctermbg=231 (it was 015). So it seems that color values in Vim syntax highlight settings shouldn't be mixed: if one uses color codes from the 16 ...
Dmitry Koroliov's user avatar
1 vote
0 answers
53 views

How can I keep my cursor normal after exiting a terminal buffer?

Right now, whenever I open a terminal with :term, my cursor changes from a half-height/orange cursor to a full-height/gray cursor (depending on the emulator). When I navigate back to another window, ...
jrpear's user avatar
  • 13
1 vote
0 answers
134 views

Vim outputting weird characters and becoming unresponsive

I'm using Vim inside gnome-terminal. Every so often, typically after coming back to a file opened in a vim session in another terminal tab after editing some other file opened in some other vim ...
Daniel's user avatar
  • 181
1 vote
0 answers
627 views

termguicolors vs :terminal: incorrect colors being displayed

I'm having trouble with the colors of the the terminal windown opened by :terminal. I use a theme called PolarIce from themer.dev. This work perfectly on KiTTY, Gnome Terminal and pretty much any ...
Henrique Barcelos's user avatar