All Questions
13,711
questions
0
votes
0
answers
2
views
noevim lua module not found even though it exist
I have structured my neovim config files like this
~/.config/nvim
├── init.lua
└── lua
└── [username]
├── core
│ └── options.lua
├── init.lua
└── plugins
These ...
0
votes
0
answers
8
views
How to bind two sequential keys to one fzf action?
I already know how to bind key to fzf action:
for example: --bind ctrl-d:page-down.
But I want to bind two sequential keys to an action, for example:
--bind ctrl-w+ctrl-d:page-down
Is that available?
0
votes
1
answer
11
views
How do I change the color of the deleted text on the left side of a vimdiff?
My colors currently look like this, with the text highlighted green on both sides:
I would like it to be red on the left, and green on the right.
I tried to change the DiffDelete highlight, but that ...
0
votes
0
answers
24
views
How to add fonts/icons to a remote terminal running on ubuntu vm?
I am using lunar vim, and want to add icons to a remote terminal running on ubuntu vm.
Is this possible?
On vm, output of echo $TERM is xterm-256color.
I tried the steps given here https://www....
0
votes
0
answers
15
views
Cannot connect from python repl to neovim instance which waiting on '127.0.0.1:6666'
I tried to experiment with what the nvim documentation (connecting chapter in api.txt) says.
The experiment is to use python repl to execute an instruction to nvim listening for socket communication.
...
-1
votes
0
answers
19
views
Downloading "latest release" gives NVIM 0.7.2
Downloading the LInux package
nvim-linux64.tar.gz from
https://github.com/neovim/neovim/releases/tag/stable
downloads the version 0.7.2.
me@mycomp:~/Downloads/nvim-linux64/bin$ nvim --version
NVIM v0....
2
votes
1
answer
23
views
If I set cmdheight=0 I get the "Press Enter or type command to continue" message
If I set my cmdheight=0 then any action I perform like saving the buffer or opening a new buffer or anything trigger the Press Enter or type command to continue message.
It annoys me. I want to ...
0
votes
1
answer
21
views
Combine mapped commands in other mapping
How do I combine mapped commands into another mapping?
For example, I have two mapped commands, each of which enters a bracketed string at the end of the current line, and then leaves the cursor on ...
0
votes
1
answer
30
views
Cancelling formatting from formatprg when not successfully exited?
Some format programs refuse to format malformed code, but instead sends an error message to stderr and exits with non-zero status. Vim does not seem to care about that, and simply puts on the error ...
0
votes
2
answers
16
views
How would I bind a keybind that uses Rubber to compile the current file on NvChad?
I'm fairly new to NvChad and I'd like to learn how to bind a keybind <leader>t which executes rubber on the current file. My previous nvim setup had the code nnoremap <leader>t :!rubber --...
0
votes
0
answers
12
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
0
answers
14
views
fzf.vim - How to search git branch command with git log preview?
I'm trying to create neovim fzf command FzfGBranches to use git branch -a as query, and use git log --oneline as fzf preview:
command! -bang -nargs=0 FzfGBranches
\ call fzf#vim#grep(
...
0
votes
1
answer
21
views
Neovim+PHP basic set up
I’ve been using Vim for years want to try out nvim and a bit confused. Can someone please assist me on how to set up a simple config with Lsp intelephense for php, commenting lines, show folds and fzf....
0
votes
1
answer
40
views
Vim keybindings and proportional fonts
I want to use vim keybindings to write text other than code in school, but I find proportional fonts much easier to read than monospaced which is not possible in vim, gvim, neovim or any neovim ...
0
votes
0
answers
31
views
How to match latin letters + their accented versions?
\a is equivalent to [A-Za-z] so it matches only non-accented letters.
I know of [=name-of-equivalence-class=], so I can clearly use something like \(\a\|[[=a=][=e=][=i=][=o=][=u=]]\), but I was ...
0
votes
0
answers
29
views
Packer or config structure problem
I'm trying to port my nvim configuration to another desktop, but I can't seem to figure out how to make packer work.
I enter nvim and I don't see any errors regarding packer at startup, just about ...
1
vote
1
answer
25
views
How to prevent left/right arrow from cycling through completion candidates on the :cmdline?
Say I have 4 files in current directory:
file-bar-01.txt
file-bar-02.txt
file-foo-01.txt
file-foo-02.txt
Next, I want to save current buffer to a new file file-foo-03.txt. So I enter :w f and then ...
0
votes
1
answer
27
views
How does <cword> work in insert mode?
Basically I want to access the last \w\+ in my current insertion. (Hence I asked this question.)
Another solution I thought of was something like the following (I'm echoing, but clearly I'd pass it to ...
3
votes
4
answers
703
views
Is it possible to type a single quote/paren/etc. when you have Vim mapped to always print two?
Recently I have been experimenting with ways to improve Vim's efficiently with keyboard mappings, and I have these mapped in order to make Vim behave like a graphical IDE:
inoremap " ""&...
0
votes
1
answer
34
views
Using variable to find & replace while incrementing number with regex
Given the following text:
0 : Container(
alignment: Alignment.center,
padding: const EdgeInsets.all(24.0),
child: RichText(
text: TextSpan(
...
0
votes
1
answer
21
views
Is it possible to have NERDTree open file in a selected window?
Suppose I have 4 split windows with window number 1 the file explorer and window number 2-4 different file buffers. Can I have NERDTree open a new file in a selected window, say window number 4? I ...
-1
votes
2
answers
36
views
Prevent <c-w>q to quit Vim when there is only one window left
I wish to close windows and wipe out the associated buffers with <c-w>q but at the same time I want to prevent to quit Vim when there is only one window left.
My attempt is as follows:
...
0
votes
1
answer
31
views
How do I position cursor according to filetype (gitcommit)?
Sometimes on start, the cursor is not at the top in gitcommit buffers. I assume that this is because it wasn't on the first line the last time I exited a gitcommit buffer and the position was saved in ...
1
vote
1
answer
40
views
How to show the current statusline definition?
I want to see the current statusline definition/string as loaded by Vim. So, taking into account :help statusline, if it is the default, the output would be empty, but if ruler is set (and nothing ...
2
votes
2
answers
33
views
Command to set the window width
Using MacVim, I can manually drag the edge of the window (watching the numbers in the title bar) to whatever width I want.
Is there a command that will just immediately set it to a desired width? I ...
2
votes
3
answers
53
views
Can we configure Vim tag following to be more intelligent?
In large code bases, there can be multiple hits for an identifier. Sometimes dozens. When you look up a tag, the first choice in the list is often some false positive you don't want.
The user ...
0
votes
1
answer
18
views
How to remove paths starting with a certain pattern from a list of paths?
Say that I have the following list:
vim9script
g:my_paths = ['C:\Users\myname\Miniconda3\envs\myenv',
'C:\Users\myname\Miniconda3\envs\myenv\python310.zip',
'C\Mypath',
'C\Anotherpath',
'C:\Users\...
0
votes
1
answer
59
views
NeoVim: Following the insturctions in ":h clipboard-wsl" not work? It shows "no provider" but also "ok" in ":checkhealth"?
I am using neovim on archlinux/WSL2, and try to communicate with the Windows clipboard in neovim.
Following the instructions in :h clipboard-wsl, I filled in init.lua with code:
vim.g.clipboard = {
...
-1
votes
0
answers
46
views
How do I add the fugitive commands to which-key?
How do I add things like ]c, ]m, etc. to which-key.nvim's menu?
I think I need to register these in some kind of on-attach script?
1
vote
1
answer
45
views
Alt > or Alt < mappings do not work
I am trying to configure the key mappings for the barbar plugin commands, specifically the BufferMovePrevious and BufferMoveNext actions. The desired key combinations are Alt < and Alt >. ...
1
vote
3
answers
106
views
How to efficiently highlight a region given a START and END position expressed as line_nr, col_nr?
Say that I want to highlight a region expressed in terms of two coordinates of the form (line, column), e.g. C1 = (l1, c1) to C2 = (l2, c2).
I read :h matchaddpos() but it seems that you can only ...
0
votes
1
answer
23
views
Pattern works with / but it does not work when used in filter function()
I want to extract the the substring Python 3.11 from the strings like Python 3.11.2.release0 (i.e. I want to extract Python followed by the first two digits separated by a .). Such longer strings ...
0
votes
0
answers
19
views
ALE lints but does not fix
I have ALE configured to lint and fix Ruby and Javascript files. Linting works as expected - the tools are found and I get info in the location list, etc. about changes to be made.
However, fixing the ...
0
votes
0
answers
13
views
How to autoformat with efm-langserver
I just want autoformat on save, I don't want it to have any delay.
And they say efm-langserver is best choice.
After I installed via AUR yay -S efm-langserver, that's only I know what to do.
How do I ...
1
vote
1
answer
30
views
Neovim append method does not works on matchpairs
I want to append <:> to vim.opt.matchpairs, which AFAIK is a string type.
Neovim lua doc says:
vim.opt:append()
Option:append(value)
...
1
vote
1
answer
36
views
Is there any way to automatically adjust OS specific environment variables, path, etc. format?
Often in my scripts I have some ugly snippets like the following:
vim9script
var bin = ""
if has("win32")
bin = "\\bin"
else
bin = "/bin"
endif
g:...
0
votes
1
answer
20
views
How to change the internal vim python sys.path?
I have learned that py3eval('print(sys.path)') return the sys.path used internally by Vim.
Say that i want add a new_path to the current sys.path. How shall I do?
I would appreciate solutions that ...
1
vote
2
answers
97
views
LeftMouse focus window without moving cursor
Is there a way for clicking on a Vim window to focus that window if inactive (without moving the cursor), then move the cursor if the window is already active?
Here's what I've got so far:
function ...
1
vote
1
answer
21
views
Export environment variable to Vimspector
I have some env vars set-up in my .bashrc but when I'm running Vimspector, those variables are not set-up. I want to export the env var when staring Vimspector, but I haven't managed to figure out how....
0
votes
2
answers
30
views
Misunderstanding of interaction between local options, moving between windows, and WinLeave, WinEnter, BufLeave, BufEnter events
This what is logged in :messages when I'm printing the value of nu and rnu upon the 4 events WinLeave, WinEnter, BufLeave, BufEnter during the action, done twice, of opening :help and closing it. The ...
0
votes
0
answers
29
views
Why does `Ex` apply to both splits? [duplicate]
I noticed that when I split multiple times in combination with Ex, for example I run the following commands
:Sexplore
:q
:Sexplore
It will open netrw in both splits. I expected it to only open in the ...
0
votes
0
answers
15
views
Build Vim without the GUI version (gvim) [duplicate]
In Linux, I build and install Vim with make && make install from the project root. It builds and installs gvim along with console vim, but I didn't care.
In windows, I have to be slightly ...
0
votes
1
answer
35
views
What do the cursor options do? Like; cursorline, cursorcolumn, cursoropts
Background
I was looking to change the shape of my cursor, the thing that tells you where you are, like the i-beam on this site.
Instead I got these options which highlight text, I don't know the use ...
0
votes
1
answer
24
views
Is there any way to set ccze color scheme?
I want to use ccze color scheme for log file specific.
augroup LogColorscheme
autocmd!
autocmd FileType log colorscheme ccze
augroup END
However, this installed color scheme on system-wide
...
1
vote
1
answer
44
views
How to yank while in visual mode without showing message?
When I'm in visual mode and I yank the selection (which has at least 3 lines), messages like these are shown:
4 lines yanked
block of 4 lines yanked
How can I suppress this so it won't appear in :...
1
vote
1
answer
36
views
Vim - open wrong path when I run command ':vs .' run in Vim
When I run the :vs . command in Vim for the current working directory window split, the parent directory opens, not the current directory.
Example:
A/B/C$ vi test.c
in Vim:
:vs .
Split window ...
0
votes
1
answer
40
views
What is the fastest way (lowest number of keys pressed) to add attribute to html tag?
For example, cursor shall be at "*":
<Typography
gutterBottom
component="h1"
variant="h4"
color="text.primary"
sx={{mb: 3}}
>
Che*ck this!
<...
0
votes
0
answers
31
views
How to use variables inside autocmd?
I have defined the following augroup:
vim9script
augroup MY_AUGROUP
autocmd!
autocmd CursorMoved,CursorHold <buffer>
\ if index(b:line_numbers, line('.')) != -...
0
votes
1
answer
21
views
Should I reinstall the YCM (YouCompleteMe) plug-in after :PluginUpdate?
I have the YouCompleteMe plugin installed. After the :PluginUpdate has been invoked should I repeat the installation process of the YouCompleteMe plugin ? I am 99% sure I should as I think the :...
1
vote
1
answer
39
views
Proper regex to prevent a match when keyword is preceded by a period
I'm writing a color syntax highlighting file for a derivative of Pick Basic. Two of the oddities that this language allows is periods in variable names and embedding a keyword in a variable name, ...