Questions tagged [linux]

For questions specific to the Linux operating system.

Filter by
Sorted by
Tagged with
32 votes
2 answers
13k views

Why is Vim for Debian compiled without clipboard?

I'm curious as to why the default Debian package for vim (the one you normally get by sudo apt-get install vim) isn't compiled with clipboard support? Neither the regular -clipboard or -Xterm-...
Gustav Blomqvist's user avatar
29 votes
2 answers
14k views

How do I get Vim to be able to run both python and python3 on a Linux system in the same session?

On Linux systems, packaged Vim typically has only one of either python or python3 enabled. It is possible for both to be enabled (using python/dyn and python3/dyn), but during a session, only one can ...
muru's user avatar
  • 24.8k
25 votes
2 answers
9k views

Prevent Vim from clearing the terminal after exit

If I do: $ less file And press q to exit less, I stil see the same text as I had on the screen when less was still running. However, if I do $ vim file And :q, my terminal is blanked... ...
Martin Tournoij's user avatar
23 votes
1 answer
32k views

How do I use the system clipboard with Vim in Arch Linux? [duplicate]

I am using Vim on Arch Linux through urxvt. Since there is no "Ctrl-V" or "Ctrl-Shift-V" support in urxvt, there is no way for me to paste things I have copied from my browser (let's say) into my vim ...
alexytsu's user avatar
  • 816
21 votes
1 answer
8k views

How do I get +clipboard support in Fedora 20?

It seems to me that neither "+p nor "*p works for me. How can I know if my Vim is installed and set up properly to make them available? And if it's not set up, what can I do to set it up? I'm running ...
yo''s user avatar
  • 1,141
20 votes
2 answers
22k views

How to change the space between lines in vim?

I'm wondering whether changing the space between lines is possible. How can I change "Line spacing"?
newbie16's user avatar
  • 303
18 votes
2 answers
4k views

Vim cannot find medical spell files

Problem specification I would love to have a medical spell dictionary in vim. Currently, I have a lot of medical terms in my own personal English dictionary right now. However, using an official ...
melvio's user avatar
  • 599
17 votes
5 answers
31k views

How to copy across terminals?

I'm using Linux system. Two vims are opened in two terminals. Now I'd like to copy text from A to B. One way to do so is to select text in A, use mouse to copy, then switch to B, in the insert mode, ...
user3813057's user avatar
  • 1,451
15 votes
1 answer
2k views

How to use backtick-expansion to populate the arglist?

From help :help backtick-expansion: On Unix and a few other systems you can also use backticks for the file name argument, for example: :next `find . -name ver\\*.c -print` :view `ls -t *....
saginaw's user avatar
  • 6,736
14 votes
3 answers
15k views

How do I tell if Vi or Vim is installed on my Linux distribution?

I use Kubuntu 14.04 with its default installation (bash, Konsole). I want to learn a powerful, all-keyboard, text editor, and settled on one of these: Vi, Vim, Emacs, (and I'll learn Nano since it's ...
user12711's user avatar
  • 367
14 votes
7 answers
15k views

how to change python interpreter used by jedi-vim

I have Anaconda (including python3.5.2), VIM (7.4) and Jedi-VIM installed on my system. There was also a python installed on the linux system by default. The autocompletion is working on base ...
R. Doe's user avatar
  • 321
13 votes
4 answers
2k views

How to delete till the end of the previous line (i.e. to end of line above)?

An example (The ^ is the cursor position): Before: a bc def ghi j k l mn o p q rs ^ After: a bc def ghimn o p q rs ^ or at least: a bc def ghimn o p q rs ^ I know I ...
silviubogan's user avatar
13 votes
1 answer
3k views

Spell mistakes have weird coloring

I am using spell checker in vim, and I find one feature very annoying: errors are being highlighted with some weird color, which is nowhere to be found in gnome terminal settings: I would like to ...
jligeza's user avatar
  • 537
13 votes
2 answers
508 views

Raise window holding swap file

From time to time while working on multiple projects, and / or what ever, it leaves me with (too) many Vim instances open – as happens, I open a file which already is opened elsewhere, leaving me with ...
Runium's user avatar
  • 1,237
9 votes
1 answer
13k views

How to build vim from sources with GUI support?

I am trying to build vim from source, especially gvim, to get some of the bug fixes that have been plaguing me in the office repository. I can compile vim fine but gvim is not being generated due to ...
Sardathrion - against SE abuse's user avatar
9 votes
3 answers
11k views

How to resolve E303 (Unable to open swap file) on Linux machine?

I get E303 (Unable to open swap file for "{filename}", recovery impossible) when I open a file in vim in my Ubuntu system. I see that the backupdir and directory environment variables are set ...
work.bin's user avatar
  • 223
8 votes
2 answers
5k views

How to change location of ~/.vim

I have Vim 7 installed from my distro's package manager, and I compiled Vim 8 from source. Vim 8 is all in /usr/local. Then I created a new directory in $HOME called ".vim8". I have all my Vim 7 stuff ...
Todd Walton's user avatar
8 votes
2 answers
5k views

How can I build vim with just python 3 support?

I'm on Arch, and recently the vim-python3 and gvim-python3 packages were removed, so I'm working on building vim from source such that the :python command will act as python3. Specifically, I'm doing ...
Davis Yoshida's user avatar
8 votes
2 answers
3k views

gvim window looks bad

I don't know why my gvim windows looks like this in linux. Is there anything I need to add to my vimrc file in addition to this? execute pathogen#infect() syntax on filetype plugin indent on set ...
neelabalan's user avatar
8 votes
1 answer
31k views

Change a font in Vim/GVim in a simple way

I merely want to change a font in Vim/GVim. That's it. This doesn't work: font=Monaco\ 14 I've done a google search and I wonder, why is for such a elementary task there's no simple answer which ...
Kolayn's user avatar
  • 133
8 votes
1 answer
2k views

Why does `set nocompatible` result in vim saving extra, all-numeric temporary files?

I've narrowed down a bug in a program I'm working on to (surprisingly) some vim behavior! The program contains a file watcher. When I write a file with vim -u NONE and all the default settings, the ...
wchargin's user avatar
  • 2,717
7 votes
1 answer
3k views

Run bash command on writing a file with a particular extension?

I want to run a bash command on writing a .less file, saving it and generating the corresponding .css file with the same name and in the same directory. I do have the bash command which generates the ....
oddRaven's user avatar
  • 235
6 votes
3 answers
1k views

How can I print from vim using the native KDE print dialogue?

I'm using vim from a terminal emulator, and I'd like to be able to print using KDE's native print dialogue. This would let me select options such as printer, collating, number of copies and pages per ...
Sparhawk's user avatar
  • 580
6 votes
3 answers
2k views

Install Vim with +clipboard support but without Gvim?

My distribution comes with a minimal version of Vim. vim --version returns -clipboard, so the * and + registers interact (copy/paste) with the primary and clipboard do not work. The resources I've ...
Quasímodo's user avatar
  • 2,436
6 votes
1 answer
827 views

vim, vimdiff, ex, view, rvim and rview: How do they start in a different way when they are symlinks to the same binary?

I just installed version 8 of Vim and notice in the bin directory of the install location that all the above mentioned programs point to the same binary – vim. Then, how does it know when I invoke ex ...
Ketan's user avatar
  • 265
6 votes
1 answer
333 views

In Linux, on an extremely long running vim session, calls to system() fail with E484 "can't open file /tmp/<tempfile>"

I've noticed this only on long running vims in my Linux server. I've narrowed down the E484s to lines of my vimscript that call system. I just wonder if there is a way to deal with this because so ...
Steven Lu's user avatar
  • 2,249
6 votes
1 answer
2k views

Weird vertical bar to left of line numbers

Couldn't find anything on this by searching, so hopefully it's not super obvious. Every now and then, through some accidental sequence of keys, a solid bar appears to the left of my line numbers. I ...
Tyler Holden's user avatar
6 votes
1 answer
424 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: $ ./...
Zilk's user avatar
  • 205
6 votes
1 answer
2k views

How to use a specific vimrc file and still load the usual files?

I'd like to automatically set my Vim preferences on the root account, when I use it (throught a sudo bash or sudo su-like command), without changing the default configuration of the root account (...
Kzwix's user avatar
  • 63
6 votes
1 answer
5k views

How to redirect the output of a command as the quickfix list to a vim server / function?

When I click on a link in thunderbird and firefox is already running, it doesn't open a new window, just a new tab. I want the same thing for vim: no matter where I am and how I send a bunch of files ...
saginaw's user avatar
  • 6,736
5 votes
2 answers
3k views

How can I check if Vim is 32 bit or 64 bit? (On Linux!)

How can I find out if the vim I'm using is 32 or 64 bit? I'm using Ubuntu so this doesn't apply to me, I think. Also I checked :version and got this output: VIM - Vi IMproved 7.3 (2010 Aug 15, ...
caligula's user avatar
  • 193
5 votes
3 answers
5k views

How to show all unsaved files opened in vim?

I'm not sure if I should ask this problem on vim or on Linux/Ubuntu forum. The thing is, I opened multiple terminals on my desktop, and several of them opened various of *.txt files. Not all of them ...
user3813057's user avatar
  • 1,451
5 votes
3 answers
2k views

How do I open file under cursor, when the filename has a trailing dot?

There is a file with name ./folderA/folderB/file.. And there is text: ./folderA/folderB/file.:abcdefg When I move the cursor on letter B and type <c-w>f, it says E447: Can't find file "./...
user3813057's user avatar
  • 1,451
5 votes
2 answers
618 views

Source a vimrc from a webpage?

I work with lots of different servers and would like to unify my vimrc across them all. I see that vim has the source command, which I'm assuming works similar to bash. In bash, to source a file from ...
Egrodo's user avatar
  • 153
5 votes
1 answer
5k views

Using vim-addon-manager

I just downloaded and installed vim-addon-manager using sudo apt-get install. I'm not sure what to do next, I entered vim-addon-manager at the bash prompt (Ubuntu 14.04). Here is the output: ~$ vim-...
gracious1's user avatar
  • 283
5 votes
1 answer
2k views

How can I print from nvim on linux

I would like to be able to send my currently open text file to the paper printer. I often use nvim to create a daily scratch to do list, and need a paper copy to go with me in my back pocket through ...
Kes's user avatar
  • 641
5 votes
1 answer
113 views

What are the methods of speeding up parsing of a big file using Ex?

I did recently some performance test where I've created artificially 1GB of random text file by: $ hexdump -C /dev/urandom | rev | head -c1G | pv > file which has around 13mln of lines starting ...
kenorb's user avatar
  • 18.3k
5 votes
3 answers
627 views

how to stop vim suspending when using gx

When I press gx over a link in vim, it opens it in an external application, when it does this it also suspends Vim. How do I prevent it from suspending Vim, so that I can use Vim while browsing ...
Electronic Mail's user avatar
5 votes
1 answer
850 views

Understanding :help set-termcap

I would like to define some mappings involving key combinations like <S-F1> or <A-d>. For example something like this: nnoremap <A-d> :echo "hello world!"<cr> However, on my ...
saginaw's user avatar
  • 6,736
5 votes
0 answers
90 views

gvim: Make the mouse follow CTRL-W_j and CTRL-W_k

I run a Linux/GNOME laptop where the focus follows the mouse, and I have vim's mousefocus feature turned on, so the selected viewport follows the mouse, too. But when I try to switch viewports using ...
Michael Scheper's user avatar
4 votes
1 answer
1k views

Why does gvim read /usr/share/vim/vimrc instead of ~/.vim/vimrc

:help startup states, under 3. Execute Ex commands, from environment variables and/or files that (for Unix systems) $HOME/.vimrc or $HOME/.vim/vimrc is read and that The files are searched in the ...
René Nyffenegger's user avatar
4 votes
1 answer
101 views

Why does spell-check work poorly on my system?

I'm using VIM7.4.488 on ubuntu 15.04 system. I use command :setlocal spell spelllang=en_us for spell checking. It can capture some spelling error as well as words like htb, Cref, iffalse. However, it ...
user3813057's user avatar
  • 1,451
4 votes
2 answers
4k views

How to update vim on centos7?

By default, the version of vim on centos7 is 7.4. I want to update it to vim 8. There are some questions with 'https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo -o /...
grasshopperL's user avatar
4 votes
1 answer
176 views

Is loadview conflicted with readonly mode?

When i used following code to keep my folder view, it seemed that vim -R and view don't work at all (Only [readonly] was shown but it didn't work at all). Is there any misunderstanding about it? " ...
user avatar
4 votes
1 answer
5k views

Backspace inserts "^?" in vim

I'm using vim editor in linux and every time I type backspace it inserts a "^?" instead. I DID edit the .vimrc file to include backspace=indent,eol,star but it did not help. I also tried backspace=2 ...
asaf92's user avatar
  • 141
4 votes
2 answers
607 views

Using vim as manpager: works on Linux, fails on macOS

:h manpager describes how to use vim as a manpager: Works on: - Linux - Mac OS - FreeBSD - Cygwin - Win 10 under Bash Untested: - Amiga OS - BeOS - OS/2 For bash,zsh,ksh or dash ...
Ryan Lue's user avatar
  • 891
4 votes
1 answer
3k views

How to debug a segmentation fault?

I assume this is coming from a Vim plugin, but I get no leads on where to look. What's the best way of debugging it? Vim: Caught deadly signal SEGV Vim: Finished. [1] 8119 segmentation fault
Sauce McBoss's user avatar
4 votes
0 answers
448 views

How to remap <C-[> on linux [duplicate]

I have the same vimrc file for both Windows and Ubuntu environments. It works fine on both platforms, except for one difference. The line: nmap <C-[> <C-t> is working fine on Windows, ...
user avatar
3 votes
3 answers
6k views

How do I turn Vi colors off in Ubuntu Linux 14.04

How do I turn vi colors off? I was using vim-tiny on on Ubuntu 14.04. Installed vim-nox. Version is version 7.4.52. Once I installed that, I got all these syntax colors by default. I have my Terminal ...
gracious1's user avatar
  • 283
3 votes
2 answers
4k views

Why does "set ruler" get reset to noruler?

I have set ruler in my .vimrc. If I run vim and then :verbose set ruler? to check the status of this setting, on Ubuntu Linux it says : noruler Last set from ~/.vimrc At the bash prompt, ...
SebMa's user avatar
  • 2,888