All Questions

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

why setting as autocmd

To display linenumbers, I can do :set number in the edited file (that works) or insert set number in the .vimrc (that works too). To change the filetype, I can do :set filetype=c in the ...
0 votes
0 answers
5 views

MacOS neovim-nightly build error: implicit declaration of function

macos 13.2(apple chip) Build prerequisites already installed. build param: make CMAKE_BUILD_TYPE=Release log: /Users/agou-ops/GitHub_workspace/neovim-nightly/src/nvim/lua/treesitter.c:149:3: error: ...
-1 votes
0 answers
7 views

How to replace between two marks with the content of a python variable

I'm writing a plugin to convert between word cases, and I would like to apply my filter between two marks. The conversion part is done with python, but I don't know how can I replace the text between ...
  • 99
-1 votes
0 answers
11 views

I cannot rename variables when I try to refactor the code in Vim

I have a code refactoring question. I am using vim/coc/tsserver in my typescript project. The problem is that coc-rename doesn't work for me. When I try to rename any variable, I get an error: Error: ...
0 votes
0 answers
10 views

Prevent Neovim LSP from opening a scratch preview buffer

When auto-completing with neovim's LSP, whenever selecting a menu entry from the auto-complete list a scracth/preview buffer is created, even if empty: How can I disable these buffers specifically ...
0 votes
0 answers
7 views

Coc Nvim automatically select all text between tags

I have mapped esc to < C-J> in .vimrc and whenever I try to go to normal mode after inserting some text inside any html tag using that mapping it selects all the character between that tag like ...
1 vote
1 answer
10 views

Cannot open terminal ini nvim

I installed Plugin terminal using the vim-terminal plugin and try to execute :TerminalSplit bash but before the terminal open I got a warning message. Python 2 interface is not installed, using Python ...
1 vote
1 answer
17 views

<Tab> out of insert mode - lua keymap

I'm a relatively new neovim user. I use nvim-autopairs to always induce matching (, [, {, ', " character pairs, and automatically placing my cursor inside them. As an example, in insert mode, if ...
0 votes
1 answer
38 views

How to get the total lines of a file before it's loaded into a buffer?

As title. My target is to disable a plugin before it is applied to a buffer that will be loaded with the content of a file. I can get the file name before it is loaded. The file to be opened is ...
  • 1,075
0 votes
0 answers
10 views

Adding dictionary words list to deoplete plugin

Let's say I have list of words in one file in my home directory (each word is in separate line): bar barfoo foo foobar ... How can I add this list of words to vim deoplete auto-completion plugin? I'...
  • 1
1 vote
0 answers
14 views

Is it possible to resize a floating window?

As title. Say I just created a floating window and some lines of it are too long to be displayed properly(to me), then in this case I would prefer to resize that window to make it larger instead of ...
  • 1,075
1 vote
1 answer
28 views

Handle star imports in Python

I'm currently developing a lot with Python. I use projects like pwntools and sometimes I'm contributing to repositories that use star imports in their source code. I know that star imports are not ...
  • 111
0 votes
0 answers
12 views

Exclude a single level of nesting region from another region

I am trying to define syntax highlighting (and more importantly, folding) for the following region (a Rust doc comment preceding e.g. a function): 1┌ /// <- region starts here, at the first triple-...
1 vote
1 answer
53 views

How to type math multipliction symbol (×) in insert mode?

The Unicode value of multiplication sign (×) is 00d7. I can insert it using the key sequence: Ctrl-vu00d7. I want another way to generate it. In the webpage: Typing Vim math symbols in insert mode. ...
  • 173
0 votes
1 answer
69 views

How to grep only the contents of the current file?

I have this alias to grep under the cursor (for the entire project): " bind K to grep word under cursor nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR><ENTER>...
  • 581
0 votes
1 answer
44 views

Changing the Vim backward search key from semicolon to period

I am trying to change the key used for going backwards in search results while using Vim. Currently, the key used is the semicolon (,), but this conflicts with another function in my config. I would ...
0 votes
0 answers
10 views

vim NERDTree with vim-nerdtree-tabs: closing a tab with more than one tab open throws an error [closed]

Issue: While using NERDTree and vim-nerdtree-tabs when NERDTree is open, if there is more than one open tab and you close a tab (:q) the following error is reported: Error detected while processing ...
  • 101
0 votes
0 answers
19 views

nvim: `vim.o.cmdheight=0` looses the 'recording @a' macro messages

When I set vim.o.cmdheight=0 in neovim, then use macros. The recording @a messages are lost. Aside for reverting back to vim.o.cmdheight=1, how can I display these messages in lualine? Environment: ...
1 vote
1 answer
54 views

How do I open vim from the command-line at a particular tag?

I have set up ctags to generate a tags file for my code base. I can now jump to definitions of functions by running :tag FUNCTIONNAME or by pressing ctrl-] when my cursor is on the invocation of a ...
  • 1,912
0 votes
1 answer
40 views

Why can't I jump to the help files I've written?

I am writing neovim help documentation for a plugin I am developing that reads as follows. project.txt *project* description ... ======================================================================...
  • 121
0 votes
0 answers
36 views

How do I properly display emoji in Neovim?

I'm running Ubuntu 22.04 and I have neovim (I think I have the latest version) v0.6.1. When I use an emoji in my code, like this coral: And then I switch buffers. I see an artifact (in this case the ...
0 votes
1 answer
34 views

Get the last line of Vim terminal output

I use Vim for editing DocBook files. I created several functions that manipulate the text in the buffer. For example to build a PDF from the source using an external command. I run these functions ...
0 votes
1 answer
24 views

Can I isolate an environment variable name in the expand() function

In my shell, I can use curly braces to isolate the names of environment variables. For example, if I have two env vars, ONE and TWO, equal to 1 and 2, then > echo "$ONE_$TWO" ONE_: ...
6 votes
1 answer
388 views

Why does Vim add additional length to octal number when decrementing?

If I decrement my octal number so that it wraps around Vim adds length to this number. Can the length added be configured? Example: 00 Decrement with Ctrl-X gives 01777777777777777777777 Even if I ...
0 votes
0 answers
14 views

How to uncomment/inverse indented nested comments in .vim files using NERDCommenter? [closed]

In .vim files I have a problem uncommenting an indented line with a nested comment: " let &a = 1 " test When cu is invoked nothing happens. If the comment starts at the beginning of ...
0 votes
1 answer
25 views

Substitute in multiple isolated parts of a string

I have this string: b'32^"Strings" c32 d32 c32 b32 r8. \break I want to replace [a-z] (except r) with r and remove ' everywhere outside "..". I want to ignore \break. Final output ...
  • 145
0 votes
0 answers
9 views

How to change Vim non-gui cursor in Windows Terminal running WSL2 Ubuntu

By default my WSL2 Ubuntu Windows Terminal has a blinking cursor. When I start non-gui Vim, the cursor stops blinking. vim --clean -u NONE Since I start Vim in "clean" mode it is obvious ...
0 votes
0 answers
12 views

Conjure client '' doesn't support function: eval-str

I'm using neovim for clojure development. I've Olical/conjure and Olical/aniseed plugins added. The config are use 'Olical/conjure' use 'PaterJason/cmp-conjure' use 'Olical/aniseed' local com =...
0 votes
0 answers
14 views

Github Copilot conflicts with vim-snipmate [closed]

When I installed Github Copilot for neovim, snipmate stopped working : ( Is there a way I can have both work?
1 vote
2 answers
32 views

Detect Editing of Directory

How do you detect if a directory is opened(with :edit) in Vimscript? I am lazy loading a file explorer and need it to load it before I open a directory. One approach I tried using an autocommand that ...
0 votes
2 answers
36 views

Yank non-consecutive lines into the register?

I'm surprised this hasn't been asked yet, but how do I copy non-consecutive lines into the buffer at once? For example, let's say my file looks like this: 1 2 3 4 5 6 7 8 9 10 What commands can I use ...
  • 11
0 votes
3 answers
41 views

What is the setting for the strict tab adherence when running vim with no configuration?

When I run vim with no configuration (--clean), in a bash file I cannot move the cursor before any indented tabs. I remember being annoyed by this before I regularly used vim, but early on as I grew ...
  • 228
0 votes
1 answer
31 views

Statusline vs Rulerformat - What is the Difference?

Question What is the purpose of the ruler? I have recently learned about the statusline and the rulerformat, and was wondering what the difference between them is. Why does the ruler exist? Why can't ...
  • 172
0 votes
1 answer
24 views

Go to directory in link (instead of opening the file)

I have a text file with lots of links to local directories which cointains .pdf files. I know about gf, but is there a way to open only the directory and not the file? For example, from this link ~/...
1 vote
1 answer
30 views

How to add <bits/stdc++.h> header file in Clangd installed through Mason (Neovim lua)?

I want to add/expand the Clangd Language server, which I installed through Mason within Neovim, with the standard libraries that come with MinGW (I run windows 11). I'm trying to do CP, and for that I ...
1 vote
1 answer
30 views

How to use alternation operator in ripgrep + vim?

I have the following in my .vimrc which (I believe) makes :grep within Vim use rg: if executable('rg') set grepprg=rg\ --no-heading\ --vimgrep\ --hidden\ --case-sensitive\ --ignore-vcs\ --glob\ '!....
1 vote
1 answer
37 views

How to add action before "gf"?

I'm using NVIM 0.8.2 I'd like to replace the default gf command (goto file under the cursor) to do something before and after the action. For example: echo "do something before" goto file/...
  • 205
1 vote
1 answer
23 views

What happen internally when I set `bufhidden` to `delete`?

As title. Would the buffer I set the option with the value delete really get deleted immediately? If not, when will it be deleted and what is this mechanism? Sorry for maybe a bad question but I'm ...
  • 1,075
0 votes
2 answers
28 views

How to remap the esc key to "capslock" in linux?

Having to press the esc key every time that you want to enter normal mode is a pain. I have seen multiple answers where people map combinations like jj. But why use that when you can map the capslock ...
1 vote
1 answer
136 views

Always duplicate yanked text to system clipboard

I'm using neovim 0.8.2 Is there a way to automatically mirror last yanked text to system clipboard, regardless of which register I used to yank it to? So if I run something like "ayiw I will have ...
  • 165
1 vote
1 answer
33 views

How to repeat an insert at the end of a line?

I'm quite used to the very basic action of inserting some text, entering normal mode, moving to somewhere else I'd like the same text, and hitting . to do so. This doesn't work if the insert needs to ...
0 votes
1 answer
25 views

How to debug this problem with the :map command?

I was trying to view my key mappings because I can't seem to jump through parts of snippets in UltiSnips. So I type :map and hit enter and it comes up with the start of the list, but there I can't ...
1 vote
1 answer
21 views

Does `.rc` do anything in `after/plugin/foo.rc.vim`?

I see some people add a .rc. extention to files in after/plugin, is there any difference between: after/plugin/foo.vim after/plugin/foo.rc.vim ? Or: after/plugin/bar.lua after/plugin/bar.rc.lua ?
1 vote
1 answer
19 views

Correct vim package for python development?

I'm trying to setup VIM with Flake8, YouCompleteMe and other python add-ons using Vundle. What is the correct Vim package (vim/vim-gtk/vim-gtk3/...) to install on linux? I noticed after apt install ...
  • 11
3 votes
1 answer
119 views

How do I change behavior on write based on file path?

I have the following function in my config and it works fine for formatting files on save function! Formatonsave() let l:lines="all" if has('python') pyf ~/bin/clang-format....
  • 133
0 votes
1 answer
23 views

How can I set *.xsh filetypes as python?

I am trying to have set filetype=python automatically executed when I open a file ending in .xsh. However when I try it and then run the command set ft? it always shows me the file as xonsh. This is ...
0 votes
2 answers
41 views

Is it possible to prevent the buffer of a window from being changed?

As title. In fact, I just encountered a situation where I cannot change the buffer of the current window, which is created by some plugin. So I guess there might be some window/buffer option(s) to ...
  • 1,075
0 votes
1 answer
30 views

"Error detected while processing TextChangedI Autocommands for "<buffer=4>":" ParInfer Neovim

I'm setting up parinfer plugin for lisp development in neovim. I've installed neovim plugin using below code - use 'gpanders/nvim-parinfer' And I've also setup below configuration -- parinfer options ...
1 vote
1 answer
26 views

Is it correct that between a CmdlineLeave and a CmdwinEnter there must be a CmdlineEnter?

Given augroup Dummy autocmd! autocmd CmdLineEnter / echom "CmdLineEnter /" autocmd CmdwinLeave / echom "CmdwinLeave /" autocmd CmdLineLeave / echom "CmdLineLeave /&...
  • 1,984
0 votes
0 answers
16 views

how to configure conjure aniseed parinfer in lua for neovim clojure development?

I'm using neovim for clojure development. I would like to setup below plugins. Olical/aniseed Olical/conjure gpanders/nvim-parinfer PaterJason/cmp-conjure I don't know how to setup rudimentary ...

15 30 50 per page
1
2 3 4 5
265