As of May 31, 2023, we have updated our Code of Conduct.

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
0 votes
1 answer
37 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
  • 184
1 vote
1 answer
35 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
79 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
21 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
21 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
  • 414
0 votes
0 answers
15 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
58 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
64 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
11 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
33 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
34 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
  • 414
0 votes
0 answers
161 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
38 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
66 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
162 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
49 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
32 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
  • 414
1 vote
1 answer
67 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
  • 414
0 votes
1 answer
219 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
69 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
19 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
  • 162
1 vote
1 answer
53 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
293 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,200
1 vote
2 answers
37 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,054
0 votes
0 answers
178 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
27 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
  • 414
0 votes
0 answers
66 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
  • 103
3 votes
1 answer
1k 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
  • 239
0 votes
2 answers
89 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
  • 414
0 votes
1 answer
49 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
  • 414
1 vote
0 answers
13 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
  • 414
1 vote
2 answers
332 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
126 views

Neovim terminal mode <C-w> simulation like Vim

In Vim you can switch windows and paste using <C-w> which leaves the terminal in whatever mode it was already in. Can this be simulated in neovim? For instance <C-W>h moves to the left ...
ConvexCoder's user avatar
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
101 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
187 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
82 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
30 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
  • 414
1 vote
2 answers
771 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
0 votes
0 answers
69 views

Vim inside vim-terminal treats Esc as Alt

I'm using gVim 9.0 on Windows. Here is the steps to reproduce the issue: Open a vim-terminal with :term. Open a vim inside the vim-terminal using command C:\Windows\vim.bat in vim-terminal. Enter ...
lzhh's user avatar
  • 146
1 vote
0 answers
18 views

Does the filename store in ~/.vim/view have particular meaning?

I noticed that in my ~/.vim/view folder all the file have the following format: '~=+Documents=+temp=+IADS_cwk2=+iads_cw2.tex=' '~=+tempdir=+temp=+web=+blog1.html=' '~=+t.tex=' '=+...
Jiang Yuanhao's user avatar
1 vote
1 answer
80 views

How to keep focus in the "normal" editing buffer while a terminal buffer is opened and running a command?

I am editing a DocBook XML file and want to validate it by running a custom command validate_cmd. In my plugin, I'm running the following: let term_buff_no = term_start(validate_cmd, {'term_rows': 10})...
Tomáš Bažant's user avatar
0 votes
0 answers
43 views

Can I stylize the current closed-fold line? If yes, how?

I like to have the current line highlighted (in terminal vim), but not as a punch in my eye, so what I have is this in my ~/.vimrc: au ColorScheme * \ hi CursorLine ctermbg=NONE ctermfg=NONE cterm=...
Enlico's user avatar
  • 2,054
0 votes
2 answers
130 views

terminal and ssh-agent/ssh-key

I use ssh-keys to access the remote git server (e.g. github/gitlab). My ssh-key is protected by a password. Thus when I call a git command with the remote, it will require me to enter the password for ...
clem steredenn's user avatar
1 vote
1 answer
27 views

Turning on vi in terminal after returning to terminal [closed]

So I have set -o vi set in my .bashrc file When I open terminal it starts in INSERT mode. How can I make it so that it starts in NORMAL mode?
candrew's user avatar
  • 11
0 votes
1 answer
59 views

vim - why is the cursor different in different terminals

I have vim 8.2 installed on my Debian machine and when I open it in a gnome-terminal it has a solid non-blinking box as a cursor. But when I open a "pure" terminal with ctrl+alt+F3 and open ...
theerrormagnet's user avatar
1 vote
1 answer
147 views

What factors control the color scheme in a terminal?

I am trying to use VIM through new "Windows Terminal" app on a Windows 10 operating system. The VIM app is installed inside a debian WSL app. I can't wrap my head around how the entire color ...
Asad Munir's user avatar
4 votes
3 answers
66 views

search for sentences that contains a few keywords (that is not in proper order)

Is there script or function for vim to do search of words that is not in proper location (sorry, i don't know how to put it in question) ? Example: This is a vim user who like the functionality which ...
andrew_ysk's user avatar
1 vote
0 answers
64 views

gVim ':terminal' accents don't work

I am using gVim in Xubuntu 20.04. My version is vim 8.2.4295. If I use a regular terminal, like xterm, and open Vim and then type ':terminal', I can use accents, e.g., íàê, etc. while in the vim-...
Carlos's user avatar
  • 11
0 votes
1 answer
362 views

Disable/change colors in vim terminal (but not in open file)

I'm on Mac Neovim. When I type :term, I am greeted by this: This poses some issues; For example when I run a command, it also colors the output; I don't want this to happen. Is there some way to ...
user avatar

1
2 3 4 5
9