Questions tagged [linux]
For questions specific to the Linux operating system.
149
questions
-1
votes
0
answers
19
views
Vim API interface to the kernel, efficient system file writing by kernel [closed]
This is a bit of a fantasticating question.
If vim provided an interface to the Linux kernel, in the form of an API, by means of which the kernel could use it to modify files, would the kernel use it (...
0
votes
0
answers
39
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
79
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
48
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
30
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
40
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
38
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 ...
0
votes
0
answers
100
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&...
1
vote
1
answer
63
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
55
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 ...
0
votes
2
answers
155
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. ...
-1
votes
1
answer
71
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
1k
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
148
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 ...
0
votes
0
answers
100
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 ...
1
vote
1
answer
116
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 ...
1
vote
1
answer
69
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
31
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-...
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
37
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
247
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:...
1
vote
1
answer
35
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
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>...
0
votes
0
answers
139
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. ...
4
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 ...
1
vote
1
answer
652
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
897
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
0
answers
68
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
75
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
74
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 ...
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 ...
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://...
2
votes
1
answer
827
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
108
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
1
answer
291
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 ...
1
vote
2
answers
39
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 ...
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
222
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
136
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
1
answer
359
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
2
answers
1k
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
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 ...
3
votes
1
answer
267
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 ...
2
votes
1
answer
93
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
1
answer
348
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
1
answer
234
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
3
answers
1k
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
1
answer
2k
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
2
answers
467
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
1
answer
803
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 ...