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
0 answers
10 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 ...
0 votes
0 answers
31 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__(...
  • 135
1 vote
1 answer
24 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: ...
  • 225
0 votes
0 answers
74 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 ...
1 vote
1 answer
30 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
0 votes
1 answer
29 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....
  • 121
2 votes
1 answer
57 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
33 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 ...
0 votes
1 answer
29 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 (...
  • 225
1 vote
1 answer
51 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: ...
  • 225
0 votes
1 answer
144 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>') ...
0 votes
1 answer
53 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, ...
  • 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.
  • 162
1 vote
1 answer
45 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 ...
  • 363
2 votes
1 answer
194 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=...
  • 1,131
1 vote
2 answers
34 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 :...
  • 2,014
0 votes
0 answers
101 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 ...
1 vote
0 answers
24 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 ...
  • 225
0 votes
0 answers
50 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 ...
  • 101
2 votes
1 answer
618 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. ...
  • 229
0 votes
2 answers
85 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 ...
  • 225
0 votes
1 answer
38 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 &...
  • 225
0 votes
0 answers
8 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 ...
  • 225
1 vote
2 answers
236 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 (...
  • 111
0 votes
0 answers
113 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 ...
0 votes
0 answers
22 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 ...
0 votes
0 answers
81 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 ...
1 vote
1 answer
116 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 ...
  • 111
0 votes
1 answer
65 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 ...
  • 113
1 vote
0 answers
23 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 ...
  • 225
1 vote
2 answers
572 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 "...
0 votes
0 answers
62 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 ...
  • 146
1 vote
0 answers
17 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=' '=+...
1 vote
1 answer
57 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})...
0 votes
0 answers
36 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=...
  • 2,014
0 votes
2 answers
99 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 ...
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?
  • 11
0 votes
1 answer
50 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 ...
1 vote
1 answer
138 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 ...
4 votes
2 answers
59 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 ...
0 votes
0 answers
30 views

vim-ternimal normal mode splits wrapped lines to 2 lines

Is there a way to make vim treat it as a single line? This blocks some functionality for example navigating to that line and hitting gf to open the file. Because it is read-only I can't even join the ...
1 vote
0 answers
63 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-...
  • 11
0 votes
1 answer
315 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
0 votes
1 answer
80 views

How can I close vim's parent terminal from within vim?

I am trying to close the terminal window directly from vim. The final purpose of this is to have a command (shortcut) that opens VSCode in the current directory from vim (when I need a GUI editor) and ...
  • 101
0 votes
0 answers
193 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, ...
  • 163
0 votes
1 answer
73 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
1 answer
53 views

How can I continue executing commands on a splitted terminal window with Vim?

Let's say I run the following command on a node.js file inside Vim: :terminal node %" I'd like to continue executing commands on the newly opened window with a single command. But if I try ...
  • 465
0 votes
1 answer
961 views

How can I execute mjs files (node.js modules) inside Vim with the terminal command?

Let's say I have a pure node.js file.js as the following: const fs = require('fs') console.log("Hello World") If I execute it inside Vim with :%terminal node it works perfectly fine. I see ...
  • 465
1 vote
0 answers
92 views

synchronizing vim-terminal pwd and vim pwd

I'm looking for a way to synchronize the vim-terminal pwd and vim pwd. so for example in normal terminal, navigate to directory a >cd /a/ open vim terminal > vim -c ":term ++curwin" ...
1 vote
1 answer
63 views

vim terminal linewrap in normal mode

So suppose there's some text in vim terminal that is longer than the terminal width and it causes a wrap. Now suppose I go into normal mode in that terminal. In normal mode, we have an addition of 4 ...

1
2 3 4 5
9