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
326 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
139 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
315 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
96 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
497 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?
1
vote
0answers
92 views

Have NeoVim confirm before closing when terminals are open

When we type :qa or :wqa, neovim quits/save-and-quits all buffers. This also closes any terminal buffers that are open, even if there are pending jobs running. Those jobs just get killed! Is there a ...
3
votes
1answer
286 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
70 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
207 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
179 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
503 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
50 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/...
9
votes
1answer
579 views

Change the cursor shape in operator pending mode

My cursor in Gvim: My cursor in Gvim after pressing d: Is there any way I can change the cursor in terminal Vim when in operator pending mode? It doesn't have to look exactly like the screenshots. ...
2
votes
1answer
130 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 ...
19
votes
3answers
8k 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
759 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
420 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?
2
votes
1answer
4k 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
378 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
255 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
79 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
493 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
107 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
231 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 ...
0
votes
2answers
86 views

How to toggle between columns=60 and columns=[terminal_width]?

My attempt so far: " Essay mode nnoremap <F5> :call Toggle_essay()<CR> function Toggle_essay() if &linebreak setlocal columns=999 setlocal nolinebreak else ...
0
votes
2answers
142 views

How do you open a file in vim from the terminal (osx)

Say I'm doing a grep for something and in the results I have a bunch of files? How can I quickly open one of those files in vim without using the mouse and without or typing the name by hand? For ...
0
votes
1answer
2k views

Execute a command in the NeoVim terminal emulator on startup

I currently am using a command within a larger bash script to start an instance of NeoVim with some options: nvim -c "terminal" What I would like to do is be able to execute a terminal command from ...
1
vote
1answer
468 views

Macvim shell command not working as expected

I recently switched to macvim, Everything work perfectly apart from the :shell command, which produces weird output, I tried few solutions but noting seems to me working out. :shell \n\w\n\u $ [...
5
votes
1answer
288 views

Why can't I set <Home> or t_kh in my vimrc file?

I'm having some problems remapping my home key; it works when I run Vim from tmux but not when I run it from a regular xterm without tmux. It looks like they're sending different escape codes and Vim ...
5
votes
2answers
915 views

Edit Neovim terminal commandline within the same Neovim instance

In bash one can edit the current commandline in $EDITOR by pressing <c-x><c-e>. I am running bash inside a terminal buffer within Neovim. I would like to be able to press <c-x><c-...
1
vote
1answer
1k views

Mappings with <alt> don't work within Terminator

In the last weeks I'm trying terminator as my terminal emulator (instead of the old and good xterm), and even though the experience is better, there's an annoying detail: all mappings involving alt ...
3
votes
1answer
2k views

Why doesn't my numpad work right in my terminal?

In several terminal programs, such as PuTTY, SecureCRT, iTerm, and Mac OS Terminal, if I have NumLock on and I press the number pad (numpad) keys 0123456789 in insert mode, my vim looks like this: y ...
1
vote
1answer
973 views

How can Vim be configured to restore normal terminal color on exit?

I have set Vim's default colorscheme to Monokai, and when I exit Vim the Monokai colors are still on the screen until I clear it. How can Vim be set to run clear automatically on exit, or change the ...
1
vote
0answers
40 views

how can I close the shell buffer? Prefferbly under a certain condition.

I have written a python script that is doing some checks for a LaTeX file and then compiles it. I call it upon saving the file using the following line :autocmd BufWritePost * !~/.vim/latex_compiler....
0
votes
2answers
509 views

Make neovim background the same colour as the terminal background

In addition to what was asked above, is there also a way for (neo)vim background colour to change when the terminal background colour is changed? It's running in OSX in the default terminal app.
7
votes
1answer
918 views

I can't move around the document while editing

I am working on a ChromeOS computer with both Vi and Vim. When I open up the editor to an existing document, I type A to begin editing. When I try to move around with my arrow keys, the following ...
1
vote
2answers
2k views

Solarized color scheme doesn't work Mac Terminal.app

I want to use the Solarized Light theme in both my Terminal and VIM. I seem to have got it working in Terminal, I downloaded the entire package from their website, tree output, and then in my ...
1
vote
2answers
997 views

Why isn't vim applying syntax highlighting to this code?

If I open a random file (in this case, say .zshrc) in a blank vim with no rc file , but with vi compatibility forcing off vim -N -u NORC ~/.zshrc As expected vim will launch and display .zshrc ...
0
votes
1answer
81 views

Why does :r!vi jam my terminal?

Is it legal to do :r!vi in vi? A friend asked me to try it and it jammed my terminal. What exactly causes this? Is there anyway to recover the terminal without closing it and opening a new one?
0
votes
1answer
160 views

Vim typescript files doesn't open first time

I have a strange issue with TypeScript or .ts files in terminal vim. I tried opening it from NERDTree or Control+P. It finds the file but for some strange reason after I hit the Enter key from ...
11
votes
1answer
322 views

What is causing my cursor to look so strange? [closed]

Whenever I hit the end or beginning of a line, I get this very odd character where my cursor was. Any idea what may be causing this? I believe I have my fonts and theme correctly installed. I'm using ...
0
votes
0answers
63 views

when vim isnt run as just vim, getting no colors

I recently started using :set termguicolors which enables 24 bit colors. However, this (along with the rest of my config) causes vim to display absolutely no colors whenever it is started in a ...
1
vote
1answer
169 views

Best way to move between panes?

Switching between panes is a pain on my Mac keyboard. There is only one CTRL key and it's on the same side as the W key. I want to map a new keystroke to make this super efficient, preferably without ...
0
votes
1answer
479 views

Print full filename in tabs when using terminal Vim

I use Vim 8.0 (homebrew) from iTerm 3. How do I use full filenames instead of these abominations that Vim seems to print by default? Some context as filenames: sidebar.php sponsors.php donate....
7
votes
3answers
417 views

How to specify the content of a new buffer from command line?

Is there a way to call Vim in such a way that it opens a buffer with some content specified on the terminal, i.e. not saved in a file? For example, I would like to run vim and have it open a buffer ...
6
votes
1answer
667 views

Clipboard sharing broke under MacOS X

I'm using (roughly) the same config for my mac and my ubuntu machine. I use set clipboard=unnamed,unnamedplus To conveniently share vim's clipboard with the system clipboard. However, lately the ...