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
26 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
183 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 ...
Hunter T.'s user avatar
  • 101
1 vote
2 answers
335 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
102 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
73 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
  • 481
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
0 votes
0 answers
104 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
2 votes
1 answer
148 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
68 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,172
0 votes
2 answers
186 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
35 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
94 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
182 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
71 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
77 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
415 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
88 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 ...
gruvw's user avatar
  • 63
0 votes
1 answer
574 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, ...
john's user avatar
  • 183
0 votes
1 answer
149 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, ...
Nimrod Weinberg's user avatar
0 votes
1 answer
108 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 ...
raylight's user avatar
  • 525
1 vote
1 answer
2k 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 ...
raylight's user avatar
  • 525
1 vote
0 answers
170 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" ...
Nimrod Weinberg's user avatar
1 vote
1 answer
126 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 ...
Nimrod Weinberg's user avatar
1 vote
1 answer
182 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 ...
raylight's user avatar
  • 525
1 vote
0 answers
93 views

How to pre-render a terminal buffer before displaying it in a popup

I am currently trying to write my first plugin. So this is my first attempt at vimscript. I want to display the output of a shell command in a popup window. This can easily achieved with: command Cat ...
neolith's user avatar
  • 133
0 votes
0 answers
18 views

Vim only colours background of area with text in it [duplicate]

If I'm using kitty terminal the $TERM environment variable is xterm-kitty, which supports truecolour. I have set termguicolors in my .vimrc. When the terminal is in dark mode, and I enter set ...
dnaik's user avatar
  • 101
0 votes
0 answers
44 views

vim search result minimap and vim minimap bug

I have installed minimap on my vim 8.2, it is quite good, but i found bug in it. Is there a "minimap" that can display search result on it too ? something like kate, when i do a search on ...
purityKEF's user avatar
2 votes
1 answer
308 views

:terminal, change prompt color or background color

When I run :terminal, I have a combination of blue color of the prompt over a grey background and I can barely read what is written, see attached image. What options can I add to :ter in such a way I ...
Barzi2001's user avatar
  • 481
0 votes
2 answers
164 views

Is there a way to run current script in a split window (mimicing VSCode for example)?

When editing a script in vim, I can run it with :! bash % or :! python % for python scripts. When running the script, vim kinda goes back to the terminal, runs there, and then, after "ENTER" ...
CIsForCookies's user avatar
0 votes
1 answer
229 views

Vim execute script on write

Ok i used " :term perl" in vim and it opened a horizontal split window (embedded terminal) with my perl code in the other split window. I like now to execute the perl code by simply saving ...
vamsi reddy's user avatar
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 ...
TheGreatZab's user avatar
1 vote
0 answers
46 views

Strange code sequence <80>ýa <80>ý` recorded with -w

I was noticing when I exit Insert Mode using ctrl+[, and very quickly press ctrl+w q wanting to quit, every time I will end with ctrl+w dropped for unknown reason and a pending q. I tried starting vim ...
Masquue's user avatar
  • 81
0 votes
1 answer
76 views

Temporarily enclose visual mode selection in parenthesis before executing command

I'm using neovim for working with Elixir, with the neoterm plugin which gives me REPL functionality. A well known challenge is that the fact that the terminal evaluates and executes code line by line, ...
djfinnoy's user avatar
  • 103
1 vote
1 answer
311 views

How to change foreground color of character underneath cursor?

I've tried setting the highlight rules below but it does not work. Whatever color I choose, the color of the character stays the same. I'm using xfce4-terminal on Linux and Terminal.app on Mac OSX. ...
Looft's user avatar
  • 113
2 votes
1 answer
136 views

Prevent Vim setting Application Keypad Mode on my VT520

I am attempting to use Vim via a serial console and every time I launch it, vim sends ESC= and instructs the console to enable Application Keypad Mode and my numpad stops working. How do I stop it ...
Lexi's user avatar
  • 123
3 votes
0 answers
229 views

Why do <S-Left> and some other keys not work in vim under tmux?

I know at least about <S-Left>, <S-Right>, <C-Left>, <C-Rigth>. But I guess there are others. I'm mostly interested in the why. Because knowing a reason often makes finding a ...
x-yuri's user avatar
  • 349
3 votes
0 answers
41 views

Mouse highlight lines issue, root cause of data deletion / messed up

[https://gofile.io/d/zA8QPs]video of vim highlight issue1 I like vim a lot, the stability is wonderful.. However there is 1 protection feature that i need to have most. I am used to use vim with both ...
purityKEF's user avatar
4 votes
2 answers
2k views

How to robustly use D- mappings in terminal nvim?

I'm using kitty to run terminal nvim on macOS. I want to use D- (command-key) mappings inside nvim. Because terminals, for reasons I don't understand, don't simply pass command-key chords through to ...
Sean Mackesey's user avatar
4 votes
0 answers
209 views

Pasting from vim to an ipython terminal

I have an open ipython terminal open, and I'd like to paste the visual selection to it, with prepending "%cpaste" and appending "--" This is what I came up with function! ...
Uri Goren's user avatar
  • 141
0 votes
0 answers
114 views

Vim Plug installment error on MacOS: Error creating directory /Users/api/.vim/autoload

I just migrated today from VSCode to Vim, and I need a little bit of help regarding the installation of Vim Plug. I installed Vim with Homebrew, and now I want to install Vim Airline. The tutorial I ...
AporBokor's user avatar
2 votes
1 answer
912 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 ...
User's user avatar
  • 21
1 vote
0 answers
2k views

error: there was a problem with the editor "vi" -- while trying to change deployment file

Facing this error error: there was a problem with the editor "vi" when trying to change a deployment file in the Kubernetes cluster (AKS) kubectl edit deploy xxxxx -o yaml upon exiting the ...
Manoj vardhan reddy's user avatar
2 votes
2 answers
1k views

Is it possible to execute a vimscript from the command line?

I don't know very well how to work with vimscript... Because of that, I'd like to find a way where I can easily test what I'm trying to accomplish on my vimrc file, with some prints like on other ...
raylight's user avatar
  • 525
0 votes
1 answer
131 views

Using a vim syntax file, I would like some Keywords, such as ??, to be colored

I have been trying to get through the syntax file documentation on vim help, https://vimhelp.org/syntax.txt.html#%3Asyn-files but it's quite the read and I figured someone here may know how to go ...
jf4i2d's user avatar
  • 1
0 votes
1 answer
71 views

Is there a way to have specific settings activated when using the term feature?

I often have neovim in a horizontal split mode with two buffers. The top buffer is the text file that I'm editing, and the bottom buffer is running a terminal using the term feature. I typically use ...
nsg's user avatar
  • 103
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 ...
Revise's user avatar
  • 201
0 votes
1 answer
66 views

Shell script runs multiple times, I want it to run only once

I use vim pretty extensively for latex compiling. I've a function which automatically compiles the current tex file. I use pdflatex as a compiler, which creates a bunch of different files that it ...
nikinbaidar's user avatar
0 votes
0 answers
75 views

vim in xterm not redrawing properly

Since this problem exists only when using vim in an xterm (neither gvim nor vim in aterm demonstrate this on my computer) this is likely not a vim problem, but because it is sooooo annoying when using ...
Whilom Chime's user avatar
1 vote
1 answer
2k views

How does "set mouse=a" actually work?

Could somebody explain, what is the reason to use set mouse=a? People say that thus I will be able, for example, to resize split windows (:sp, :vsp) by dragging separators, but I already can do it if ...
user90726's user avatar
  • 113

1
2
3 4 5
9