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

disable cursor blinking in terminal-vim

I thought this would be a 10 second google search, but no. I found a bazillion sources how to disable cursor blinking in GVim. But I would like to disable it in terminal vim. My terminal cursor is set ...
1
vote
0answers
332 views

Neovim not showing correct background color

I'm running neovim from a uxterm on arch linux with the solarized color scheme. The issue is that on scrolling only the characters which are non-whitespace are displaying the correct background. ...
32
votes
3answers
11k views

Can I use a non-monospaced font in either Vim or gVim?

Is there any way to use a non-monospace font in either vim or gvim? I tried changing the font for gVim with: :set guifont=Dejavu\ Serif\ 12 But this gives me some rather ugly results: I get the ...
1
vote
0answers
360 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 '\...
1
vote
1answer
3k views

How could I create a terminal at the bottom

I could create a terminal with vim by running :term in the vim normal mode. However, this terminal is opened at the top of the window and I would like to open it in the bottom. How could I open it at ...
5
votes
1answer
687 views

Scrollback in Vim 8 Terminal

Been really loving the asynchronous terminal in Vim 8. Sometimes I have a large amount of output in the terminal, and when I enter normal mode in the terminal and use gg to go to the top, I see that ...
1
vote
2answers
291 views

Switching buffers in VI while skipping any terminal in VI 8.1

I am using multiple files within the same tab and when I switch buffers using :bn I reach the terminal, at which point I have to issue the command again to move. Here is the catch, I am using keymaps ...
0
votes
1answer
260 views

Scroll wheel inserts seemingly-random characters in cygwin vim, depending on where on the screen the mouse cursor is

I have the following options set to non-default values, as reported by :redir @+ | :set | @redir end: --- Options --- autochdir cscopetag foldcolumn=7 hlsearch lazyredraw relativenumber sidescroll=1 ...
7
votes
2answers
243 views

How to capture errors from make in terminal window

Vim 8.1's release note seems to indicate that you can feed output from make running in a terminal window to a quickfix list, but I couldn't find any detailed explanation. Is there a way to do this ...
2
votes
1answer
238 views

Clear shell screen everytime a shell command is run

Is there a way to clear the shell screen everytime before running a terminal command within vim? This would be most useful to me when running scripts while editing it as I have a binding for Python ...
2
votes
2answers
327 views

hide the WinBar (TermDebug)

Vim 8.1 add a new :Termdebug command with a really good gdb integration. If the mouse option is set, there is also a visual bar appearing on vim. Here is an extract of the man: If 'mouse' is set the ...
3
votes
0answers
436 views

Getting balloonevalterm to work (terminal version)

I'm trying to get balloonevalterm to work in the terminal version of vim, but for some reason it does not yet work. Here's my macros.vim file: function! MyBalloonExpr() let macros = { \ 'MACRO' : ...
18
votes
2answers
6k views

Scroll the screen, not the cursor, when using scrollwheel

I'm using Vim in a terminal, so scrolling with the scroll wheel uses the \e[A and \e[B syntax (where \e symbolizes \x1b, or escape). However, Vim interprets this by moving the cursor up or down a ...
1
vote
3answers
483 views

How to redirect terminal output to vim or get `vim like` behaviour in terminal output [closed]

How to get vim keybindings at terminal output so I can navigate/operate at terminal output like in vim or get smooth shell command processing in vim. For example I type: ifconfig an i want to make ...
1
vote
0answers
50 views

How to pass C-r to Vim terminal window? [closed]

In the Vim terminal I want to be able to search history in bash and ipython but C-r is already bound to basic Vim functionality. Is there any general way to pass this and other characters to the ...
1
vote
0answers
278 views

vim does not redraw the screen properly when scrolling the page up or down line-by-line

I am connected to a Windows SSH server from a Linux client, on Windows I end up in a Powershell. For small,quick edits I use the official vim windows console binary. It seems to work without ...
0
votes
1answer
318 views

What does `-` mean in command `ls -la | vim -`?

I got to know commands like ls -la | vim - can be used to open Linux command output in vim. What does - mean after vim? Is it some kind of special switch? Why doesn't simply using ls -la | vim works ?...
2
votes
0answers
63 views

Implement “Press any key to close” in neovim terminal buffer

When running shell commands in a terminal buffer I often just want to examine the output, and then close the buffer. Let's say I call :term ls. How would I implement a simple "Press any key to close" ...
0
votes
1answer
385 views

Scrolling the terminal with vi shortcuts? [closed]

I have vi shortcuts set on my gnome-terminal and can't figure out how to scroll through the terminal's output after the change. Before I could use Shift+Page-up, but this isn't working in normal or ...
1
vote
0answers
38 views

How to execute (using bash) a buffer with line continuations (\)?

In vim8, you can do: :. term to send the current line to execute in your terminal's shell (e.g., bash). But how, in normal and ex mode, do you execute a single line that contains line ...
1
vote
1answer
285 views

Delayed esc from insert mode caused by cursor-shape terminal sequence

I set a couple terminal options so that Vim changes the cursor shape to a vertical bar when I enter Insert mode, an underbar for Replace mode, and a block when I return to Normal mode: let &t_SI="...
1
vote
0answers
217 views

Normal highlight group changes cursor color in vim in xterm

I set the following highlight: :hi Normal ctermfg=250 ctermbg=235 The text is a nice light gray on dark gray, as intended. But the cursor has become dark blue. I'd love to have it just be the ...
4
votes
1answer
1k views

Is it possible to change the statusline color in Vim 8 terminal windows?

I would like to change the default green terminal statusline below to my usual colorscheme statusline color: Is this possible? There is no mention of it in :h terminal.
0
votes
1answer
142 views

bash script to open file and translate text

I have followed your post and used :%s/\\u\(\x\{4\}\)/\=nr2char('0x'.submatch(1),1)/g to translate unicode escape sequences. However I have to open the file and need to press escape and paste your ...
2
votes
0answers
335 views

How to use arrow keys mappings in vim-submode plugin on linux terminal?

Following this answer I've been using vim-submode for some months on a windows gVim. Now that I'm trying to apply the same configuration on a terminal vim on linux I have some problems: With the ...
3
votes
1answer
1k views

Up arrow key code, why '^[[A' becomes '^[OA'?

If I run cat under terminal (xterm-256color), and then press the up arrow button, I see ^[[A as output. But if I press <ctrl-v> <up> in vim insert mode, I see ^[OA as output. So i wonder ...
1
vote
1answer
186 views

How to know the shell started with :terminal?

After :terminal runs, is there a way within Vim script to determine the type of shell that started with creation of the terminal ? within Vimscript, NOT via OS commands such as ps.
3
votes
1answer
381 views

Remapping Alt key in terminal: problem with macros

I'm using xfce4-terminal. I remapped most Alt+key combinations in a file that is loaded in the .virmc. The file (called alt_bindings.vim, only loaded in vim 8 terminal mode) is like this: set <M-...
1
vote
1answer
114 views

Name the buffer with the current command that runs in the term emulator

I know it's weird and I don't know if it's possible but it would be great to have the name of the command I run in the terminal emulator when I use bash or zsh. At the moment, to launch a new ...
1
vote
1answer
536 views

Why some information can't been shown at status bar with iTerm2?

Installed vim with SpaceVim on macOS. When ran vim in the iTerm2 terminal, the information can't been shown rightly at status bar. Much of them been shown as ?. Why?
3
votes
1answer
349 views

Get back regular vim colors

I just installed Linux Mint 18.3 and to my surprise colors in vim changed! Vim in the terminal on the left has the color scheme I've always seen and got used to. Vim in the terminal on the right has ...
2
votes
0answers
74 views

Color questions for macOS

I just got a mac and have been trying to setup Vim 8 on the built-in terminal. I am mostly having some difficulties with colors. 1) After set number, how do I change the line number colors? I tried ...
3
votes
2answers
2k views

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

I edit file /home/me/projects/myproj/src/util.c And want to start terminal at /home/me/projects/myproj/src. Vim version > 8 so I can run :terminal but it always starts at folder in which I've opened ...
2
votes
3answers
208 views

Running autocmd somehow turns to insert mode

So, here's my problem. I want to be able to run make build whenever I save a source code file and see it in a split pane. If I manually run :split | :te! make build, I get a split pane, my makefile ...
5
votes
1answer
3k views

Change cursor shape in different terminals

At home I use iTerm2 on MacOS X, and at work, I have a laptop with CygWin. I have another PC where I use gnome-terminal or terminator, and sometimes I use tmux. I'm looking to configure the cursor ...
12
votes
0answers
191 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-...
0
votes
1answer
595 views

Cancel mouse highlight on mac

Whenever I use vim, sometimes I make a single-touch touchpad on vim screen and it makes a highlight like the picture below. The problem is this I cannot cancel this highlight. right click doesn't ...
0
votes
1answer
57 views

disable flow control and restore it when leaving vim

A few editors that expect to be able to use ^S and ^Q themselves (e.g. gnu emacs, jed, mg) disable flow control in the terminal when the program starts, but restore the original setting when the ...
1
vote
1answer
2k views

Vim in terminal is black-&-white but vim launched from dash shows colors

I am using Vim 7 on Ubuntu 16.04 (gnome) and the terminal emulator I am using is terminator. I really like the aristocrat/brogrammer colorscheme for Python and so I copy-pasted it in ~/.vim/colors/...
2
votes
1answer
155 views

Suppress system broadcasts/messages

Is it possible to suppress messages in vim that are coming from the system or shell? E.g. message from sysadmin or batch queue messages when jobs complete. Note that I want to specify this at the vim ...
21
votes
3answers
9k views

Can the split separator in vim be less than a full column wide?

I use a tiling window manager (awesome) + a terminal multiplexer (tmux) + splits inside of vim. I have no window decorations at all, so you there is no visual split between them at all if the content ...
0
votes
2answers
837 views

Using terminal in tab to open a file in that same tab

In Neovim it's good to have a terminal window open amongst the other windows (which are displaying regular buffers). Sometimes, in the terminal, I'll want to edit another file. Ordinarily you'd just ...
2
votes
0answers
481 views

How to detect terminal enter in vim8

Vim8 now has a terminal feature, how can I detect when a terminal is started? Neovim has TermOpen and TermClose autocommand events, does vim8 has an equivalent?
3
votes
1answer
5k views

Make vim show all the colors

I have a problem with making vim show a colorscheme fully (like in gvim). I've read about how to enable 256 color mode in terminal and it vim, but somehow it just doesn't work. The state of now is: :...
0
votes
1answer
444 views

How can I temporarily change to default color scheme?

I use gnome-termial most of the time, and the Nord colorscheme works well withat hat. I sometimes also use Tilda (another terminal emulator), and the Nord colorscheme doesn't work well with that! I'...
6
votes
1answer
276 views

How to prevent accidentally piping text to Vim?

I use Vim to edit the output of shell commands all the time. Appending the dash in this line is second nature: $ ./some-command | vim - But every once in a while I get distracted and forget: $ ./...
2
votes
2answers
84 views

Automatically increase &columns upon :vsplit, but not beyond maximum

I wanted vim to increase its &columns automatically when I do a :vsplit, so I implemented the advice found here: https://groups.google.com/forum/#!topic/vim_use/R4gg-YdPHJM Basically, you add: ...
1
vote
1answer
541 views

return to buffer after exiting terminal, neovim

Most of the time I have my window split, after editing some code, I :terminal to run some commands to check if my changes make sense. when I exit the terminal, I don't have the window split anymore, I ...
1
vote
1answer
112 views

Text changes when moving cursor over

I was modifying an email template and I noticed that when moving the cursor over a piece of code it changed. Here is a screenshot from before: and after: Vim version is 7.4 on Ubuntu 16.04. Any ...
3
votes
1answer
246 views

Mapping vim key to change to next tab in Konsole

Description: In my Konsole the key mappings for changing tabs to left and right are Shift-left and Shift-right (where left/right are the arrow keys). What I'm trying to do is to map F2 in vim to ...