Questions tagged [neovim]

A project that seeks to refactor Vim. Use this tag for questions specifically regarding Neovim-only features (i.e. features not found in Vim and other Vi-like editors).

Filter by
Sorted by
Tagged with
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
2 votes
1 answer
1k views

Buffers are left even when `nohidden` is set

I have explictly said in my vimrc that I want nohidden behaviour (I am jumping between files a lot, with long lasting session, and after some time buffers list is very polluted). However when I jump ...
Hauleth's user avatar
  • 217
2 votes
1 answer
1k views

Disable absolutely all auto-comments, for real

Auto-comments are the most annoying "feature" of text editors and IDEs for me. I've searched -- nay, scavenged -- high and low to figure out how to get rid of literally any semblance of automatic ...
Qix - MONICA WAS MISTREATED's user avatar
0 votes
2 answers
1k views

Switch between header and source files in one buffer

I am currently using vim-altr to switch between head and source file in c++. I use nmap <F2> <Plug>(altr-forward) nmap <F3> <Plug>(altr-back) to move between buffer. However,...
Sardathrion - against SE abuse's user avatar
4 votes
1 answer
252 views

How can I make Neovim return to the tab that was active before running `:Git diff`?

How can I make Neovim automatically return to the tabpage that was active before running :Git diff %? Before I commit my work in git, I often run :Git diff to review changes (the :Git command is ...
nelstrom's user avatar
  • 289
2 votes
1 answer
4k views

Deoplete with Neovim doesn't work

I have a problem with my deoplete plugin. When I write code, I don't have automatic completion on dot. I need to manually press <c-x><c-o> to make it work. Here is my deoplete ...
hallow_me's user avatar
  • 121
1 vote
1 answer
1k views

cannot get color schemes to display correctly in neovim

I've been fiddling with neovim color schemes for a while now, and cannot make them look same as on previews. I'm using terminal.app on osx, and thought it was 256 color cap problem, so I moved to ...
user avatar
2 votes
1 answer
514 views

Vim highlights valid shell parameter expansion syntax as an error

#!/bin/bash echo ${2:-"-l -p"} Having some bash parameter-substitution fun and (Neo) Vim complains about it, while the code is perfectly fine. I know I can suppress errors totally by doing sort of ...
Al.G.'s user avatar
  • 357
4 votes
1 answer
1k views

Change the filetype based on tags / regions in the file

Recently I've started up with vuejs and I'm currently trying to set up my editor for using it. Vue uses a similar approach with React - keeping the HTML, Javascript & CSS in the same file - it ...
motanelu's user avatar
  • 151
2 votes
1 answer
192 views

Command output window disappears on blur

I'm using vim (actually, neovim) on macOS and whenever I run a command which outputs text (e.g. :version) and switch to another Desktop (so iTerm looses focus) and get back to it, the output window/...
Iulian Onofrei's user avatar
12 votes
4 answers
3k views

In neovim, how can I share registers between editor instances?

I know that vim had the client/server divide that allowed register sharing between different vim clients, but how do you achieve the same thing in neovim? It doesn't support the client/server flags. I ...
Christopher Waldon's user avatar
1 vote
1 answer
394 views

NeoVim: how to build luarocks (and it's modules) without internet access?

I have a Fedora COPR (personal repo link). It's in the NeoVim wiki Fedora installation section. There's been interest in getting it into the main Fedora repo. Koji (the Fedora build tool for all ...
David Personette's user avatar
2 votes
0 answers
242 views

visincr.vim compatibility with Neovim

In Vim 7.4, I used to effectively deploy the visincr.vim plugin for such a task. However, I have recently moved to neovim and this won't work anymore. The errors produced by :so % fills up the whole ...
Dr Krishnakumar Gopalakrishnan's user avatar
16 votes
4 answers
6k views

Remote pair programming in NeoVim?

I'm a NeoVim user and would like to be able to collaborate in real time with users, preferably also across other editors. Are there any open source plugins that enable remote Neovim←→Neovim pair ...
Caleb's user avatar
  • 2,235
5 votes
2 answers
5k views

Use variable for mapping inside vimrc

I'm testing NeoVim and would like to put in my vimrc universal mapping for either vim and nvim. I've sketch sth like below so far, but it doesn't work and it's very rough. function! Meta(key) " ...
Mesco's user avatar
  • 456
10 votes
2 answers
5k views

How to close and and delete terminal buffer if programs exited?

I'm trying to modify test runner plugin to do the following: When running test show a window with them (that part is already covered by the plugin) After all tests are done if there is no errors hide ...
user1685095's user avatar
  • 1,141
7 votes
2 answers
3k views

Is there a way that I can identify which window is a terminal after calling the `:term` command in neovim?

Is there way I can identify a window by a number in neovim and then jump to it with a macro ? Or better yet...Is there a way that I can identify which window is a terminal after calling the :term ...
PrimRock's user avatar
  • 363
2 votes
1 answer
190 views

Playwritting with vim [closed]

I've started using vim for things besides programming, (taking notes, etc.) but something I haven't been able to replace final draft with vim yet just because there are so many things I need, so I was ...
Ace shinigami's user avatar
2 votes
2 answers
6k views

Neovim: plugins installed but not working

I am using Ubuntu 16.04. I installed Neovim using apt-get. I downloaded the plug.vim script & put it into the autoload folder in ~/.config/nvim. I put the following in my init.vim: call plug#...
NightMare's user avatar
8 votes
2 answers
8k views

VimPlug unknown function plug#begin in NeoVim

Recently I decided to switch from Vundle to VimPlug, and I noticed that after installing it... putting the plug.vim in my autoload directory ~/.vim/autoload/ and making sure that my vim and neovim ...
PrimRock's user avatar
  • 363
2 votes
1 answer
791 views

Disable vim-better-whitespace highlighting for nvim-ipy buffer

I am using the vim-better-whitespace plugin to highlight trailing whitespaces. For some buffers, I don't want this behavior and vim-better-whitespace usually provides an option to list the filetypes ...
languitar's user avatar
  • 283
3 votes
2 answers
2k views

E576: Failed to parse ShaDa file: extra bytes in msgpack string at position 3

I'm switching from vim to neovim, but when starting neovim, I get the following error on startup: E576: Failed to parse ShaDa file: extra bytes in msgpack string at position 3 What does this mean, ...
Tom Hale's user avatar
  • 2,601
2 votes
1 answer
1k views

Set &viminfo differently in neovim and vim [duplicate]

My current &viminfo contents are: :set viminfo? viminfo=!,'100,<50,s10,h,n/home/ravi/.local/share/vim/viminfo I want to have a single vimrc which works with both vim and neovim. What ...
Tom Hale's user avatar
  • 2,601
6 votes
2 answers
439 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
20 votes
3 answers
19k views

How do I check the version of NeoVim in vimscript?

I can check vim's version by using v:version, and I can check if I am running in nvim by doing has('nvim'). Is there a variable like v:version in neovim to let me know the nvim version, like 0.1.4 ...
skywind3000's user avatar
1 vote
1 answer
315 views

<Plug> was printed to the buffer instead of execute

I am using neovim with deoplete.nvim and neosnippet.vim. I am trying to make TAB key do both navigating through the popup menu and expand snippets when it's able to. Here is my config. " <TAB>: ...
Thuong Nguyen's user avatar
4 votes
1 answer
2k views

Is there a conditional to distinguish NeoVim and Vim within vimrc? [duplicate]

I want one vimrc to work with both Vim and NeoVim. The vimrc of Vim seems to work well with NeoVim. But not the other way around, given that there are many special new settings in NeoVim, e.g., ...
Loves Probability's user avatar
0 votes
1 answer
292 views

Neovim: behavior different from vim with the same vimrc

I'm using Vim and now I'm moving to NeoVim. I have configured my .vimrc so that the hotkey Control H/J/K/L moves between panels. (seamlessly between vim and tmux also). But now when I'm moving to ...
hqt's user avatar
  • 183
1 vote
0 answers
301 views

Sign column font is cut off

I have an issue where the signs in my sign column are cut off in the middle (screenshot below). Changing the Guifont or the font size doesn't seem to matter. It looks fine in terminal neovim. I am ...
bronzehedwick's user avatar
4 votes
3 answers
2k views

Ability to make vim run commands in background and only show the final result on screen

Consider something like this nnoremap <silent> <leader>( F(a<cr><esc>vi(:^Uexecute"'<,'>s/,/,\r/gg"<cr>=i(k$%i,<cr><esc>%:nohlsearch<cr> It ...
Sassan's user avatar
  • 485
6 votes
1 answer
347 views

How to highlight in location list error for current line

What command could I use to highlight the error in the location list for the line where the cursor is in normal mode? Ie, the inverse operation of selecting a line in the location list and hitting [...
Iiridayn's user avatar
  • 193
0 votes
2 answers
2k views

Make neovim background the same colour as the terminal background

In addition to what was asked above, is there also a way for (neo)vim background colour to change when the terminal background colour is changed? It's running in OSX in the default terminal app.
The Enigma's user avatar
13 votes
3 answers
5k views

How do I ShaDon't?

I really don't care about any of the "value" that viminfo or its replacement in neovim, ShaDa, provide. I couldn't care less about whether or not my cursor is in the exact place I left it when I open ...
Floegipoky's user avatar
4 votes
1 answer
2k views

How to change buffer name for NeoVim Terminal special buffer

If I execute a interactive command with :terminal, buffername will be something like: term://.//1234:command executed here with params. I want to be able to change it to something more meaningful to ...
Gabriel Mazetto's user avatar
4 votes
2 answers
3k views

Can't get deoplete plugin working in Neovim

I have installed deoplete plugin into my Neovim using dein. I have put let g:deoplete#enable_at_startup = 1 into my init.vim and I can see the autocomplete list when I type in the insert mode - so far ...
Petr Mensik's user avatar
11 votes
2 answers
1k views

Neomake hanging when using eslint

I have been following the following two tutorials to try and set up eslint and Neomake: Linting code with Neomake and Neovim Linting code with Neovim and Neomake - ESLint edition So I have the ...
Otis Wright's user avatar
18 votes
2 answers
5k views

How do you find where a variable was last assigned?

I am trying to set g:netrw_list_hide and it doesn't seem to work. No matter what I set it to in my .vimrc it always has the value ,^\.\.\=/\=$. Only if I source my vimrc file again, then it holds the ...
Cezar's user avatar
  • 283
11 votes
1 answer
9k views

I can't switch to | cursor in insert mode

I want to change cursors to a | character in insert mode, and then back to a block in normal mode. I am using urxvt as my terminal, and neovim. To switch cursors in my terminal, I run the following ...
Caleb Eby's user avatar
  • 213
12 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,489
6 votes
1 answer
3k views

GnuPG encrypted file editing with Neovim

Is there a way to open a GnuPG encrypted file with neovim so that one can read/edit it and on write the file is re-encrypted? This is possible via vim-gnupg in classic vim but has not been ported to ...
Sardathrion - against SE abuse's user avatar
4 votes
2 answers
2k views

How can I reload my .vimrc without appending anything to my current settings?

I'm aware of this question, but sourcing that way is not the same as restarting Vim. I want to do that without restarting Vim. Like, if you have set fo+=c in your vimrc then re-sourcing changes it ...
MaikoID's user avatar
  • 293
14 votes
3 answers
5k 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
  • 293
2 votes
1 answer
1k views

How to customize the entries in the completion menu?

In insert mode, when you hit ctrlp on a partially written word, a menu pops up with possible matches for completion. How can I customize those matches ? (I have a ruby-clangc gem that I want to use ...
cedlemo's user avatar
  • 153
5 votes
1 answer
2k views

How can I configure nvim to use a single escape to exit insert mode?

I was trying out nvim (neovim) for the first time and I find that I have to type <escape> twice to get out of insert mode. I'm not sure if this is a feature or a bug. I see the same behaviour ...
Peeter Joot's user avatar
1 vote
2 answers
556 views

Run :cwindow after :Neomake finishes

How do I attach a callback to :NeomakeProject so that :cwindow is executed after compilation finishes? i.e. I'm too lazy and want everything (open the error list) to happen automatically. (currently ...
Al.G.'s user avatar
  • 357
1 vote
1 answer
558 views

Get which plugin sets a specified variable?

Is there a way to know which installed Vim/Neovim plugin sets a specified variable? For example, I use Neovim 1.5-dev with the following plugins installed: morhetz/gruvbox tomasr/molokai mhartington/...
caneta's user avatar
  • 417
4 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
3 votes
1 answer
641 views

How can I securely restrict vim access to a single file?

So first, I realize that this question is slightly out of the ordinary for this site. I will explain the backstory to avoid the XY problem. Over on Programming Puzzles and Code Golf, lots of users (...
DJMcMayhem's user avatar
  • 17.4k
3 votes
2 answers
284 views

Print neovim api-info using python 3

I get a human readable list of api functions using :new|put =map(api_info().functions, 'v:val.name') in neovim as suggested on https://neovim.io/doc/user/msgpack_rpc.html. Problem is, this doesn't ...
Markus's user avatar
  • 175
4 votes
1 answer
555 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