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
18 views

PATH order different in vim terminal window

I have anaconda set up with a few different environments. When I switch environments and open vim 8.2 and type :term to launch a terminal window and type echo $PATH, $PATH does not match what is ...
1
vote
1answer
36 views

Disable Shift+Insert from pasting from Primary

In Vim, the canonical methods to interact with X11's Clipboard and Primary is to use + and * registers. There are at least another two ways to paste from Primary into Vim: Shift-Insert and Mouse ...
1
vote
0answers
40 views

:terminal colorscheme inside Vim is different from either Vim or Host Terminal

I have a gruvbox theme applied to Vim inside my vimrc. The problem is that when I run the :terminal command inside Vim the colorscheme is different from either the Vim theme or the terminal emulator's ...
1
vote
0answers
40 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 ...
-1
votes
1answer
45 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?
2
votes
0answers
34 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 ...
0
votes
0answers
37 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 ...
1
vote
0answers
18 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 ...
1
vote
1answer
14 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 :...
0
votes
0answers
45 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 ...
0
votes
1answer
53 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 ...
1
vote
1answer
29 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 ...
0
votes
1answer
21 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&...
0
votes
1answer
20 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 ...
1
vote
1answer
35 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 ...
2
votes
2answers
207 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 ...
1
vote
1answer
48 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 ...
2
votes
1answer
41 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 ...
0
votes
1answer
16 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 ...
2
votes
2answers
116 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 ...
0
votes
1answer
68 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 ...
1
vote
1answer
28 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 ...
0
votes
1answer
21 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 ...
2
votes
1answer
81 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 ...
1
vote
1answer
26 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 ...
4
votes
1answer
71 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 ...
1
vote
1answer
27 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 ...
0
votes
1answer
14 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 ...
0
votes
0answers
26 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 ...
1
vote
1answer
36 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: ----...
1
vote
1answer
52 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 ...
0
votes
0answers
11 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)...
7
votes
1answer
127 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 ...
1
vote
0answers
17 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 ...
4
votes
4answers
148 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 ...
0
votes
1answer
42 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 ...
4
votes
2answers
74 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 ...
1
vote
1answer
27 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 ...
0
votes
1answer
40 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&...
1
vote
1answer
38 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....
0
votes
1answer
59 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 ...
1
vote
2answers
48 views

Pasting text on Vim inside tmux breaks indentation

Ubuntu: 18.04 bionic tmux: version 2.6 VIM: Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 ) Included patches: 1-1453 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by pkg-vim-...
1
vote
1answer
30 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! ...
3
votes
1answer
58 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 ...
3
votes
1answer
181 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 ...
0
votes
0answers
38 views

How to get internal terminal's current dir name in vim? [duplicate]

I would like to start editing some files in dir to which I've switched in internal vim terminal. But I do not like to open nested vim inside this term. If I work in same dir in which I've opened vim, ...
1
vote
0answers
65 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) ...
0
votes
1answer
46 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 ...
0
votes
1answer
62 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 --------------- ...
1
vote
0answers
26 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?

1
2 3 4 5 6