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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
231 views

Mapping Shift-Up & Shift-Down, mintty keycodes

I am trying to create some keybinds (in my .vimrc) for vim, used from Cygwin's mintty. I have found and extended some code for the .vimrc that translates the keycodes used by mintty (https://github....
LaReine's user avatar
  • 13
0 votes
1 answer
515 views

Whats the benefit of using :term inside Vim compared to a separate terminal emulator app?

I am using iTerm2, which is working well for me. I've been using VIM for almost 2 years now, with MacVim. Then suddenly I became curious whether my coding experience will improve when I use terminal ...
Noel Pure's user avatar
  • 103
2 votes
3 answers
2k views

Pasting text on Vim inside tmux breaks indentation

My .tmux.conf file was initially empty, but then I edited by basically copying the Linux part of this answer from UnixSE. The problem below occurred both before and after I edited that conf file. I ...
evaristegd's user avatar
1 vote
1 answer
156 views

terminal api not working on gvim

vim 8 support terminal, and has a api to let command in terminal to communicate back to vim. For example: In vim, define function like " .vimrc let g:cnt = get(g:, 'cnt', 0) func! ...
qeatzy's user avatar
  • 940
4 votes
1 answer
464 views

customising Termdebug commands

There are commands such as :Break and :Continue, but I would like an :Until to run to the current line without setting a breakpoint. Is it possible to add this myself, or would it need a vim feature ...
Rob's user avatar
  • 41
3 votes
1 answer
2k views

ctermbg and ctermfg are backwards or incorrect for certain highlighting groups

I am currently attempting to create a custom colorscheme for vim by using ctermfg and ctermbg values, and checking what the colorscheme looks like with the highlight test file provided by Vim. What I ...
Dmitry S.'s user avatar
1 vote
0 answers
304 views

How do I prevent Vim from showing my terminal when executing an external command?

I'm running a long, blocking command using execute in Vim as part of a script. Vim shows the underlying terminal while executing the command, which is pretty distracting. function! DoSomething(query) ...
Martín Fixman's user avatar
0 votes
2 answers
659 views

Rename neovim terminal buffer without breaking :mksession

Is there a "good" way to rename the terminal buffer in neovim? I know that renaming is possible with the :file command, and that works fine for current session. The problem with this approach is ...
Thunderbeef's user avatar
0 votes
1 answer
136 views

Is there a way to change the message "press ENTER or type command to continue" to something else?

I would like to change it to make something like a separator between !python % Change this(my computer is in spanish): To something like: Hello World --------------- Hello World --------------- ...
edugomez102's user avatar
1 vote
0 answers
71 views

neovim: Keep :terminal active when I switch to other buffers

I use :terminal in neovim to run a dev server. But whenever I switch to other opened buffer(s), the terminal kills the process. Is there a way to keep the terminal running in neovim?
Hashir Sarwar's user avatar
0 votes
1 answer
1k views

How to prevent Vim from making a flashy screen effect when pressing `ESC` or `^[` in normal mode?

I often press ESC/^[ to ensure that I've left insert mode and entered normal mode. However, if I'm already in normal mode, Vim displays an annoying flashy screen effect: How can I prevent Vim from ...
Shuzheng's user avatar
  • 1,195
1 vote
1 answer
562 views

Why can't I remap q [closed]

I have many key mappings in my vimrc but for some reason no matter what I do q remains mapped to recording macros. I will post my full vimrc below, but the relevant part is that even if the last line ...
Joe Compton's user avatar
1 vote
0 answers
159 views

How do I unconditionally disable all the "smart" terminal actions in vim

I have already set mouse= and set ttymouse= but I still get it intercepting paste when I'm trying to paste vim commands, like I want it to do some kind of complex :map! .... so I copy that from ...
Resuna's user avatar
  • 111
3 votes
1 answer
71 views

Call vimgrep from terminal

I find myself wanting to use vimgrep without having an open vim session. Then, I usually open a blank vim session (by calling vim from the terminal) and then, for instance, :vim /pattern/ *.tex. I ...
Arne's user avatar
  • 35
1 vote
2 answers
97 views

CTRL-V_CTRL-[key], instead of ^[key] gives ^[[27;5;[ASCII code of key]~ in xterm on Arch

For example, Ctrl-v_Ctrl-w gives ^[[27;5;119~ instead of usual ^W. It does behave in such way only on (u)xterm. I've tested it on st, lxterminal, xfce4-terminal and rxvt. I'm also 98% positive that ...
Jorengarenar's user avatar
1 vote
2 answers
604 views

Make a buffer active by its number

I'm configuring a terminal buffer and now I have the following problem. I have only one terminal buffer and I need to make it active by its number to avoid lots of CTRL-w j/k/l clicks. Here is what I ...
St.Antario's user avatar
  • 1,107
1 vote
1 answer
70 views

Highlighting comments to EOL (terminal EOL, not buffer EOL)

One of my filetypes has a special comment format that has a background color, and it would be useful if I could extend the highlighting to extend that background to the terminal width, rather than ...
type_outcast's user avatar
3 votes
3 answers
2k views

Toggle terminal buffer vimscript function

I'm new to vimscript and writing a function to toggle a terminal buffer. Here is what I tried: let g:toggle_term = "<C-j>" let g:term_buf_nr = -1 function! ToggleTerminal() if g:...
St.Antario's user avatar
  • 1,107
0 votes
1 answer
83 views

Is it possible to make a terminal frame to be appeared on the bottom, not on the top?

I'm using :term bash to show a terminal buffer as it is specified in :h terminal-use. But the problem is that it is appeared on the top of the currently active vim buffer. Is there a vimrc ...
St.Antario's user avatar
  • 1,107
1 vote
2 answers
83 views

Can I have a newline in balloonevalterm expressions?

I'm trying to use balloon text for my C macros, say, true and false as follows in the terminal version. function! MyBalloonExpr() let macros = { \ 'true':"true\n1", \ 'false':"false\n0", \ } ...
Jens's user avatar
  • 363
8 votes
3 answers
2k views

how to change local directory of terminal buffer whenever its shell change directory

After :term ++curwin zsh, I use that buffer as an alternative of tmux window. But there is one caveat, if I cd in zsh, vim will not know. Which cause problem in below case In terminal normal mode, ...
qeatzy's user avatar
  • 940
3 votes
1 answer
100 views

Numpad behavior incorrect with vim.exe - Windows

On Windows with an installation of gvim 8.1, Numpad behavior is different between the GUI and the console. The GUI (gvim.exe) has a TERM of builtin_gui and the keypad (with Numlock On) works properly....
Damian T.'s user avatar
  • 133
1 vote
1 answer
5k views

Why can't I install this colorscheme properly?

I'm trying to install this colorscheme. They instructed to use a package manager so I've used vim-plugged: Plug 'rakr/vim-one' While my colours on vim did change, it really does not look like the ...
idankor's user avatar
  • 145
0 votes
0 answers
307 views

Send keystrokes and string to gdb terminal

I started debugging a c program inside vim with: :packadd termdebug :Termdebug with vim 8 and and gdb > 8.3 installed. In order to set a breakpoint, I would like to send the following string while ...
tham mes's user avatar
2 votes
2 answers
719 views

Is there a way to make a command running inside a vim terminal open files in buffers?

I often find myself operating in the vim terminal needing to edit a few files. In this case I might type vim *.h. This opens a new vim instance nested inside my vim terminal. Is there a way to make a ...
Joel Holdsworth's user avatar
1 vote
1 answer
391 views

how to prevent resize of my split windows on every call of term_start() if I do need to use 'termwinsize' option

I have 2 files opened in a vertically split window. I call term_start() and get results in a split window below. I use something like this: :let foo=term_start("some_script", {'hidden':1, '...
NikDm's user avatar
  • 11
0 votes
1 answer
2k views

Neovim: run cmd on write [closed]

I've got a file open in Neovim like so: neovim test.rb And a split open like so: :split ruby test.rb How can I rerun the split command each time I write a save in the original window? Update I'...
t56k's user avatar
  • 103
1 vote
1 answer
301 views

I can run :terminal in Neovim, but it thinks terminal is missing

I have NVIM v0.4.2 and can run :terminal. Despite that, echo has('terminal') gives 0. In addition, if I try to run a command of vimteractive, an error occurs with Your version of vim is not compiled ...
T_T's user avatar
  • 165
2 votes
0 answers
854 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
3 votes
1 answer
335 views

Restore working directory in terminal windows when loading session

While using :mksession feature, I found that it works well with files and netrw, but not so much with neovim terminal windows. The problem is that, for terminal, it never preserves working directory ...
Thunderbeef's user avatar
4 votes
2 answers
3k views

Using vim as a terminal multiplexer: neovim or vim 8?

I've traditionally used vim as a text editor and tmux as a terminal multiplexer, but I'm trying to see if I can drop tmux entirely and just use vim for everything (except session attach/detach, which ...
Thunderbeef's user avatar
5 votes
4 answers
6k views

How to clear neovim terminal buffer

I have a terminal buffer with 10000 lines of previously executed output. In order to search for the particular sequence of words I have to go through all 10000 lines before getting to my last executed ...
NikitQa's user avatar
  • 131
5 votes
0 answers
307 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
1 vote
1 answer
628 views

Strange control line when opening a file

Sometimes (about once/twice a day), when I open a file in vim, I get a strange line containing meta control characters right at the top of the buffer. The line goes away when I refresh the buffer, so ...
Gautam's user avatar
  • 113
7 votes
1 answer
7k views

Vim terminal: How to split below by default?

Opening the vim terminal using :term, creates a horizontal split with the terminal placed at the top half of the window. Is there a way to open the terminal at the bottom half instead? I know I can ...
Flux's user avatar
  • 1,021
1 vote
0 answers
217 views

Pressing <Alt-3> (left alt key) suddenly maps to Esc (and not the character "#") using iTerm2 [closed]

Characteristics: MacOS 10.14.6 I'm using VIM as text editor for a few weeks, with both Terminal and iTerm2 I could write character dependent on hitting key alt (left alt key in iTerm) without ...
ecjb's user avatar
  • 149
1 vote
1 answer
891 views

Hide terminal buffer from buffer list

How do I keep the terminal buffer from showing up in my airline list of buffers? I assume airline just pulls buffers from what normally shows up in :ls. But I actually don't want the terminal to show ...
Josh Lawrence's user avatar
4 votes
1 answer
5k views

How to enter normal mode while in terminal buffer? [duplicate]

Recently I found out that vim has added the :terminal command which opens a terminal buffer within vim, however I see no way to enter normal mode so that I can move around and copy things. Neovim has ...
ivan's user avatar
  • 243
6 votes
1 answer
2k views

Pressing Shift-Backspace in insert mode types '^?' instead of backspacing

When I mess up typing an uppercase letter, I usually hold Shift while pressing the Backspace. Instead of backspacing, it types ^? (to my frustration). Google tells me that ^? is the "delete" ...
PoorProgrammer's user avatar
2 votes
1 answer
354 views

How to send messages from terminal to Vim using the JSON API?

Vim 8 built-in terminal allows communication to and from a running job. The manual describes a terminal API :h terminal-api that lets a running job to Vim. An example message is provided to open a ...
SigmaPiEpsilon's user avatar
2 votes
1 answer
3k views

vi background color wrong on Windows 10 1903 WSL Terminal

After upgrading to Windows 10 1903 (18362.175), in Window Subsystem for Linux (WSL) Ubuntu 18.04, the background color is always set to black when scrolling backward in vi, vim, man and maybe some ...
Brent Pfister's user avatar
3 votes
2 answers
1k views

Neovim-Qt: environment variable TERM not set

Running :checkhealth in NeoVim-Qt (v0.3.5) I get the following report on terminal: ERROR: command failed: infocmp -L infocmp: environment variable TERM not set How can I set the environment variable ...
NunonuN's user avatar
  • 33
3 votes
3 answers
887 views

Apply terminal colors in gui?

I am on neovim with Oni. vim-netranger plugin uses terminal colors in this format to highlight things. It does work in terminal with neovim , but not in a gui app. I am looking for a way to replace ...
eyal karni's user avatar
  • 1,058
1 vote
1 answer
625 views

How to copy paste from a vim split text to terminal

I open vim and have the following code: 1 a = range(10) 2 for b in a: 3 print(b) I then open an ipython within vim by typing: :term ipython I yank the code by doing :1,2y and then go over to ...
evan54's user avatar
  • 111
3 votes
1 answer
2k views

Vim 8 terminal change width

Suppose I run :terminal someprg_wide_output the output is wrapped by current terminal window size wrapped hard way, so :set nowrap there can't help When I run same program not from vim like this: ...
Tag Wint's user avatar
  • 213
1 vote
0 answers
107 views

use pipe symbol in vim :term command [duplicate]

recently i stumpled over vim :terminal mode. i am really exited about that. now i wanted to ask, how i can create a mapping, which sends a command, including a pipe symbol to :terminal? it should look ...
divramod's user avatar
  • 119
4 votes
1 answer
589 views

What's wrong with "terminal cd ." in vim 8.1?

terminal cd . results in following weird error in the terminal buffer: executing job failed: No such file or directory The same error appears for term_start('cd .'). It doesn't matter which directory ...
dedowsdi's user avatar
  • 6,188
0 votes
2 answers
373 views

How to copy file and line info from vim to gdb?

For setting breakpoints, I was wondering if there is any way to copy the location of a line in a file opened in vim, to gdb rather than typing the whole file path and linenumber in the gdb shell?
In78's user avatar
  • 171
1 vote
1 answer
503 views

VimEnter autocmd to change cursor shape sometimes outputs escape sequences

Inspired by this answer, I have the following in my vimrc: augroup cursor au! autocmd VimEnter * silent !echo -ne "\e[1 q" augroup end However, this sometimes prints the following on startup:...
user avatar
0 votes
1 answer
257 views

what does "\033]110\007\033]111\007" mean

I found this snippet online which is apparently a way to make vim a little faster if your terminal background is the same as what vim's is meant to be (right?) " General colors if has('gui_running') |...
theonlygusti's user avatar
  • 2,229

1
3 4
5
6 7
9