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
2 answers
34 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
0 votes
0 answers
32 views

How to change the terminal that launches Neovim?

When I double click a text file, the file is opened with Neovim in an xfce4-terminal. How to change xfce4-terminal to kitty? I tried to uninstall xfce4-terminal and then ln -s /usr/bin/kitty /usr/...
aj3423's user avatar
  • 199
0 votes
0 answers
20 views

Query terminal colors via OSC11

Is it possible to query the terminal colors via OSC-11 used in highlight groups? Similar to what is done here https://github.com/neovim/neovim/blob/5d8ab32f3871b0232972cac1116ac7cba98389e5/src/nvim/...
crawl_soever's user avatar
2 votes
0 answers
59 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
0 votes
1 answer
43 views

Can't use `:wqa` with open terminal buffers

I have next problem: When I use :term buffers the :wqa command produces error: Which is quite expected because terminal buffers isn't writable. BUT the :wa and :q separatly work. This is strange. To ...
Vladyslav Rehan's user avatar
1 vote
1 answer
68 views

How can I run a java file from a neovim terminal using a remap

For a bit of background, I'm trying to set up a function that runs a java file in Neovim, I've tried using the following autocmd: vim.api.nvim_create_autocmd( { "FileType" }, { ...
Nico Elbers's user avatar
0 votes
1 answer
76 views

How to make zsh detect if terminal session is run inside nvim's :term

I were following the Modern Vim book by Drew Neil. In tip 20 he writes: At a glance, you may not be able to tell whether a shell is running within a terminal buffer or outside of Neovim. In this tip, ...
Vladyslav Rehan's user avatar
0 votes
1 answer
37 views

How to set the terminal for shell in gvim

In gvim (started from WSL2), when I am executing a command, for example :! ls -lha the colors are not supported. Also when the :!man is executed, the following is reported: WARNING: terminal is not ...
John's user avatar
  • 1
0 votes
0 answers
29 views

Switch terminal emulators

I mainly use st terminal for its fast startup time compared to other terminals. However, sometimes, I find myself in need for better UTF-8 support and want to switch terminal emulator of currently ...
AvidSeeker's user avatar
1 vote
2 answers
123 views

Vim with terminal inside, I have to quit using a vim cmd as the terminal will prevent me from exiting, so I can't do :wq

Since I have a terminal inside vim I can't do :wq or I get 'job' running. I got around this using: vim --clean "+term" "+qa!" Then I'd have to do :w then :qa! In my ~/.vimrc I then ...
Nickotine's user avatar
  • 133
0 votes
1 answer
49 views

Is saving a terminal Vim split session possible?

I'm new to Vim I only know how to navigate and save sessions with :mksession so far but I'm unsure of how I could save my splits this is what my settup looks like. https://imgur.com/a/2BGkbSP One side ...
DudlyDog's user avatar
0 votes
0 answers
69 views

How to use `Ctrl+c` in Nvim if GNOME terminal SIGINT call was remapped to Ctrl+x?

GNOME terminal SIGINT call was remapped to ctrl+x using stty intr ^X, and ctrl+c was mapped to be 'copy'. In Neovim config I have vim.keymap.set("v", "<C-c>", "\"+y&...
Vlad Mosienko's user avatar
0 votes
1 answer
53 views

NeoVim - Interact with the thing that pop ups when you type in a command

Questions How can I type something in there? What even is the name of this thing? Problem If you type in for example :!echo 'Hello World' This kinda terminal thing pops up I want to interact with ...
Pixelbog's user avatar
  • 335
1 vote
1 answer
136 views

What is the most convenient window splitting strategy for Vim users when using Terminal Multiplexer and Tiling Window Managers? [closed]

I use Vim/Neovim mostly inside Wezterm, with I3 as my window manager. Also all of them offer tabbed interface. Shortcuts to cycling through the different layers is difficult, even with ergonomic ...
Aviik's user avatar
  • 23
0 votes
3 answers
203 views

Switch focus to :terminal buffer

I am trying to recreate the functionality of the very old conque plugin via terminal in modern vim. So far I have found a few plugins that send code to a terminal buffer. However, these do not update ...
shabbychef's user avatar
0 votes
1 answer
27 views

Making certain buffers invisible to commands involving "all" or bufdo

For my projects I generally open several tabs some of which might involve terminals or directory trees or quickfix (since ShellCheck sends its error messages there for instance). When I want to use ...
Sina's user avatar
  • 115
1 vote
1 answer
24 views

How to use tmap with <Plug>?

I am wondering how shall I use tmap along with <Plug>. Here is a snippet of the context where I am using it: vim9script import autoload "../lib/foo.vim" noremap <unique> <...
Barzi2001's user avatar
  • 440
0 votes
0 answers
38 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
1 answer
129 views

What does \_. means in Vim?

what does \_. means in vim ? explain to me character by character Response from chatgpt: In Vim regular expressions, \_. is a sequence that represents any character including a newline. Here is an ...
andrew_ysk's user avatar
0 votes
0 answers
153 views

Cannot setup virtualenv inside neovim terminal poetry

I'm using the zsh-autoswitch-virtualenv plugin to automatically activate virtualenv when I enter a directory. In the neovim terminal however, I have to run poetry shell in order to properly populate ...
Nav Saini's user avatar
0 votes
0 answers
12 views

Why recording typed characters by "qa" into reg a has different behavior for typed <M-Z> vs. <M-z>?

Case 1: In Excmd line I give qa to begin recording. I type \Alt Z (upper case Z) error message: E11: Invalid in command-line window:\<blank\>:q<CR> closes the window I give q for end ...
Anton Wessel's user avatar
0 votes
0 answers
36 views

Why does Vim search for the word under the cursor when pressing "i" after running an external command?

I stumbled on a behaviour which I don't understand. I'm using Bash and Vim 8.2.2434 in Debian 11. To reproduce it, I created two new files in an empty directory: foo.py class Foo: def __init__(...
mkrieger1's user avatar
  • 135
1 vote
1 answer
51 views

term_start won't open terminal in the desired position

If I run term_start('zsh', {'term_name': 'MYTER','vertical': v:true}) I get the expected behavior, but if I run term_start('zsh', {'term_name': 'MYTER','belowright': v:true}) will produce E475: ...
Barzi2001's user avatar
  • 440
0 votes
0 answers
243 views

Why doesn't ctrl+left and ctrl+right work by default in alacritty?

As in the title. I run vim in xterm and ctrl-left and ctrl-right does work (skips over one word in the text by default -- this is likely the intended behavior, also because it works the same way in ...
user202729's user avatar
1 vote
1 answer
52 views

How can I control the color of my Vim terminal?

I'm using the nord theme on gVim 9.0. My Vim terminal appear with Black color: Here in console mode: Here in normal mode: How could I control it? Remark: I had a different behavior using Vim 8.2
Vivian De Smedt's user avatar
0 votes
1 answer
120 views

Come out of terminal output in Neovim

In nvim how can I come out of the terminal mode without closing the nvim overall?! In Vim I just do :!python script.py, when I'm done reading the output I can hit enter to come out of the python shell....
Student's user avatar
  • 121
2 votes
1 answer
343 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
0 votes
1 answer
88 views

How to save underlined text in Vim?

Ultimate goal is using underlined text in VIM (with st terminal). At this point I cannot paste underlined text in the st terminal (or VIM with st terminal). And text from text files with an underline ...
Peter P.'s user avatar
0 votes
1 answer
38 views

:ter source ~/.zshrc return executing job failed: No such file or directory

I have tried the solutions suggested here but none worked. The issue is easily reproducible, just run :ter source ~/.zshrc No special requirements for .zsrch and the .vimrc files, they can be empty (...
Barzi2001's user avatar
  • 440
1 vote
1 answer
78 views

Escape % when using :!echo %HOME% with cmd.exe

When I run: :!echo %HOME% On Windows 10 I expected to get the location of my home directory. But Vim interpret the symbol % as the current file name, in-spite of the ! in front of echo. Hence, I get: ...
Barzi2001's user avatar
  • 440
0 votes
1 answer
347 views

Unable to map C-/ in visual mode with Neovim and kitty

I am unable to map <C-/> in Neovim. In particular, it does not work for visual mode. I have created the mappings below: vim.keymap.set('i', '<C-/>', '<Esc>:Commentary<CR>') ...
Bart Louwers's user avatar
0 votes
1 answer
103 views

How to synchronize background with terminal using solarized colorscheme with neovim

When I toggle my terminal from a dark to light colorscheme, neovim doesn't match: If my terminal is dark and I open nvim, nvim is dark (:set bg says dark) If my terminal is light and I open nvim, ...
rcorre's user avatar
  • 153
0 votes
0 answers
21 views

Cancel external command

I am running a make command in a function silent exec '!make command' Sometimes, it fails and then I can not abort the command. Ctrl-c does not work.
Hunaphu's user avatar
  • 172
1 vote
1 answer
79 views

Determine if a bash script is called within vim

Is there a way for a bash script to determine if it's being run from within vim? I'm writing a small bash script that is only useful if called within vim. I'd like to assure that it only does its ...
MDeBusk's user avatar
  • 363
2 votes
1 answer
438 views

Is it possible to make neovim use single color for underline?

As title. With my current setup it looks like this: But I only want it to use a single color. My current highlight setup: :hi IndentBlanklineContextStart IndentBlanklineContextStart xxx cterm=...
NeoZoom.lua's user avatar
  • 1,232
1 vote
2 answers
39 views

lnoremap doesn't seem to apply to insert mode when mapping an unwanted key combo to nop

This is a follow up to this question of mine. I found out that having :noremap ^[[29^ <Nop> in my vimrc is not enough to disable the unwanted effect of Ctrl+Menu in insert mode, so I looked at :...
Enlico's user avatar
  • 2,162
0 votes
0 answers
310 views

How do I resize the terminal as a proportion of the window size in Neovim?

I would like to set termwinsize to a ratio of the window size. For example, I would like to take the current buffer height, and divide it by five, so that the terminal occupies the bottom fifth of the ...
hmltn's user avatar
  • 239
1 vote
0 answers
40 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
  • 440
0 votes
0 answers
77 views

Terminal inside vim: I can't quit without first exiting the terminal, any autocmd for this?

When I enter vim and open :terminal I want to :wq or :q without first having to switch to the terminal window and typing exit Any autocmds for this? Can't seem to find any. Note: I have the terminal ...
Nickotine's user avatar
  • 133
3 votes
1 answer
2k views

How can I map Ctrl-Alt-<letter> mappings in vim?

My keybindings are consistent and work across different operating systems, terminal emulators, browsers, tmux, etc. There are no clashes, but this sometimes means remapping things in some instances. ...
paradroid's user avatar
  • 241
0 votes
2 answers
93 views

How to use <c-i><c-o> in terminal mode to jump to/from next/previous cursor position?

When in terminal mode, I would like that <c-i> and <c-o> work like in insert mode, i.e. the cursor jumps to its next/previous position in accordance with the jumplist. How to make this to ...
Barzi2001's user avatar
  • 440
0 votes
1 answer
68 views

How to automatically change a buffer terminal name?

I have a small .bat file to open Vim along with a terminal running an IPython console: @echo off call C:\Users\myname\Miniconda3\condabin\activate.bat C:\Users\myname\Miniconda3\envs\myenv gvim -c &...
Barzi2001's user avatar
  • 440
1 vote
0 answers
17 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
  • 440
1 vote
2 answers
481 views

No syntax highlighting in git commit with nvim

I have installed nvim using scoop on two Windows 11 systems. The installation works fine on my laptop (Surface Laptop 3). On my desktop, when I run git commit with nvim set as my editor, the terminal (...
Tom's user avatar
  • 111
0 votes
0 answers
24 views

Scroll to top of previous terminal command

I am using vim to compile my code using the command :w | !make. If this output produces a lot of compiler errors (not uncommon lol), then I'd like to scroll to the top of the output, where the command ...
CrouchEndTiger's user avatar
0 votes
0 answers
144 views

Pasting via vim doesn't paste whole text and gets stuck in the insert paste mode

For a while now, I've been dealing with a problem where when pasting a large amount of text, such as the code in this gist, into a file via vim, only part of the copied text gets pasted, then stops ...
StrangeRanger's user avatar
1 vote
2 answers
271 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
0 votes
1 answer
92 views

How do I disable easymotion in terminal mode?

I'm using easymotion with all buffers and it works well but changing to terminal mode raises the issue. Thus I want to disable it in terminal mode for convenient. How can I do it? Thanks for your ...
Pham Hung's user avatar
  • 113
1 vote
0 answers
51 views

How to show the currently opened terminal sessions? [closed]

I am aware that I can open a terminal with :term. However, it may happen that I could <c-w>q and the terminal disappear. How to get it back in its current status? Or, more in general, how to see ...
Barzi2001's user avatar
  • 440
2 votes
2 answers
1k views

Leave terminal normal mode

Once I'm in 'terminal normal mode' (where VIM has control on the terminal display), i can't come back to simple 'terminal mode' (where i can write BASH or launch process). How to leave the "...
floupinette's user avatar

1
2 3 4 5
9