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
0 answers
132 views

autoupdate nvim terminal

Is it possible to make the nvim terminal always automatically scroll down so you can see the latest messages? For example I have my vim editor setup like this On the button half of the screen I have ...
JangoCG's user avatar
  • 121
0 votes
1 answer
1k views

How do I switch from terminal back to vim? [duplicate]

When I'm in vim and I use :term to open a terminal inside vim, how can I switch back from the terminal to vim?
JangoCG's user avatar
  • 121
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,068
1 vote
0 answers
139 views

How can I check the terminal ouput info in nvim?

I am at the beginning of switching from vim to nvim. When I build my program by runing a script from a shortcut key, it will output the build info. In vim, the build info is put into terminal, I can ...
peng chen's user avatar
1 vote
0 answers
194 views

:term command changes cursor type in vim

I have set the cursor shape to be - I-beam in my terminal preference. When I execute :term command in vim, the cursor type is changed to block type. This change is retained even after I exit the :term ...
rohith's user avatar
  • 111
2 votes
1 answer
387 views

How to map the C-W Shift+N for making terminal non active?

In Vim, you can invoke the terminal by :terminal. Then, you can treat the terminal window as a normal Vim window by doing Ctrl+w Shift+n. I want to map this sequence to, e.g, Ctrl+t. I checked with :...
Xxxo's user avatar
  • 187
0 votes
1 answer
1k views

How to scroll the screen in terminal mode in neovim

In insert mode, we can use PageDown/Up or <Shift-PageDown/Up> to scroll the screen. But this fails for terminal mode. How can we achieve this in terminal mode? I'm using zsh on the Arch Linux ...
Coiby's user avatar
  • 149
1 vote
1 answer
3k views

How to run a command in neovim's terminal mode without leaving this mode

Suppose ALT+h to mapped to <C-\><C-N><C-w>j as following Nvim documentation: nvim_terminal_emulator. We have two horizontally split windows with terminal buffers and the right window ...
Coiby's user avatar
  • 149
2 votes
1 answer
176 views

How to put cursor in the right position after switching from normal mode to insert mode in terminal

After launching a terminal inside vim via :terminal, vim doesn't put curosr in the right position after pressing i in normal mode. As seen in the following picture, the cursor is put at the end of the ...
Coiby's user avatar
  • 149
0 votes
1 answer
207 views

Map a key on a terminal buffer whose corresponding job is already finished

The context I have mapped <c-p> in terminal mode so that it deletes the terminal buffer where the cursor is. The way I've created this mapping is presented below tnoremap <c-p> <c-w&...
gfe's user avatar
  • 235
0 votes
1 answer
54 views

How can I execute commands or move to other tabs without first closing the terminal executed by `:term`?

I've created a new terminal by executing :tabnew +term. How can I execute other Vim commands or move to another tab without first closing the terminal (:term)? Currently, all input is directed to ...
Shuzheng's user avatar
  • 1,175
4 votes
1 answer
647 views

How can I pass extra arguments to gdb with Termdebug?

While using Termdebug, occasionally it would be useful to pass extra arguments to gdb (for example, -x). I've tried :Termdebug -x <my_file> <command_to_debug>, but that just seems to ...
Dominick Pastore's user avatar
7 votes
3 answers
4k views

How can I change the colorscheme of the vim terminal buffer?

I use GVim with the gruvbox colorscheme. When I open a terminal inside vim with :term, the colors are different, it looks like another colorscheme is applied. The other terminals I use (urxvt and ...
mike23's user avatar
  • 290
1 vote
2 answers
1k views

How do I get the name of the current terminal in Vim?

I'm currently running Vim in Windows 10. I want to specify in my config file certain settings for when I'm running Vim in Cmder, different settings when I'm running Vim in Alacritty, etc. When in ...
Mr Blue's user avatar
  • 205
2 votes
1 answer
619 views

$TERM specific NeoVim configuration

I spend half the time in a TTY (Linux console as in Ctrl+Alt+F2) and the other half in a X session. Unfortunately the color scheme I use for NeoVim in the graphical environment on xterm does not look ...
user avatar
0 votes
1 answer
17 views

How do you open text files exclusively for writing so that other applications cant access it at that time?

How can I restrict my other terminals from accessing one of my already opened file (within vim)? Sometimes I forget which one of my terminals has that particular file already opened and again open it ...
MD. Mohiuddin Ahmed's user avatar
4 votes
2 answers
2k views

How to activate bracketed paste mode in GNOME Terminal for Vim inside tmux

Edit this issue happens inside a tmux session. The original value of $TERM before starting vim is: echo $TERM screen The issue appears for example when pasting this kind of indented code: def ...
Paul Rougieux's user avatar
0 votes
1 answer
574 views

Ctrl keybindings not working in wsltty

I have the following mappings: nnoremap <C-,> :tabe ~/.config/nvim/init.vim<cr> nnoremap <C-/> gcc Neither of these mappings is working - they both do nothing. I have a plugin ...
Thaddaeus Markle's user avatar
1 vote
1 answer
378 views

How can I use the `:term` command without closing the current window on exit?

I often use the :term command in my projects to create new directories or perform other work. However, if I have multiple windows open, then executing :term from one of them will also close that ...
Shuzheng's user avatar
  • 1,175
0 votes
1 answer
60 views

How to I use terminal-function-details?

recently started working in the terminal Vim provides with :terminal. Reading through the man pages of this I reached the section on Terminal functions, which seem quite interesting. However, I'm not ...
avriis's user avatar
  • 103
4 votes
1 answer
2k views

Neovim does not restore terminal cursor on exit

The cursor of my gnome-terminal is an underline _. I am using Neovim and I want the cursor in Command Mode to be: block | set guicursor=n:block-Cursor When I exit from Neovim I want the cursor back ...
ng.newbie's user avatar
  • 235
1 vote
1 answer
110 views

Cannot run basic Windows commands using :terminal

I have the GVim 8.1 compiled with +terminal flag. After I enter Vim via vim -u NONE, I try to execute simple command, like :terminal cd or :terminal dir just to check the output. Instead of the ...
ashrasmun's user avatar
  • 167
4 votes
1 answer
153 views

Why does custom map of <c-w><space> cause mapping delay in terminal mode?

I'm using <c-w><space> to open current terminal buffer in a new tab: tnoremap <c-w><space> <c-w>:tab split<cr> This map cause <c-w><c-w> trigger ...
dedowsdi's user avatar
  • 6,068
2 votes
1 answer
450 views

Shortcut for binding same command to multiple key

Is there any way to map same command to multiple key without repeating mapping. Like mapping this one inoremap ) <right> inoremap " <right> inoremap ] <right> into something like ...
Sharif Minhazul Islam's user avatar
0 votes
1 answer
70 views

'include=^\s*\(from\|import\)' error in vim

When I type :set inc it doesn't work and below status bar shows include=^\s*\(from\|import\). Even when I turn on GVim it shows include=^\s*#\s*include error. Here is my .vimrc file set nocp ...
Sharif Minhazul Islam's user avatar
0 votes
0 answers
295 views

Vim not rendering text when moving up

I can move down until the last line of a file with no issues. However, when move up the text that was out of screen bounds does not render (as shown by the figure) until i press Ctrl + L to force ...
Roberto Rolo's user avatar
4 votes
3 answers
3k views

How to open a terminal horizontally on the right side of vim

I'm using vim 8 and I set a shortcut to open a terminal in my vim. nnoremap <F5> :wa<CR> \| :term ++kill=term<CR> It works except that it opens a terminal vertically as below: ----...
Yves's user avatar
  • 943
5 votes
1 answer
2k views

Job still running in buffer while :qa

I'm using vim 8 with some plugins and shortcuts. I set a shortcut for :term to open a terminal in vim: nnoremap <F5> :wa<CR> \| :term<CR> command Q qa So when I type F5, a ...
Yves's user avatar
  • 943
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
7 votes
1 answer
306 views

Difference between `:!{cmd}` and `:w !{cmd}` regarding alternate screen

On a Linux platform I see this difference of behavior between running a shell command with :!{cmd} (which just runs the command directly) and with :w !{cmd} (which passes the buffer as standard input ...
filbranden's user avatar
  • 27.7k
1 vote
0 answers
87 views

F10 is not yet available to Vim via gnome-terminal

I'm using gnome-terminal for first time (after using xterm for many years). And the one keystroke that no longer works within gnome-terminal from my Vim application is Function Key F10. I've turned ...
John Greene's user avatar
7 votes
6 answers
2k views

Does Vim have functionality similar to tmux's `display-panes` command for selecting (goto) a specific window by number?

Does Vim have functionality similar to tmux's display-panes command for selecting (goto) a specific window by number? Sometimes when I've many windows open, it can be a pain to navigate them by C-w ...
Shuzheng's user avatar
  • 1,175
1 vote
1 answer
711 views

Vim takes a long time to close over SSH?

While ssh'd into my server, vim hangs for a variable amount of time (about 2 seconds, but can be longer or shorter) when opening and closing. It's worth noting that (to my eyes) the delay is the ...
Brandon Sturgeon's user avatar
9 votes
2 answers
1k views

Ctrl-W at :terminal (default terminal behavior expected)

I am very fond of Vim's :terminal, though whenever I use Ctrl-w (expecting to erase the last typed word at prompt), Vim captures the key press and enters pane navigation mode. So I end up having to ...
fde-capu's user avatar
  • 243
1 vote
1 answer
94 views

Cannot read output of ./a.out

My current keybinding for compiling cpp files is: autocmd filetype cpp nnoremap <F2> :!g++ -g %<CR>:!./a.out<CR> When I press F2, vim escapes to the shell and a.out executes well ...
Manas Singh's user avatar
2 votes
1 answer
786 views

How to move the cursor out of the terminal

I'm now using Vim 8 and its new feature: :term. Well, it's great but I don't know how to move the cursor out of the terminal without the mouse. In Vim 7, we can type <C-w><C-h>, <C-w&...
Yves's user avatar
  • 943
1 vote
1 answer
199 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
420 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
1k 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
138 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
392 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
284 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
584 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
121 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
62 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
991 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,175
1 vote
1 answer
525 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
131 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
59 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 2 3
4
5
9