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
6
votes
1answer
277 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
87 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
561 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
247 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
94 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
174 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 ...
1
vote
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
514 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
305 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
1k 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
1k 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
579 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
1k 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
1k 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
182 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
341 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
66 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
189 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
587 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
457 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
725 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 ...
1
vote
0answers
343 views

terminal color interferes with vim colors

The following screenshot displays the sorcerer colorscheme displayed in mintty on cygwin windows with the following minttyrc: # CursorColour=191,191,191 # ForegroundColour=220,220,204 # ...
3
votes
2answers
1k views

Is there a way that I can identify which window is a terminal after calling the `:term` command in neovim?

Is there way I can identify a window by a number in neovim and then jump to it with a macro ? Or better yet...Is there a way that I can identify which window is a terminal after calling the :term ...
1
vote
1answer
529 views

How to change buffer name for NeoVim Terminal special buffer

If I execute a interactive command with :terminal, buffername will be something like: term://.//1234:command executed here with params. I want to be able to change it to something more meaningful to ...
1
vote
1answer
99 views

Why does this clipboard manipulation that works on Vim not work on GVIM?

In my .vimrc I have this piece of code: " Gist it to bl.ocks.org {{{ let g:gist_clip_command = 'xclip -selection clipboard' command! -range=% Blocks \ <line1>,<line2>Format format | f ...
0
votes
1answer
610 views

Vim doesn't refresh screen when going fullscreen

I've just upgraded to a new laptop with Ubuntu 16.04 and installed Vim 7.4 1-1952. I installed most of my plugins when I noticed that 80% of the time when I press F11 to go fullscreen, Vim doesn't "...
0
votes
1answer
962 views

Wrong colors inside tmux

In vim without tmux: In vim with tmux: Color in Vim is 'default' My .vimrc has nothing related to colors. My .tmux.conf is empty. My .bashrc is untouched. I am using gnome-terminal with a custom ...
1
vote
1answer
148 views

PyClewn Failed to start error

I have been trying to get PyClewn to work by following the instructions step by step without much luck. This is the error I get when I type :PyClewn into vim: Running nbstart, <C-C> to ...
10
votes
4answers
4k views

Use case for neovim terminal emulator?

One big difference of neovim and Vim is that neovim includes a terminal emulator that works asynchronously. However, I fail to see how can I profit from this feature. For what can I use it? Can you ...
4
votes
2answers
585 views

How do PuTTY/KiTTY ANSI colors affect Vim colorschemes?

I'm having a hard time understanding how the ANSI colors affect the named colors in Vim. My KiTTY terminal has "regular" and "bold" versions for the main 8 colors, plus foreground/background colors. ...
1
vote
1answer
159 views

Vim not displaying deleted text correctly in tiling WM

I'm sorry if the question doesn't make much sense, but I really don't know how else to describe it. I'll do my best to clarify. Let's say I have a text file containing the words here is some text ...
2
votes
2answers
1k views

Vimscript-python support not working in terminal

When starting vim in a mingw64 terminal emulator on windows, the command :py print(1) fails, saying Could not load library msys-python2.7.dll Sorry, this command is disabled, the Python library could ...
1
vote
1answer
901 views

Ethan Schoonover's Solarized color scheme does not work as expected

I'm trying to use this color scheme on my Ubuntu system. I installed the package using Option 1 in GitHub, and modified .vimrc as instructed. It turns out that the colors displayed are different as ...
2
votes
0answers
308 views

Changing background color of cursor during selection

Coming from Sublime, I find the following behaviour frustrating. When I select some text, the first (or last depending upon which way you select) character flashes between the text color and your ...
2
votes
1answer
52 views

Using '-c' when calling vim from terminal

My issue is with using the -c while calling vim from terminal like $ vim -c jk I want to be able to open the last session before quitting on typing viml in terminal For this I made a map to save ...
2
votes
1answer
50 views

What captures the <Shift>+<Ins> key combination?

When I press SHIFT+Ins in vim to paste text, who captures this key combination? Is it the terminal or Vim? How about in gVim?
1
vote
0answers
282 views

Visual selection in Nvim-R plugin sends one line too much to terminal

I have just set up the Nvim-R plugin for Neovim to send lines of code from an .R-file opened with Neovim to a terminal inside a tmux session. Previously, I have worked with its predecessor Vim-R, ...
1
vote
1answer
2k views

Problem with color, symbols and upper bar using airline with Vim in terminal

I noticed 3 problems with my Vim terminal setup on Ubuntu which can be illustrated by the following picture of my current Vim. I get the same look with a lot of airline-themes (e.g. molokai, ...
8
votes
2answers
3k views

Mapping Ctrl+s does not work

I am trying to map Ctrl+s to save my file however it does not work. My mappings: map <C-s> :w <CR> :echo "Saved" <CR> imap <C-s> <Esc> :w <CR> :echo "Saved" <...
6
votes
0answers
509 views

Patched font for devicons doesn't show up in terminal [closed]

I would like to install the Vim plugin "vim-devicons". But I am unable to install the patched font "Hack". I copied the following file into ~/.local/shared/fonts. The installation of the font seems ...
3
votes
0answers
71 views

Double SSH on Vim [closed]

I can edit remotely a file located on Machine_1 using vim name@Machine_1/file_1.txt It uses my .vimrc, plugins and everything is great. However, there is also a Machine_2 in the history, that can ...
3
votes
1answer
572 views

How does vim map keystrokes to hex values?

This question might be a little bit out of the ordinary for this site, but I want to better understand how vim works under the hood. I know that if I enter the hex value 0x01 vim will display it as ^A....
2
votes
0answers
260 views

Send SIGINT to iTerm from vim

I'm using vim-rspec on a mac with macvim and iterm. I'm using this command to clear the iTerm screen and run the test in iTerm. let g:rspec_command = "clear && rspec {spec}" let g:...
3
votes
2answers
878 views

When using bash or another shell from a buffer, how do I modify text?

Inside vim, I often use conque plugin, so I can run a bash shell inside a vim buffer. I also may try out VimShell soon. In conque, lets say I start typing some bash command, and before I enter it, I ...