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.

104 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
1 answer
3k 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,599
6 votes
0 answers
787 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
3 answers
645 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
143 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
310 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
443 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
1k 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
542 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
207 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
764 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
228 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
41 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
158 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
782 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
0 answers
78 views

Delay When Closing `:terminal` Window

Long story, short.... Everything's fine on my MacBook, but I have an issue in Neovim 0.9.1 on Windows 10. I see this behavior when starting nvim from the usual shells - Command Prompt (cmd.exe), ...
Phil R's user avatar
  • 471
2 votes
1 answer
409 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
907 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
44 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,188
2 votes
0 answers
41 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
857 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
95 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
815 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
146 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
113 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
441 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
356 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
68 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
1 answer
44 views

Text shifts one character to the left when moving upwards

When I move the cursor upwards, the whole line (including the number) shifts one character to the left. The GIF explains it the best. I'm using Neovim installed in Windows but opened through WSL ...
vvenk's user avatar
  • 33
1 vote
2 answers
71 views

How can I make Neovim kill ongoing processes when I quit?

I'm setting up a nice development environment in Neovim. If I have a Docker container running inside a terminal in Neovim, I want that command to exit when I quit Neovim with :qall. Currently, I can ...
tsvallender's user avatar
1 vote
0 answers
58 views

any idea how to change default location of .vimrc for droidvim on unrooted android ver.10?

I wonder if it is possible/how to change the .vimrc location to a different location (eg: my sync folder), so that i can back it up often and easily to manjaro pc using ssh or rsync. The original ...
andrew_ysk's user avatar
1 vote
0 answers
43 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
  • 481
1 vote
0 answers
20 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
  • 481
1 vote
2 answers
332 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
77 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
170 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
182 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
  • 525
1 vote
0 answers
92 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
  • 133
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
46 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
1k 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
429 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
251 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
  • 603
1 vote
0 answers
1k 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
98 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
1 answer
259 views

How to pass custom arguments to the shell invoked by :terminal?

I would like to specify the startup command to run on the :terminal shell. E.g. bash -c ls. The shell can be specified with set shell=bash, but how to specify the arguments? In another use case, I ...
tejasvi88's user avatar
  • 440
1 vote
0 answers
215 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
826 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
117 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