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
1answer
34 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 ...
1
vote
0answers
19 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 ...
2
votes
1answer
34 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 ...
1
vote
2answers
35 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 ...
1
vote
2answers
52 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 ...
1
vote
1answer
21 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 ...
1
vote
1answer
37 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:...
0
votes
1answer
26 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 ...
1
vote
1answer
19 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", \ } ...
4
votes
2answers
86 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, ...
2
votes
1answer
37 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....
1
vote
1answer
32 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 ...
0
votes
0answers
39 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 ...
1
vote
0answers
33 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 ...
0
votes
1answer
41 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, '...
0
votes
1answer
50 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'...
1
vote
1answer
35 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 ...
2
votes
0answers
80 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 ...
1
vote
1answer
25 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 ...
1
vote
1answer
100 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 ...
0
votes
3answers
120 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 ...
0
votes
0answers
35 views

Running vim in Windows CMD messes with text wrapping when resizing the window

Normally, resizing CMD works normally for me, where the directory prompt (is that what it's called?) stays on the left side of the screen no matter the size of the terminal. However, if I open vim (or ...
2
votes
0answers
32 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 ...
1
vote
0answers
41 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 ...
1
vote
1answer
75 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 ...
1
vote
0answers
18 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 ...
0
votes
1answer
153 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 ...
1
vote
1answer
147 views

How to enter normal mode while in terminal buffer?

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 ...
4
votes
1answer
134 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" ...
1
vote
1answer
58 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 ...
1
vote
1answer
580 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 ...
1
vote
1answer
141 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 ...
2
votes
3answers
141 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 ...
0
votes
1answer
84 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 ...
3
votes
1answer
141 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: ...
1
vote
0answers
42 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 ...
1
vote
1answer
140 views

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

terminal cd . result 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 ...
0
votes
2answers
89 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?
1
vote
1answer
59 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:...
0
votes
1answer
63 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') |...
0
votes
1answer
233 views

How can I emulate :shell command in Neovim?

There is no :shell command in neovim. :terminal opens a shell without previous output, while :shell contains all the output of the parent shell and all previous shells. Is there any way to emulate :...
2
votes
0answers
76 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 ...
1
vote
1answer
638 views

Is it possible to change the default terminal of Vim?

I'd like to change the default terminal of Vim from cmd to cmder. By using :help :terminal I have read the terminal.txt but it seems that there is no setting instruction in that help file. So is it ...
0
votes
1answer
45 views

Ex command to put value of variable into terminal emulator?

Using a terminal emulator (with :term), I would like to insert the value of a variable at the terminal cursor. In a normal text buffer, I could use put =g:my_variable or exec ("normal! i" . g:...
1
vote
2answers
381 views

neovim key remap specific to terminal buffer

I have been using nvim terminal mode to learn python and I want to have Ctrl-C break the python script from the terminal window even when I am not in insert mode. However, I also want Ctrl-C in my ...
3
votes
1answer
45 views

How to map Alt key with M J K L U I O to make a numpad?

I would like to have the keys M, J, K, L, U, I, O to be mapped to 0, 1, 2, 3, 4, 5, 6 (combine with the keys 7, 8, 9 already being on top of those keys) to be a total numpad when I hold a modifier key,...
0
votes
0answers
80 views

how does t_AB and t_Sb option difference in vim?

I see three sets of options for terminal colors on the vim documentation. The first set of options: t_AB set background color (ANSI) *t_AB* *'t_AB'* t_AF set foreground color (ANSI) ...
0
votes
0answers
436 views

How to hide terminal buffer without closing it?

I want to make toggleable window with terminal buffer similar to every IDE terminal feature. Currently i have mapped: noremap <F4> :botright 8split term://bash<CR> tnoremap <F4> &...
1
vote
2answers
782 views

Neovim with split integrated terminal / REPL

Other editors and IDEs, such as VSCode and RStudio, have an integrated console/terminal/REPL with the following characteristics: They open in a split window. The file we’re working on is visible at ...
2
votes
2answers
87 views

How to test for :terminal support?

I have neovim 0.3.4 installed which means I can run the :terminal command, however, doing :echo has('terminal') shows 0. So, I wonder if there is any other way I can test for its support because all ...