Questions tagged [linux]

For questions specific to the Linux operating system.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

Mapping <Shift>-Insert to paste in gVim search field

In gVim (not terminal Vim), I want to be able to paste from <Shift>-Insert (a.k.a. C-V) into the text input field of a search. I.e. when I press "/", and go into search mode, I want ...
0
votes
1answer
31 views

How do I get the line numbers to permanently appear in vim [duplicate]

I keep wanting to customize vim, how do I get the line numbers to show up everytime i open up VIM.
0
votes
0answers
35 views

Can you install both Vim 7 and Vim 8 on CentOS 7.9?

I teach classes that cover both Vim 7 and Vim 8. Is it possibly to install Vim 7 and Vim 8 together on CentOS? If so, how? Everything I've have looked at so far covers updating Vim 7 to Vim 8. I ...
0
votes
2answers
25 views

How to associate unix commands from vim, with all the files opened in a split window?

Lets say for example, I have 3 files opened in split windows in vim. And I have to changes the access permissions to each of them, then one way to do it, is to move my cursor to individual split ...
0
votes
1answer
50 views

Install Vim with +clipboard support but without Gvim?

My distribution comes with a minimal version of Vim. vim --vesrion returns -clipboard, so the * and + registers interact (copy/paste) with the primary and clipboard do not work. The resources I've ...
1
vote
1answer
42 views

Vimtex: `latexmk` compiler gives “no file name specified” error even after a new buffer is written to a file

When I open a new instance of vim without any 'filename' argument and write some LaTeX code, I cannot just compile it to pdf with latexmk, because it needs a file to compile from. However, even after ...
1
vote
0answers
39 views

Windows Vim overwrites WSL file mode

I'm using gVim on Windows to edit files in WSL2 Ubuntu via the \\wsl$ mapping. When I :write in Vim, it overwrites the linux file mode/permissions with 644/-rw-r--r--, no matter what the mode was to ...
1
vote
1answer
31 views

Vim won't open unless I Ctrl+C [closed]

Having this strange problem, where when I do vim ...some_file... The shell will freeze until I send a signal <Ctrl + C>, and then the vim opens up properly. I haven't touched anything (.vimrc, ....
-1
votes
2answers
191 views

How does one install a VIM plugin without a plugin manager?

I am new to vim, I watched this video and wish to give it a good try for a month to see how I like it. I want to add the NERDTree plugin to my vim, I'm actually using NeoVIM: NVIM v0.4.4 Build type: ...
0
votes
2answers
749 views

How to tell NeoVim to use “python” instead of “python3”?

Im using pyenv to administer my python versions (Im on Manjaro Linux) and the command for python on my system is python but nvim wants to use python3. How can I change it? Error: [coc.nvim] Error on ...
3
votes
1answer
50 views

GUI support will not compile in latest from github

I'm using CentOS 7.5. I just did a git pull in my clone of the vim repo to the latest: last tag v8.2.2340. I'm trying to compile. No matter what I do, it will not compile for the GUI (which it's ...
0
votes
1answer
26 views

Unknown function: strptime on Linux Mint [closed]

I was having trouble to make the following function to work on Linux machines, where +eval feature is found upon calling :version. The error message reads: E117: Unknown function: strptime The ...
1
vote
1answer
103 views

ALE says packages of my project don't exist

I'm having this problem with ale where in java files, it sometimes gives an error message saying that some packages don't exist. However, I can run without any problems my projects once I compile them,...
0
votes
1answer
35 views

Vim indentation different on linux and macOS

I'm using vim to write in C for college. My .c files need to abide to specific formatting rules. While I'm writing my files on Linux, the .c files will be evaluated on macOS. I noticed that any tabs ...
0
votes
3answers
57 views

How to copy the selection to clipboard without the indentation that is relevant just in the full file, not in the selection?

With other words: How to copy selection without its root-level indentation? Example: How to copy this: a b c d instead of: a b c d I am using Neovim inside VS Code ...
3
votes
1answer
406 views

How do I use vim within a Unix pipe-line?

I can use vim / ex to grep a file using the following invocation: ex -c'g/foo/p' -cq -s afile.txt I'd really like to use a similar command to grep some text from stdin. I thought the following command ...
1
vote
2answers
148 views

How to create regex group with dependency with earlier group via math operations

Imagine I have a file as follows, 10 10 10 11 ... 10 20 20 20 20 21 ... 20 40 40 40 40 41 ... I know simple regex such as To search two numbers /\d\+ \d\+ To search repeated numbers /\(\d\+\) \1 My ...
6
votes
1answer
666 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 ...
2
votes
1answer
283 views

$TERM specific NeoVim configuration

I spend half the time in a TTY (Linux console as in Ctrl+Alt+F2) and the other half in a X session. Unfortunately the color scheme I use for NeoVim in the graphical environment on xterm does not look ...
1
vote
1answer
35 views

Opening and compiling tex files in subdirectory

I am using Linux mint cinnamon. Let's say I have .tex file in the sub-directory ~/MyTexfiles/Integration. When I double click on the .tex file to open it, it opens in vim since vim is my default ...
1
vote
1answer
69 views

parsing / lexing scriptout log file from gvim -w

I've been running gvim -w /dev/shm/vim_keystrokes for some time, to collect keystrokes for later analysis. But now I'm looking for some guidance on how to make sense of the binary log file. Here's a ...
2
votes
1answer
96 views

How to change in gvim GTK file browser the default file mask wildcard (glob)?

In gvim the command :browse confirm e launches a GTK file browser. The default file mask in this window depends on the filetype from which the browse window is invoked. I would like to change that ...
1
vote
0answers
221 views

get current vim mode inside vimscript code

I would like to be able to get the current usual mode of vim inside a vim script (and not only inside the statusline). I need this functionality to build a vim script linked with ruby script to be ...
4
votes
0answers
70 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 ...
5
votes
2answers
1k 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 ...
1
vote
2answers
180 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
674 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
280 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
1answer
87 views

Maps literally read < and > instead of the actual character

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 characters &...
3
votes
2answers
2k 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
43 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
602 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 ...
3
votes
2answers
361 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
280 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
93 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
443 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
3k 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
166 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
404 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
151 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 ...
6
votes
1answer
227 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
979 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&...
2
votes
2answers
4k 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 ...
4
votes
1answer
121 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
1k 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
1answer
53 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
455 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 ...
7
votes
3answers
7k 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 ...
28
votes
2answers
10k 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-...