Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [linux]

For questions specific to the Linux operating system.

Filter by
Sorted by
Tagged with
1
vote
1answer
41 views

vim highlighting doesn't set the right type for a new filetype

This is what I have in my /usr/share/vim/vim80/filetype.vim (the only mention of messages in the file) : " Messages (logs mostly) au BufNewFile,BufRead */logs/couchdb/{,.log}{,.[0-9]*,-[0-9]*} setf ...
0
votes
1answer
28 views

How to create a custom colorscheme in which define custom highlight group each of containing set of words?

Let's assume we want to create a custom colorscheme. For example, content of a custom colorscheme file ~/.vim/colors/mytheme.vim are as follows, " syntax highlighting groups hi Comment guifg=#007f7f ...
3
votes
4answers
55 views

Vim search and replace “/” only from string between round bracket [duplicate]

I have string lets say count number of elecment when tra(XYixe0/en_in/old)='mid/2' rise='corse/2' I want to replace / from (XYixe0/en_in/old) to . My output string should look like count number of ...
3
votes
0answers
49 views

Maps literally read < and > instead of the actual character

Here's the situation: Entire .vimrc: inoremap a <CR> Action: user types ia to enter INSERT mode and type a Expected result: a CARRIAGE RETURN is entered into the document Actual result: the ...
1
vote
2answers
494 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 /...
0
votes
0answers
31 views

Quick paste via single keybind

As I understand, the default cursor looks like this: ▉ block. Currently I have these related settings: set guicursor=c-n-i-v:ver25-blinkoff0 And ver25 makes the cursor look and behave as if only ...
1
vote
0answers
39 views

Vim shows error when running python3

OS: Ubuntu 18.04 First, I ran apt-get install python3-dev ruby-dev Then, I installed vim using the instructions in the website, using make distclean, make and make install (This was like the tenth ...
1
vote
2answers
72 views

How to ensure files are copied to VIMRUNTIMEDIR when building Vim 8.1 from source and specifying a prefix?

I compiled vim 8.1 for Ubuntu 16.04 x64, from source, by following Valloric's excellent guide on the subject. Although that guide is for an older version, it was really simple to check out the correct ...
1
vote
1answer
148 views

Latex-suite <alt-I> mapping

Last week I reinstalled Ubuntu 18.04 LTS on my laptop. During my last installation of ubuntu (also 18.04) I learned vim and used it in combination with the latex-suite. However on this new ...
1
vote
1answer
70 views

Can't make vimwiki honor setting passed via command line

I am trying to write a wrapper shell script that is supposed to launch vim with a vimwiki in current directory: #!/bin/bash gvim -c "let g:vimwiki_list = [{'path': '$PWD/'}] | normal ,ww" The ...
2
votes
2answers
123 views

How to set group of tabs and 1 single terminal in Vim 8?

I am a Vim beginner. I know you can do :tabnew file1 file2 to have Vim open up a bunch of files name file1, file2 spread across as tabs. I know you can move forward and backward between tabs. My ...
0
votes
1answer
657 views

Setting default gVim font via `vimrc`, conditional on the operating system

I can place the following code into my _vimrc file on Windows 7/10 and the font will default to 'Consolas - size 11' when I launch gVim. if has("gui_running") if has("gui_gtk2") set guifont=...
1
vote
0answers
102 views

Vim: a weird background problem in gnome-terminal

I get weird border form gnome-terminal when i run Vim fullscreen. It never happened before. I'm confused. How to repair it without changing my terminal background colour?
1
vote
1answer
126 views

How can I make my Vim setup (with plugins) portable without leaving artefacts on a given system?

On my work project VM, I have a relatively common Vim set-up, with various files a in ~/.vim folder and a medium size ~/.vimrc file. Plugins installed from VimPlug store files in various folders, such ...
2
votes
1answer
112 views

`vint` linter just quits due to a vim plugin incompatibility

[Vim 8.0.1 / Syntastic 3.9.0-19 / Vundle 0.5 / vint 0.3.19 on Arch Linux] My vim linter seems to be broken and I don't quite understand why. It's been working fine in its present configuration, ...
1
vote
1answer
38 views

how reformat kegg reconstruct pathway in vim?

I need to reformat the kegg reconstruct pathway output, I have something like this in file1: 00550 Peptidoglycan biosynthesis (2) K01000 K02563 00511 Other glycan degradation (8) K01190 K01191 ...
1
vote
1answer
178 views

Cannot set (let) mapleader and use <leader> in global vimrc

I'm using basic version vimrc from https://github.com/amix/vimrc. No problem if I put the vimrc file to /home/{user}/.vimrc, but if I put it in /etc/vimrc (arch) or /etc/vim/vimrc (debian), it became ...
6
votes
1answer
187 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 ...
2
votes
1answer
575 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&...
1
vote
2answers
1k 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 ...
3
votes
1answer
83 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
426 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
49 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
50 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
236 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 ...
4
votes
1answer
4k 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 ...
20
votes
2answers
6k 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-...
3
votes
2answers
1k 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
806 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
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: $ ./...
4
votes
2answers
355 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
99 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 .....
2
votes
1answer
506 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
87 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
58 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 ...
3
votes
1answer
7k 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 ...
2
votes
2answers
628 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 ...
2
votes
1answer
568 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 ...
1
vote
1answer
230 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
86 views

What is clipbrdDefaultReg

Taken from here: https://stackoverflow.com/a/171558 What does let g:clipbrdDefaultReg = '+' mean?
1
vote
2answers
380 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
74 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
259 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 ...
3
votes
1answer
172 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. " ...
13
votes
1answer
8k 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 ...
10
votes
6answers
9k 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
2k 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 ...
2
votes
1answer
1k 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
246 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 ...