All Questions

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

Neovim 0.10 syntax highlight is completely broken

Yesterday I updated NeoVim to 0.10 and this is how, e.g., JavaScript code looks like: Although it used to look this way (now it's a screenshot from Vim): I've found this question on SO: https://...
d.k's user avatar
  • 692
0 votes
1 answer
13 views

Autocommand to reformat working only partially

I'm adding autoformatting on write to my neovim config, but it's only working partially. vim.api.nvim_create_autocmd('BufWritePre', { pattern = {"*.c", "*.cpp"}, callback = ...
Teddy's user avatar
  • 1
0 votes
2 answers
21 views

Have Vim to duplicate word

How do we have Vim to duplicate word, i.e. literally, as if it's not doing any copy operation and will not touch any of few of the most recent registers clipboard?
user17227456's user avatar
0 votes
1 answer
20 views

How to delete (also on cut) whole line in normal mode?

How can we have Vim to: Delete, i.e. literally, and Cut, i.e. delete while copying to clipboard a whole line where cursor is being as in normal mode?
user17227456's user avatar
0 votes
1 answer
18 views

Provide bash vars or at least develop ~ through let variable

To activate lsp I use this on my .vimrc: call plug#begin('~/.vim/plugged') Plug 'yegappan/lsp' call plug#end() let lspOpts = #{autoHighlightDiags: v:true} autocmd User LspSetup call LspOptionsSet(...
user3313834's user avatar
1 vote
3 answers
56 views

Unable to :set printoptions for :hardcopy command

Just started using :hardcopy > x.ps to generate input to ps2pdf. Result is satisfactory but I would like to change the printoptions to non-default values for header, margins and page size, e.g. set ...
user985675's user avatar
1 vote
0 answers
10 views

Modify ALE coloring for style errors

I am using neovim with ALE and I want to change the coloring of style errors in general for any language and particularly in python using flake8, in the following code of my configuration file I try ...
Jorge L. de Oz's user avatar
3 votes
2 answers
408 views

Is there a reliable way to know whether a keybinding is already in use?

When making a custom keybinding, it's always in the back of my mind that I might be conflicting with some other keybinding, especially one from a (not loaded) plugin. Hence the act of pressing the ...
stevec's user avatar
  • 133
0 votes
1 answer
31 views

Vim text editor from the terminal [closed]

Could someone help me figure out how to append a file and exit Vim from the terminal?
David C.'s user avatar
0 votes
0 answers
25 views

How to pipe stdin into Neovim?

I'm trying to pipe the output of an ansible-inventory command into Neovim. This works with Vim but when I try to do the equivalent with Neovim, the buffer is not correctly populated, meaning the ...
Rase's user avatar
  • 1
1 vote
1 answer
104 views

Caps-Lock plus Shift for lower case alphabet

I am using gVim on Microsoft Windows. Consider two types of alphabet entering: When the Caps-Lock is off, enter upper case alphabet with Shift-. When the Caps-Lock is on, enter lower case alphabet ...
Limina102's user avatar
  • 165
0 votes
1 answer
16 views

Homebrew Vim not sourcing ~/.vimrc after iTerm, MacOS updates

EDIT: inspecting output from vim -V has me thinking it's to do with who is setting highlights most recently. But still not sure why it's behaving differently than it used to. I am using vim installed ...
Aaron Parisi's user avatar
2 votes
1 answer
30 views

Configure space using gc in LaTeX

Using the new gc feature in Neovim 0.10, is there a way to configure how the adding comment is done, like "add comment symbol followed by space" instead of "add only comment symbol"...
Vincent's user avatar
  • 23
1 vote
1 answer
56 views

ex mode equivalent of ^R in powershell?

In bash and powershell.exe you can press ^R to bring up and search old commands. I was wondering if vim had the same thing for ex mode and what the key combo is for that.
leeand00's user avatar
  • 3,601
0 votes
1 answer
14 views

Text formatting inside a paragraph acting like a numbered list

For markdown files and the like, I have formatoptions set to tln and I am using a simplified version of formatlistpat that looks for digits and a * character. The indenting on a list works fine, the ...
Christopher Trudeau's user avatar
1 vote
2 answers
33 views

Cannot go back to previous window of an opened one using bf, especially when having 2 or more windows open at the same time

I opened 3 files by: vim compile.f rtl.f tb.f -O I navigate to a window of interest, which is rtl.f, press gf to open file below cursor and bf to go back rtl.f window. After pressing gf, the window ...
Trung anh nguyễn thành's user avatar
0 votes
1 answer
27 views

How do I highlight all words in a vi file via "*" with the cursor on that word?

I need to highlight all similar words in a file. I thought * did this by default, but it is not working on my new Linux setup.
sreekesh padmanabhan's user avatar
0 votes
2 answers
16 views

How do I get the value of $XDG_STATE_HOME in Neovim's Lua?

I'm trying to modify the option backupdir, and I want to set it in my init.lua to something like this: vim.o.backupdir = "$XDG_STATE_HOME/nvim/backup//" This is inspired by the document :...
Flimm's user avatar
  • 2,262
2 votes
1 answer
186 views

Cypher syntax file asks about commentstring on open

I am using syntax highlighting on my Cypher scripts from https://github.com/memgraph/cypher.vim. (I would open an issue there but the project and its predecessor haven't been touched in 3 years.) ...
kjekk's user avatar
  • 29
1 vote
1 answer
37 views

Why doesn't Neovim version number follows semantic versioning rules? [closed]

Some developers are afraid to use the first number in the semantic version for unknown reasons. What is the sense to keep the major number always at 0? For what feature needs? It must be increased ...
zdm's user avatar
  • 121
1 vote
0 answers
11 views

Listening for changes in the `inccommand=split` preview buffers

I'm attempting to write a small lua script that can track the changes in the inccommand=split preview window. In essence, I want to have some kind of programmatic notification when the preview list ...
ollien's user avatar
  • 111
1 vote
0 answers
33 views

Possible to use the 'comments' option to check if a line is commented?

I am looking for a way to check if a line is commented or not. It should not be a filetype specific but should be commonly usable for a lot of filetypes. Note that there are single-line and multi-line ...
Rick Howe's user avatar
  • 363
0 votes
1 answer
43 views

How can I make w and b act like W and B to navigate big words (space delimited words)?

I navigate by big words much more often would like to just type w and b instead of W and B every time. I wonder if Vim has a setting for this.
Oneechan69's user avatar
0 votes
1 answer
36 views

How to let buffer show relative path when splitting?

It seems to be a vanilla-vim issue as the same behaviour also appears when I'm in vim -u NONE. Basically if you open a file, for example vim src/vector.h, and then split it with :bel vip %:p:h/vector....
Andrew.Wolphoe's user avatar
1 vote
1 answer
53 views

How to change the inlay_hints position on Neovim 0.10.0?

On NVIM v0.10.0 inlay_hints are shown on inline, which changes the code visual and make lines longer. How to change inlay_hints to show end-of-line instead in-line? Actual: Expected:
Niamotullah's user avatar
1 vote
1 answer
29 views

No syntax in help files (how to debug?)

Suddenly, it seems that I have no syntax in my help files. I do have help in Neovim\share\nvim\runtime\syntax , and &ft is help. Not sure how to debug it.
eyal karni's user avatar
  • 1,136
0 votes
1 answer
30 views

<CR> behavior unexpectedly changed in normal mode

I recently made a bunch of changes to my vim configs and I later noticed that the enter/<CR> behavior on normal mode has changed. I used to be able to select and execute a line in the command ...
Daniel Baulig's user avatar
0 votes
1 answer
12 views

Why and How to Solve Vim and Gvim Not Listening Content of Specific Folders on Windows 11?

So, I installed Vim 9.1, latest stable version and I'm having some problem in opening a project folder. What's happening is that when I try to open the folder that contains the .cs file, the Netrw ...
Desenplays's user avatar
0 votes
2 answers
31 views

Any commands to switch to the window on the far left or right?

lets say I have a grid of 3x2 windows open and am focused on the bottom right one, I want to switch to the one on the bottom left with one command, not move left twice. Vice versa as well. There's ...
Oneechan69's user avatar
1 vote
2 answers
36 views

Check if there are non-empty or named buffers open

When closing Neovim, I'd like to store the session, but only if there are any files open. If I only have the dashboard open, or an empty unsaved buffer, I want to skip this step. So, I need a way to ...
ElRudi's user avatar
  • 113
1 vote
0 answers
41 views

How to show pretty undercurl in Neovim in tmux?

steps to reproduce: open new iTerm2 window (no Tmux) run echo "rong;" | nvim --clean +"set spell" - notice the word is underlined with a curly line open new tmux pane repeat ...
Max Coplan's user avatar
0 votes
1 answer
13 views

Convert vimwiki_diary_months to lua

How do you set g.vimwiki_diary_months in lua? According to :h g.vimwiki_diary_months: *g:vimwiki_diary_months* It is a |Dictionary| with the numbers of months and corresponding names. Diary uses it. ...
Ludenticus's user avatar
2 votes
1 answer
157 views

How to split strings that contain ^M^@ characters?

I am working with gvim on WSL2 on Windows 10 and I receive strings of the form: some_text^M^@some_other_text^M^@more_text when I use split(message, '\r'), where message is a variable containing the ...
Barzi2001's user avatar
  • 606
0 votes
1 answer
12 views

How do I pass on the "max-len" configuration parameter to ESLint?

How do I tell eslint in my neovim config to limit line lengths? I think this is the max-len parameter, but where do I put it in the config? Here's my eslint config: eslint = { on_attach = ...
quant's user avatar
  • 105
2 votes
1 answer
59 views

Neovim: Is there any way to silence lsp/diagnostics messages by regex?

Jumping to the solution, I know, apologies. Context: I work on a large Django code base where mypy is too slow to be usable, so I use pyright, which is fast enough but can't handle some of the Django ...
hwjp's user avatar
  • 121
0 votes
1 answer
43 views

Vim: move in the INSERT mode between lines using left/right arrow keys

In Vim while in the INSERT mode, I would like to be able to move between lines using the left and right arrow keys. For example, if the cursor is at the beginning of a line and I press the left arrow ...
nvx's user avatar
  • 9
0 votes
0 answers
25 views

Creates new file when run as root instead of opening it

I cannot edit files when VIM is run as root. Why? Here's a file which contains 123 on the first line and nothing else: File opened as root: Typed in listen as root: I am confident that VIM has not ...
viator's user avatar
  • 1
2 votes
1 answer
44 views

Is it posible to disable replacing "%" to the current file in commands?

I'm using a command to transform an URL to another form in my text_file: :r! my_command 'https://example.fqdn.com/path%20with%20loads%20of%20spaces' The problem is that every % char is converted into ...
xihh's user avatar
  • 25
1 vote
4 answers
263 views

Double numbers on all matching lines containing text pattern

Is there an easy way to search for all lines matching a pattern, extracting a number on the line, and modifying it? I am playing around with a game config file and want to double all of the XP numbers ...
NewUser's user avatar
  • 93
0 votes
0 answers
16 views

How to have Lexplore *really* toggle?

Starting with the fact that calling :Lexplore over an over works fine and it "toggles" on and off as most people would assume When I start B Vim by opening a directory, :Lexplore will show a ...
gcb's user avatar
  • 119
1 vote
1 answer
12 views

Paste and enter insert mode at the beginning of line, terminal bash Lunarvim

When editing a text file, p and I pastes what I copied and gets me to enter insert mode at the beginning of line. But in terminal (executed by term bash) this not works. p pastes somthing, but I or i ...
Crispy13's user avatar
  • 113
1 vote
1 answer
38 views

Show only 1 line from the prior screenful?

How may I tweak the Vim <C-F> command to show only 1 line from the prior screenful? Well I tried to map a normal mode command that scrolls forward by 1 line less than the number of lines in the ...
gregrwm's user avatar
  • 13
0 votes
0 answers
17 views

Spellcheck dictionary entries from custom (fake) regions

In my ~/.vim/spell/en.utf-8.add file, I've been adding fake language regions (like en_0l) to account for my various interests without muddying them across spaces. Atop this file, I have a line like /...
Adam Katz's user avatar
  • 117
1 vote
0 answers
9 views

NeoVim Groovylsp [closed]

Is groovylsp available on Windows? I use with mason and mason-lspconfig and groovyls, but I don't get autocompletion.
Ikropka's user avatar
  • 11
1 vote
1 answer
46 views

Paste in front or after in visual-block mode?

I can enter visual-block mode using <C-v>, move down a couple of rows by pressing j several times, then paste some content from the registry via pressing p or P. However, the pasting will ...
athos's user avatar
  • 207
0 votes
1 answer
28 views

How to let `g:python3_host_prog` read the python path dynamically via `command -v python3` in Neovim?

I'm using python venv to manage my local pip packages. I'd want to let g:python3_host_prog read the result of shell command line command -v python3 dynamically when venv enabled/disabled in Neovim. ...
Marslo's user avatar
  • 133
0 votes
1 answer
29 views

Get relevant script for (all) mappings

vim.api.nvim_get_keymap('n') does return a table with lnum (line number) , but not with the name of the script that set it (or path). I only know that verbose nmap .. does it, but prefer to avoid it (...
eyal karni's user avatar
  • 1,136
0 votes
0 answers
43 views

clientserver not working

I compile Vim 9.1 with +clientserver and +xterm-clipperboard, and they appear in :version. However, the related commands like servername, remote_expr do not exist. When running vim --serverlist gives ...
di bao's user avatar
  • 21
0 votes
0 answers
22 views

Is there an equivalent of system() for capturing commands outputs or programs running in terminal buffers?

I am aware that system() capture the output of shell commands. I am wondering if there is a similar command for capturing the output of commands sent to other type of interpreters running in terminal ...
Barzi2001's user avatar
  • 606
0 votes
1 answer
55 views

Any Neovim plugins for formatting Markdown text? [closed]

I started learning Vim because I spend too much time formatting text right in Markdown editors. Vim motions help a lot with that, but I still want hotkeys or motions to format text in markdown to bold ...
Oneechan69's user avatar

15 30 50 per page
1
2 3 4 5
292