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

Making a shortcut for compilling in C

I've changed my code about a million times already and can't seem to get it right. I want to compile the file I have open with whatever its name is minus the .c that comes after and I want to do it on ...
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 ...
7 votes
1 answer
2k views

Use :terminal to display file with ansi escape codes

I want to display a file in Neovim with ansi terminal escape codes interpreted. I created a file which contains ansi escape codes (only colors for now, we can think about others as a bonus): echo '\e[...
10 votes
4 answers
10k views

How to run internal Vim terminal at current file's dir?

When I edit file: /home/me/projects/myproj/src/util.c I would like to start terminal at: /home/me/projects/myproj/src. With Vim version > 8 I can run :terminal but it always starts at folder in ...
0 votes
1 answer
468 views

In nvim, can I map Tab without removing <C-i> as `jump forward`?

I've been mapping all my telescope commands to tab-<key>, which is quite convenient. However I've noticed that its broken the default shortcut for navigating forwards through the jump list, ...
1 vote
1 answer
173 views

How can I execute a non named file on terminal with NeoVIm?

Some time ago, I've made this question where I asked how to execute a file on the terminal with NeoVim... The solution I found was the following :terminal bash % . Knowing that, I made the following ...
0 votes
1 answer
135 views

terminal bell from inside vim terminal

My terminal can and does sound a bell for different actions such as hitting tab or running >printf '\7'. My vim is configured to sound a bell for error scenarios such as the command ggk. However, ...
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/...
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 ...
0 votes
1 answer
785 views

How do I set floatterm plugin in Neovim such that F5 compile javascript and how do I do it for other languages?

I plugged float-term plugin , that open terminal window in neovim. when I compile javascript with node in float term I did like :FloatermNew node % then it compiles fine and show me the output in ...
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/...
0 votes
1 answer
349 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>') ...
6 votes
1 answer
2k views

Why does `set t_ve=' hide cursor in terminal

Vim's documentation lists t_vi as "cursor invisible" and t_ve as "cursor visible", but provides no hints on usage. Naively, I would have guessed that Vim would send the t_vi sequence when you somehow ...
9 votes
1 answer
4k views

What's t_TE and t_TI added by vim 8?

First let me show a screenshot below. In the modeline, a strange sequence of characters(>4;m<ESC>[>4;m<ESC) is shown. And not only in the modeline, I have seen such similar sentence in ...
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, ...
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), ...
6 votes
2 answers
611 views

Properly restore terminal title after suspending vim

I'm using Vim 7.3 on OS X Terminal version 2.6.1 (OS X version 10.11.2). If it's relevant, my version is compiled without X11. When I open a file in Vim, the terminal title bar changes to show the ...
0 votes
1 answer
44 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 ...
1 vote
1 answer
406 views

Vim display won't refresh in XQuartz

I got a new laptop (macOS Big Sur 11.5.1) and vim does not work correctly in an XQuartz terminal window. Many commands that should erase characters on the screen (such as backspacing while in insert ...
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 ...
3 votes
3 answers
6k views

How to use WSL's bash shell as default terminal of gvim/windows 10?

gvim 8 1-26 / windows 10 I'd like to use Windows Subsystem Linux (WSL)'s bash shell as a gvim's terminal instead of cmd. So if I type in command potion of gvim: :!.\test.sh, it will echo result ...
11 votes
2 answers
2k 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 ...
2 votes
1 answer
344 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 ...
0 votes
1 answer
79 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, ...
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" }, { ...
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 ...
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 ...
0 votes
1 answer
227 views

How to pass custom arguments to the shell invoked by :terminal?

I would like to specify the startup command to run on the :terminal shell. E.g. bash -c ls. The shell can be specified with set shell=bash, but how to specify the arguments? In another use case, I ...
0 votes
1 answer
873 views

Black Borders in Neovim when using Windows Terminal

Why are these black borders generated when I open Neovim in Windows Terminal?
1 vote
3 answers
1k views

Toggle Vim Terminal with Mapping like VS Code

I am trying to implement toggling of the Vim terminal like VS Code by doing <C-~>. But am not sure how to go about it. I find executing :term to open and to close tedious. I figured having a ...
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 ...
1 vote
2 answers
276 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 ...
2 votes
1 answer
810 views

Remapping Ctrl+backspace in insert mode to delete one word back

I want to bind Control+Backspace in insert mode to delete a word. I'm able to bind Control+Del in both insert and normal modes, but I can only seem to bind Control+Del in normal mode. I've checked ...
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&...
6 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 ...
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 ...
1 vote
1 answer
138 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 ...
13 votes
3 answers
1k views

Scrolling issues when the `wrap` option is set

I find myself dealing with this issue every time the wrap option is active (in my particular case whenever I'm working with markdown files). What happens is that, while scrolling up and down the ...
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 ...
5 votes
1 answer
2k views

Vim /usr/bin/bash: /s: No such file or directory

Repost from Stackoverflow; I read a comment which directed me here saying it would be more helpful. Just set up nvim; unfortunately, the following error is plaguing the setup. Whenever I try to ...
0 votes
1 answer
28 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 ...
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> <...
3 votes
1 answer
324 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 ...
15 votes
4 answers
3k views

How to label tmux tabs with the name of the file edited in vim?

Whenever I open a tmux session in terminal, all of the tabs containing vim sessions are labelled vim. My question is: How to configure it to label tmux tabs with the name of the edited file or ...
0 votes
0 answers
39 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 ...
1 vote
1 answer
132 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 ...
0 votes
0 answers
155 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 ...
6 votes
4 answers
4k views

Clear Vim Terminal window

Vim's new :terminal feature is pretty neat, but when I run something like a rails server, I want to be able to clear logging output every now and then. The usual methods in a non-vim term window don't ...
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 ...
15 votes
1 answer
340 views

Using <C-,> causes "<80>ü^D," to flash in the showcmd area?

I've mapped <C-,> as well as some other special keys (<C-Enter>, <C-S-Space>, ...) in my vimrc like, :set <F13>=^[[44;5u :map <F13> <C-,> :map! <F13> <C-...

1
2 3 4 5
9