Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

For questions specific to the Linux operating system.

6
votes
1answer
165 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 ...
0
votes
0answers
27 views

Loading different version of Python in Vim

Is there a way to change the Python interpreter that Vim uses? My system Python version is 2.6.6, but I have another Python (2.7.14) installed in a non-standard location. Since I have some modules ...
2
votes
1answer
106 views

Vim is unable to find Python

I'm using Vim on Fedora 28 and Python seems to be enabled: vim --version VIM - Vi IMproved 8.1 (2018 May 18, compiled Jul 11 2018 10:00:51) Included patches: 1-177 Modified by <bugzilla@redhat.com&...
0
votes
0answers
25 views

Question mark instead branch symbol vim-fugitive [duplicate]

I installed the vim-fugitive plugin, but I get this question mark instead of the branch symbol in vim-airline: my vimrc call plug#begin() " Plugins Plug 'fatih/vim-go' Plug 'AndrewRadev/splitjoin....
1
vote
1answer
49 views

Unable to uninstall VIM installed from source

I installed VIM by compiling from source a while back following the instructions here. At that time, for some reason, I didn't use checkinstall, as a result I can't uninstall it using sudo apt-get ...
2
votes
1answer
41 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? " ...
0
votes
1answer
71 views

Neovim on Manjaro- No ~/.config/nvim file being created on install

I just installed neovim on a fresh Manjaro install and my ~/.config/nvim directory isn't being generated. I tried uninstalling and reinstalling and I still have the same issue. I also ran a search for ...
1
vote
0answers
45 views

How to differentiate within vim the Unix platform it is running under? [duplicate]

How, from within vim (.vimrc), can I tell if I am running under Linux, AIX, Solaris, HP unix, etc... It is easy to test if vim is running under Unix, Windows or Mac with: if has("win32") <...
1
vote
1answer
33 views

Attempt to create a buffer output script

I'm in a Linux class right now and the question was brought up as to if there was a command to see what's in your buffer list inside vi. I searched online to see if I could find anything, but found ...
3
votes
2answers
179 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 ...
5
votes
1answer
2k 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 ...
13
votes
2answers
3k 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-...
2
votes
2answers
197 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, ...
0
votes
1answer
192 views

gvim looks terrible on my RedHat. Unable to change font

When running gvim on my RedHat: Linux trex-06 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux NAME="Red Hat Enterprise Linux Server" VERSION="7.3 (Maipo)" ID=...
6
votes
1answer
157 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: $ ./...
4
votes
2answers
217 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 ...
0
votes
2answers
65 views

Open file at specified line number and automatically put that line in the middle of the screen?

How can Vim be configured to automatically centre a specified line number (eg. without manually having to use the zz command? So from the commandline I just want to issue: vim verylongfile.c +932 .....
0
votes
0answers
41 views

Vim won't use default colorscheme

I was using the default vim colorscheme, and one day when I turned on my computer, suddenly everything was a really weird theme with a red background and yellow/white text (I'm not even sure if this ...
2
votes
1answer
139 views

:vsplit does nothing, sometimes

In a specific context, typing :vsplit does nothing. Typing :split still splits the screen horizontally. And if I open a new file e.g. vi foo.txt then :vsplit works. EDIT: steps to reproduce Type /...
1
vote
1answer
78 views

Check if running in a 32 or 64 bit machine

I would like to do a check like if system($(uname -m | sed 's/x86_//;s/i[3-6]86/32/') == 64 Plug 'valloric/youcompleteme', { 'do': './install.py --all' } else Plug 'valloric/youcompleteme', { ...
1
vote
0answers
51 views

How to find out the default system copy register? [duplicate]

I want to know how to find the default copy register on any machine. I ssh into different machines and use vi. But on some of them the "+ and/or "* registers don't work. Also when I can use my mouse I ...
1
vote
1answer
2k 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 ...
3
votes
2answers
332 views

How to filter text matched by global command?

I have a log file full of arbitrary lines, interspersed with some lines which are a proper xml sequence, with all the tags on a single line (for each sequence). I want to simply process this so that ...
3
votes
1answer
279 views

How to pause (with message) during .vimrc startup?

How can I reliably print a message and pause during processing of .vimrc? I'm using vim 7.4 (not gvim) on Linux Mint. The input() function behaves erratically as shown below. The redraw function ...
2
votes
1answer
200 views

How to create user command without a capital letter as first letter?

I know I can set user-defined commands using the :command Foo bar syntax, but I want a way to set a command without using capitals. For example, to save all open buffers, the command is :wa, but that'...
0
votes
1answer
71 views

What is clipbrdDefaultReg

Taken from here: https://stackoverflow.com/a/171558 What does let g:clipbrdDefaultReg = '+' mean?
0
votes
1answer
195 views

How to execute xdg-open from NERDTree in Linux?

Netrw able to execute file with xdg-open by pressing x, how about NERDTree ? [Response to downvote] If xdg-open can so easy/direct to work (which is the reason of downvote), then what's the point ...
0
votes
1answer
69 views

Please recommend video course (paid or free) or books to use vim like professionals and save my time [closed]

I know that best way would be by doing and practice. But sometimes you learn in a wrong way, so what courses on YouTube or other paid websites or books you would recommend for who is starting with vim?...
2
votes
2answers
185 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 ...
4
votes
1answer
121 views

How to escape filename containing single and double quotes mix?

Let's say i create a filename with this: xb@dnxb:/tmp/test$ touch '"i'"'"'m noob.mp4"' xb@dnxb:/tmp/test$ ls -1 "i'm noob.mp4" xb@dnxb:/tmp/test$ Then vim . to go inside Netrw directory listing. " ...
7
votes
1answer
4k 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"?
5
votes
1answer
1k 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 ...
9
votes
6answers
5k 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 ...
0
votes
1answer
1k views

Python integration in Vim on Raspberry Pi

I am relatively new to programming, and I built a mobile computer with a Pi at its heart to learn on the go. Ideally, I would use Vim as my IDE for Python 3. However, every attempt at installation ...
1
vote
1answer
502 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 ...
1
vote
0answers
177 views

Open file in a new instance of vim from nerdtree

I'm actually using i3wmw so I'd like NERDtree, or any other option that works as a file tree to open the selected file in a new instance of vim, instead of in a new tab/buffer. Is there anyway to ...
3
votes
3answers
430 views

No echo command?

I tried doing the following command on a new install of Ubuntu and got a "Sorry, command not supported on this version message": :echo @% How could any version of vim not support echo? The reported ...
5
votes
1answer
357 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 ...
1
vote
1answer
122 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 ...
3
votes
1answer
165 views

How can I securely restrict vim access to a single file?

So first, I realize that this question is slightly out of the ordinary for this site. I will explain the backstory to avoid the XY problem. Over on Programming Puzzles and Code Golf, lots of users (...
5
votes
1answer
401 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 (...
1
vote
0answers
275 views

linux: yank to clipboard, cut to primary

I'm using neovim. I want to map the 0 register to the system clipboard and the unnamed register to the system primary (mouse middle click). Is it possible? I can map the unnamed register to primary ...
5
votes
1answer
1k 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
2
votes
1answer
2k 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-...
1
vote
3answers
2k 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 ...
1
vote
1answer
65 views

Is it safe to open encrypted/sensitive text files from a zip archive with vim/gvim?

I have an archive which contains encrypted text files with sensitive data. Is it safe to open them with vim/gvim? I'm afraid vim/gvim will leave content of the files on the drive/memory even after I ...
4
votes
1answer
593 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 ...
4
votes
1answer
36 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 ...
6
votes
2answers
2k 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 ...
4
votes
1answer
191 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 ...