Questions tagged [linux]

For questions specific to the Linux operating system.

Filter by
Sorted by
Tagged with
2 votes
1 answer
1k views

Remapping Ctrl+backspace in insert mode to delete one word back

I want to bind Control+Backspace in insert mode to delete a word. I'm able to bind Control+Del in both insert and normal modes, but I can only seem to bind Control+Del in normal mode. I've checked ...
0 votes
1 answer
1k views

super key not working in Neovim on Linux

I'm trying to create a shortcut, but I can't get vim to recognize my super key. I tried the following combinations: lvim.keys.normal_mode["<A-h>"] = ":BufferLineCyclePrev<cr>...
1 vote
1 answer
130 views

Build a custom vim binary with python syntax highlighting

Background The Debian 11 vim package doesn't include python3 support. See the section titled "No python support in Debian 11 vim - evidence" below I need vim with python3 support for the ...
0 votes
0 answers
46 views

Why is key binding for CTRL-L key messed up?

I have run into a Vim key binding issue at the office recently. On the Linux system where I do my development work, while running Vim the CTRL-L key no longer redraws the screen. The .exrc file in my ...
2 votes
2 answers
164 views

See Last Commands Output from the Terminal Buffer

Lets say I run the external very_long_taking_command like this: :!very_long_taking_command and I get the output in this Vim Terminal where it says "Press ENTER or type command to continue". ...
0 votes
0 answers
55 views

Compiled Vim Is Not Using vimrc files

I compiled Vim 9 from github source https://github.com/vim/vim. I am compiling Vim in Ubuntu 20.04. I tried compiling it according to this doc. However, I can not get it to read the system file /etc/...
0 votes
0 answers
57 views

Recommended configuration of npm for working with Neovim and LunarVim in Debian stable

I'm trying to figure out how to set up npm the "best" way for my future Neovim+LunarVim use in Debian stable. I installed the latest stable Neovim from source and I'm in the process of ...
0 votes
0 answers
57 views

Debugging a program that requires escalated privileges

I have written a program in C that needs to access /dev/input/eventX programmatically. Running it as sudo ./a.out works well, but I am not sure how to debug it (using nvim-dap & cpptools). Here is ...
1 vote
1 answer
49 views

How to configure my own highlight for Vim editor in Linux using ~/.vimrc and ~/.vim/colors/mycolors.vim files? [closed]

I want to configure and customize my own syntax highlight for Vim editor in Linux Ubuntu 20.04. In my home directory, I created two files, ~/.vimrc and ~/.vim/colors/mycolors.vim. Here is the full ...
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 ...
0 votes
0 answers
152 views

How to use `Ctrl+c` in Nvim if GNOME terminal SIGINT call was remapped to Ctrl+x?

GNOME terminal SIGINT call was remapped to ctrl+x using stty intr ^X, and ctrl+c was mapped to be 'copy'. In Neovim config I have vim.keymap.set("v", "<C-c>", "\"+y&...
0 votes
2 answers
213 views

Syntax highlighting with only some allowed colours

In my ubuntu gnome-terminal I have vims default syntax highlighting color scheme + some color-tuning made in my gnome-terminal to filter out most colors with green except red, purple and brown. ...
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"?
3 votes
2 answers
2k 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 <[email protected]&...
1 vote
1 answer
83 views

Syncing x clipboard with yanks and put only?

I have discovered the joy of having :set clipboard^=unnamedplus. One issue I often face however is having whatever was last copied or yanked be overwritten by what I just deleted. I don't think ...
0 votes
1 answer
96 views

Compound alt-key mappings work in Vim but not NeoVim

I have a number of alt key re-mappings in my Vim .vimrc that I copied over to my Neovim init.vim file. The single alt key mappings work fine but any compound re-mappings are not working. It seems ...
-1 votes
1 answer
88 views

Is there a grep-like command that can understand vim regex syntax?

ack, ag, grep, pgrep, ripgrep, ugrep are binary filter commands that understand various regex syntax flavors. Is there a binary filter command that can also understand vim regex syntax flavor? I'm so ...
0 votes
1 answer
2k views

How to run current python file in floating terminal? Using neovim and NvChad

FYI noob here. I want to run current file in floating terminal. I'm using NvChad and when I execute ALT+i I get the following: I already played with some key binds, but I haven't achieved what I need....
1 vote
1 answer
278 views

How to correctly set up :make for building Vim?

My question could fairly be a duplicate of this, but I hope I'm making it critically different by asking about :makeing Vim itself and having a meaningful quickfix window. (In reality, my use case is ...
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, ...
3 votes
2 answers
126 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 ...
0 votes
0 answers
133 views

Vim displays help at seemingly random moments

I face an issue: When I edit a file in Vim, and while editing/scrolling or even just having the file open, the help screen pops up, and I have to leave the help before I can do something again. It ...
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 ...
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 ...
1 vote
1 answer
78 views

Replace arithmetic expression by their result

I am just trying to replace several arithmetic expressions inside a script file, which I cannot seem to find a simple solution for on the web. Adapting this answer did not do the trick. Suppose I have ...
0 votes
0 answers
36 views

Building from source ,perl ruby lua and python support are not activating, why?

Here are the things I have : The configure snippet I am using : ./configure --with-features=huge --enable-rubyinterp=yes --with-ruby-command=/usr/bin/ruby ---enable-pythoninterp=yes --with-python-...
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 ...
0 votes
0 answers
39 views

gvim menus are too big

Many compiler, install module, gyrations later, I was finally able to get vim with the gui to compile and execute. However, the menus, both at the top of the main screen, and the pull down menus are ...
0 votes
1 answer
42 views

Vim modeline settings options words appear in selected in red

The vim modeline settings options words appear in selected in red in the first line : # vim: set ft=json noet: I'm using vim 7.4 on CentOS Linux 7.9. How can I disable that ?
1 vote
1 answer
283 views

vim broken after python update (error while loading shared libraries: libpython3.9.so.1.0)

I built vim from source with option --enable-python3interp. But after a system wide update (pop-os / ubuntu 21 to 22.04), python went from 3.9 to 3.10 and I suppose this is what broke my vim: $vim vim:...
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 ...
1 vote
1 answer
36 views

Turning on vi in terminal after returning to terminal [closed]

So I have set -o vi set in my .bashrc file When I open terminal it starts in INSERT mode. How can I make it so that it starts in NORMAL mode?
0 votes
4 answers
3k 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 ...
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 ...
0 votes
0 answers
150 views

How to adjust text color for Texinfo

I am working with Vim 7.4 on Linux (Xubuntu 14.04). I am editing Texinfo files and I would like to adjust the color of ordinary text. The colors of other items (@ macros, comments, etc.) are all okay. ...
1 vote
1 answer
702 views

Tab page is closing when deleting buffer

I'm using bufferline.nvim in order to display both buffers and tab pages on the tabline, whenever i delete a buffer with bd, all the buffers on that tab page are deleted as well, alongisde with the ...
2 votes
1 answer
895 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
1 answer
341 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 ...
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 ...
0 votes
0 answers
74 views

High vim CPU usage at GUI but not the CLI

I've previously noticed that vim spikes up the CPU usage whenever I scroll up or down at the terminal emulator within the GUI , and when I inspect the process it turns up to be xorg . I tried to ...
0 votes
0 answers
81 views

vim in xterm not redrawing properly

Since this problem exists only when using vim in an xterm (neither gvim nor vim in aterm demonstrate this on my computer) this is likely not a vim problem, but because it is sooooo annoying when using ...
0 votes
0 answers
77 views

Vim open/close slowly in remote computer due to sourcing a file

Vim works (open/close) slow in remote computer. Other tasks such as giving basic commands like ls works faster. Compilation is also slow. In the output of vim --startuptime, there is a jump in time ...
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 ...
1 vote
1 answer
1k views

vim ctrl+c doesn't copy/paste with ctrl+c or ctrl+v

I was trying to map ctrl+c to copy, ctrl+v to paste in vim, but it's not working properly.I've tried https://stackoverflow.com/questions/61177658/mapping-select-all-copy-paste-in-vim and https://...
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 ...
0 votes
1 answer
131 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.
1 vote
2 answers
41 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 ...
1 vote
1 answer
404 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 vote
1 answer
231 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 ...
2 votes
0 answers
139 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 ...