Skip to main content

Questions tagged [neovim]

Use this tag for questions specifically regarding Neovim-only features (i.e. features not found in Vim and other Vi-like editors). It should only be used if the problem does NOT occur in Vim or other Vi-like editors.

Filter by
Sorted by
Tagged with
0 votes
1 answer
521 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
  • 704
27 votes
5 answers
14k views

How can I use --servername and --remote in neovim?

in vim I can do vim --servername foo and vim --servername foo --remote-silent bar.txt to open files in one instance of vim from several terminal windows (via tmux or whatever). How is the same thing ...
Rafael Vega's user avatar
9 votes
6 answers
4k views

Clipboard is reset after first paste in Visual Mode

I am on Neovim. This is really annoying and weird. When I make a selection in Visual Mode and copy, then select a text and then paste, this paste only works once. For the next time, I again have to ...
ng.newbie's user avatar
  • 243
200 votes
6 answers
101k views

What is Neovim, and how is it different from Vim?

I've been hearing about Neovim; how does it differ from Vim? All the points on the homepage are just architectural changes 'under the hood'. As a user, what's the difference for me?
Martin Tournoij's user avatar
10 votes
1 answer
23k views

How to run terminal command in interactive mode from NeoVim?

I have a terminal command which runs code with a breakpoint in it. When I run this command in NeoVim the code execution does not stop at the breakpoint, instead I get an error, that its not a TTY ...
niekas's user avatar
  • 1,655
1 vote
1 answer
100 views

How to display multiple changed files on disk in Vim?

Related to this thread, How can Vim tell me which buffer is changed on disk among multiple buffers? This Vim configuration automatically checks for changes in opened buffers and notifies when a single ...
Mega Bang's user avatar
  • 309
13 votes
1 answer
3k views

Is there any way to distinguish between neovim and regular vim?

I was trying to migrate to neovim from vim. But in the end, there's some plugins which require python3 support and neovim package doesn't build with python3 by default( I'm on ubuntu, install neovim ...
Aaron Shen's user avatar
  • 2,529
12 votes
6 answers
3k views

Show exact number of matches even for large (>99) numbers

When I search for something /search-term and it shows up more than 100 times in my file, vim shows me that I'm on match x/>99 instead of x/121 etc. For smaller numbers it shows me the exact number ...
minseong's user avatar
  • 2,373
12 votes
5 answers
3k views

Abandon Vim and adopt Neovim - hard reasons for not doing so?

With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at neovim, with possible adaptation as spacevim/lunarvim. I am very comfortable with Vim, but am looking for a proper ide layer ...
Eric Marceau's user avatar
9 votes
2 answers
13k views

Neovim setup on MS Windows

I'm trying to switch from Gvim to Neovim. Most tutorials are about Linux and not how to setup Neovim on MS Windows? Two problems: vimrc From the document it's %userprofile%\AppData\Local\nvim\init....
aj3423's user avatar
  • 199
5 votes
1 answer
2k views

NeoVim - Go into insert mode when clicking in a terminal in a pane?

I'm trying to use NeoVim as a tmux replacement, and have found that no matter what I do, I can't get it to go into insert mode when I click in a pane that has a terminal in it. Here's the config I'm ...
Brad Parks's user avatar
150 votes
13 answers
150k views

Exit from Terminal mode in Neovim/Vim 8

I can't figure out how to go back to Normal mode after entering Terminal in Insert mode... Escape just doesn't seem to work. Any idea?
Stephane Rolland's user avatar
29 votes
5 answers
14k views

How to enter insert mode when entering Neovim terminal pane?

I have the following mappings to make it easy to move out of a terminal pane in Neovim: tnoremap <C-h> <C-\><C-n><C-w>h " Workaround since <C-h> isn't working in ...
aharris88's user avatar
  • 1,857
8 votes
3 answers
15k views

Neovim with split integrated terminal / REPL

Other editors and IDEs, such as VSCode and RStudio, have an integrated console/terminal/REPL with the following characteristics: They open in a split window. The file we’re working on is visible at ...
user137369's user avatar
7 votes
4 answers
7k views

How to clear neovim terminal buffer

I have a terminal buffer with 10000 lines of previously executed output. In order to search for the particular sequence of words I have to go through all 10000 lines before getting to my last executed ...
NikitQa's user avatar
  • 161
6 votes
2 answers
9k views

How to disable autoformating on save on LazyVim?

On LazyVim when I save a cpp file it is automatically formatted. It is possible to disable/enable it in the session using Spaceuf But I would like to disable that autoformatting on save functionality ...
Vivian De Smedt's user avatar
6 votes
2 answers
463 views

Is there an autocmd-like event for when operator pending mode is entered?

I'd like to make a plugin to display currently pending keys while in operator-pending mode. As the first part of that, how would I register an autocmd to run when operator-pending mode is entered? I'm ...
lahwran's user avatar
  • 161
6 votes
2 answers
793 views

How to exit insert mode if pressing escape merely types "^["?

I have neovim 0.4.2 running in a session of kiTTY 0.17.4 on OSX. I have pasted a long url while in insert mode. After doing this, every time I type BKSPC vim adds ^? to my document. Every time I type ...
Andrew Farrell's user avatar
5 votes
1 answer
3k views

NeoVim: default colors don't match vim's

I'm running NeoVim "straight out of the box"; after running the following commands: mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config} ln -s ~/.vim $XDG_CONFIG_HOME/nvim ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/...
Klaas van Schelven's user avatar
4 votes
1 answer
1k views

Is the goal of Lua in neovim to replace Ex, and if not what is it?

I am a new user to neovim, and a moderator on this site said You seem to imply that you expect there should be a native way to run [filetype] (and to some extent every Ex command) directly in Lua. ...
Evan Carroll's user avatar
  • 1,433
4 votes
4 answers
3k views

Nvim can not detect focus change inside tmux sessions

I use the following setting for automatic line number toggle. augroup numbertoggle autocmd! autocmd BufEnter,FocusGained,InsertLeave * set relativenumber autocmd BufLeave,FocusLost,InsertEnter ...
jdhao's user avatar
  • 1,143
4 votes
1 answer
2k views

How to change indenting for html files?

I code mainly in 2 languages python and HTML. I currently have the indenting configured for python in my neovim configuration file but I would to know how to make neovim auto-detect the type of file ...
KnownAsDon's user avatar
4 votes
1 answer
578 views

Start and attach to neovim in same python file

I have a working prototype for some kind of linux-based neovim-app. Sole functionality is "vsplit if 'k' is pressed". It is based on tarruda's nvim-terminal-edit-py. It is started through start_nvim....
Markus's user avatar
  • 175
3 votes
2 answers
6k views

FileType autocommand not working in Neovim

My init.vim is just au FileType * echom "test" However, if I open a file, neovim-qt will not echo test. If I load a new file while the window is open, it will also not work. I have managed to find ...
Mason's user avatar
  • 531
3 votes
1 answer
324 views

Moved from vim to neovim and now <BS> deletes 4 spaces at a time, instead of 1 as I'm used to. How to fix?

I've used vim for ages and am really used to inserting four spaces by hitting tab, but then being deleting them one by one. Now that I've switched to neovim this has changed to it inserting four ...
Codemonkey's user avatar
3 votes
1 answer
353 views

Restore working directory in terminal windows when loading session

While using :mksession feature, I found that it works well with files and netrw, but not so much with neovim terminal windows. The problem is that, for terminal, it never preserves working directory ...
Thunderbeef's user avatar
3 votes
1 answer
2k views

Add custom section to airline

I want to add section to mu airline that will display the output of a function called SpinnerText() taken from here. I honestly don't really understand how to do it and yes I did look at the ...
Thermatix's user avatar
  • 249
2 votes
2 answers
7k views

Recommended way to run vimscript normal commands with lua

What is the recommended way to run VimScript normal commands in Neovim with Lua? Sometimes, I can achieve things very easily with a few keypresses executed as a normal command compared to scripting ...
matko031's user avatar
2 votes
1 answer
371 views

How to tabdo all the visible buffers without changing view of the current tab?

My init.vim code: cd ~/Documents/cp nnoremap <leader>lcd :tabdo lcd %:p:h<cr> suppose, i have 4 tabs opened in nvim via using nvim -p A.cpp B.cpp C.cpp D.cpp A.cpp B.cpp C.cpp D.cpp ...
Mega Bang's user avatar
  • 309
1 vote
1 answer
1k views

Is it possible to type "return + shift" to insert a new line in deoplete?

Here is a situation. I use deoplete but since the pop-up menu when I type in something already puts the cursor at the first item on the list, when I type in return, it inserts a new line. So I want ...
Blaszard's user avatar
  • 565
1 vote
2 answers
183 views

Disable E173: X more files to edit warning in neovim

How can I make :q and other standard ways of exiting quit immediately even if E173 would ordinarily have stopped me in my tracks? Because this doesn't seem possible in regular VIM, how can I do it in ...
minseong's user avatar
  • 2,373
1 vote
1 answer
7k views

How to configure Neovim clangd to find my files?

I've used LazyVim's mason to install clangd LSP, but it doesn't seem to work properly. It can't find files in my workspace, so when I try to jump to declaration, it does nothing if the declaration is ...
CIsForCookies's user avatar
1 vote
2 answers
170 views

How to get embedded Lua syntax highlighting with g:vimsyn_embed='l' to work in Neovim 0.9.5?

I created a test file by launching Neovim using nvim --clean test.vim, then verified the filetype was vim using set ft. Then I set let g:vimsyn_embed='l'. However the following file is still ...
Jonathan Chan's user avatar
0 votes
1 answer
853 views

Shortcut to open definition of variable in a vertical split with Neovim mapping

This is a follow up question to this post where I would jump to the definition of a variable in a vertical split for ctags. I’m currently using an lsp language server like so: local bufopts = { ...
abbood's user avatar
  • 743
19 votes
4 answers
6k views

Send text from one split window to another

Recently there was an add-on to NeoVim which allows opening terminal in a vim buffer. This has appealing possibilities to send text from one vim window to another replicating, for example, a REPL like ...
Karolis Koncevičius's user avatar
19 votes
2 answers
9k views

How to conditionally load plugins

I was searching for an answer to this, but haven't found anything yet, so if I missed something obvious, I apologize. I thought it would be a quick google search away, so maybe it's more complicated ...
Hoopes's user avatar
  • 305
16 votes
3 answers
6k views

How can I change the default grep call (grepprg) to exclude directories?

I am trying to change the default grep call to avoid unnecessary plugin installation. What I want from vim is to call the external search using the builtin command :grep with custom arguments, this is ...
MaikoID's user avatar
  • 313
14 votes
2 answers
2k views

Detect neovim terminal from bash in bashrc

Does neovim set any environment variables that would let me detect from bash that the terminal is neovim? I want to change the behavior of my .bashrc if neovim is the terminal.
Praxeolitic's user avatar
  • 2,488
13 votes
3 answers
12k views

Why is my Neovim not in English and how do I force it to be?

I'm using Neovim 0.2.2 on macOS High Sierra (10.13.1), installed via brew install neovim. I removed .config/nvim/init.vim. Neovim starts up using German for interface labels, as shown here: Here's ...
anothernode's user avatar
13 votes
2 answers
9k views

Running a command Async in Neovim

As far as I know, Neovim enables running a command async, without blocking the user. I was told this is also enabled in Vim 8. But I couldn't find examples of how to run a command asynchronously. ...
Husain's user avatar
  • 285
12 votes
3 answers
15k views

How to install stable version of neovim on Ubuntu 18.04

No matter how I do it, I seem to get the nightly or the 0.2.2 version. How do I install the stable version of Neovim. I have too many issues in the nightly. I used sudo apt install neovim and when I ...
Costa Michailidis's user avatar
11 votes
2 answers
3k views

How to start maximized gui with qt-neovim?

I am using neovim with qt-neovim (linux arch). On gvim I could launch a maximized window with: if has("gui_running") set lines 999 columns 999 endif That is not working now though. I ...
cdvv7788's user avatar
  • 219
10 votes
2 answers
339 views

How can I make vim stop splitting my words into chunks?

English language users probably don't have this trouble, but vim is pretty dumb when it comes to regular expressions. In my case most letters in the Turkish alphabet outside the EN alphabet don't seem ...
Caleb's user avatar
  • 2,245
9 votes
1 answer
5k views

How can neovim on Windows be configured to use gitbash as the shell without breaking temp files?

At work I use neovim on Windows, and set the shell to bash using the bash executable that comes with Git for Windows (gitbash), which is in my PATH. The settings in the minimal init.vim pasted below ...
greenglass's user avatar
8 votes
1 answer
7k views

How to configure pylsp when using mason and mason-lspconfig in Neovim?

I want to configure my Python language server (pylsp) in Neovim in a Lua config (init.lua). I just transitioned from a Vimscript to a Lua config with basically zero Lua knowledge and this is causing ...
Nie Dzwiedz's user avatar
7 votes
1 answer
14k views

Neovim: Select an autocomplete option with <tab> instead of <return>

In the example below, how do I use <tab> to select HttpResponse the item instead of <enter>? I'd like to make this change permanent. This is using Kite within vim in case it matters.
WickedJargon's user avatar
7 votes
4 answers
8k views

Portable Neovim. How to change default data folder? How to avoid registry entries?

I'm trying to make a protable Neovim so I can use my plug&play IDE from a USB thumbdrive on any offline Windows computer. I managed to store my plugins and my sysinit.vim onto the USB drive and ...
Piglet's user avatar
  • 185
7 votes
1 answer
5k views

Neovim Clipboard Selection

I am using neovim 0.2.3 dev and xfce4-clipman clipboard manager. I want to copy from the neovim into registers and put it into clipman register. How can I do that?
3N4N's user avatar
  • 5,814
7 votes
1 answer
3k views

Search and highlight two different strings in different colors

I have a situation with typesetting a book in which the quotation marks are all screwed up. The author used a variety of marks¹ and apparently didn't believe in discriminating between them. I've ...
Caleb's user avatar
  • 2,245
6 votes
1 answer
10k views

Managing autoload directories efficiently

There are a few questions intertwined -- I hope I convey my intentions well enough so that someone understands where I'm confused and what I'm trying to do. I apologize ahead of time for the chaotic ...
waxwing's user avatar
  • 163