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).

393 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
0 answers
628 views

Persistently fix the height of a split in vim

So I searched the web far and wide and I can not for the life of me figure out how to do this. I have the following key binding: nnoremap <leader>o :below 10sp term://.//$SHELL <cr> :set ...
8 votes
0 answers
200 views

How does NeoVim's native LSP client compare with plug-ins that implement that protocol?

NeoVim v0.5 will include a native LSP (Language Server Protocol) implementation. See Greg Hurrell (wincent)'s Screencast #87: Neovim's built-in LSP client covering it. How does it compare with ...
  • 27.3k
6 votes
0 answers
361 views

How to get bold comments in vim

I am trying to add bold comments to my vim files. What i mean, is to be able to get something like this: I saw other articles like this that allow to toggle bold comment. The proposed solutions from ...
  • 181
6 votes
0 answers
486 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 ...
6 votes
0 answers
10k views

Is there any similar way in vim to get standard path like neovim stdpath function

In neovim, we can get default standard path via stdpath() function. I wonder if there is any way to do that in vim. below is the help doc about stdpath() in neovim: stdpath({what}) *...
  • 263
6 votes
0 answers
2k views

Use :terminal to display file with ansi escape codes

I want to display a file in Neovim with ansi terminal escape codes interpreted. I created a file which contains ansi escape codes (only colors for now, we can think about others as a bonus): echo '\e[...
  • 1,569
6 votes
0 answers
7k views

How to delete swap files on neovim?

While editing a file my neovim crashed when I tried to save the file (with the error message "init.vim" 77L, 2423C writtennvim(5888,0x7fffa9f29340) malloc: *** error for object ...
  • 527
5 votes
0 answers
38 views

Neovim makes spurious directories and doesn't clean them up on exit

Neovim makes directories in my home folder (presumably to store swapfiles, etc.) of the form nvimzOvQcg, nvim098eqo, nvimUyUGZ8, etc. Upon exit, the contents of these directories are cleaned up but ...
5 votes
0 answers
951 views

(Solved-ish) neovim: Don't close :terminal buffer after process exit

In Vim, when I run, for example, :terminal python3, and, when I'm done, exit python, the terminal window stays open as a readonly buffer, which I can inspect freely. In Neovim, I always get "[Process ...
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 ...
4 votes
1 answer
101 views

How to normalize a file path opened from the quickfix window?

Setup I am using NeoVim v0.7.2 (also tested with v0.6.1) on Windows 10 in git-bash, with vim-dispatch to allow for asynchronous builds (building a C++ codebase with Clang). I have this option in my ...
  • 141
4 votes
1 answer
277 views

How to use -complete=lua for command-completion?

If you check the help for :command-completion, there is a line that reads: -complete=lua Lua expression But it does not give further instructions about how to use it, or how to provide a Lua ...
4 votes
0 answers
729 views

Can (Neo)Vim be configured to set the filetype according to the shebang?

Lately I've been using neovim to edit lots of files with the .tmpl extension. These files all have shebangs, most (but not all) of which are #!/bin/sh. The default behavior seems to be that neovim ...
4 votes
0 answers
167 views

Mapping that works in Vim does not work in Neovim

I use Tim Pope's plugin vim-unimpaired, and one of the shortcuts that it enables is "bubbling" text (moving a line or a set of lines up/down). In normal mode, the shortcut for bubbling text ...
4 votes
0 answers
1k views

Vim /usr/bin/bash: /s: No such file or directory

Repost from Stackoverflow; I read a comment which directed me here saying it would be more helpful. Just set up nvim; unfortunately, the following error is plaguing the setup. Whenever I try to ...
  • 191
4 votes
1 answer
379 views

How to set copyq to handle clipboard?

I want to let CopyQ clipboard manager handle clipboard (I am using set clipboard+=unnamed setting). To that end, this setting was added to init.vim file: let g:clipboard = { \ 'name': '...
  • 151
4 votes
0 answers
110 views

How does expression folding actually work?

The following is a stripped down version of my folding function for LaTeX documents: setlocal foldmethod=expr setlocal foldexpr=LaTeXFoldsExpr(v:lnum) " Sections to be folded let g:...
  • 179
4 votes
0 answers
839 views

"^[[201~" character being pasted at the end of file

I'm trying to copy-paste by hand this file, but whenever I paste the contents in vim the last line shows this weird character at the end of the line ^[[201~. My guess is that it's one of those wrong ...
  • 153
4 votes
0 answers
827 views

How do I setup Mypy with Neomake

I'm trying to use Mypy with Neomake, but without success. I am currently using flake8 with Neomake, and it works seamlessly, e.g.: def foo(bar): return 1 foo(1) > E305 expected 2 blank lines ...
  • 141
4 votes
0 answers
756 views

Wrong color-theme displayed

I recently saw this video about tmux and vim and instantly fell in love with the color theme used in the video. Luckily the presenter (Nick Nisi) provides a link in the video-description to his .vimrc ...
3 votes
0 answers
692 views

TailwindCSS Intellisense into Neovim

I need someone that has tailwindcss-intellisense into neovim, I haven't been able to set it up since yesterday, I might have at this point to build it from scratch. I followed this two guides: https://...
  • 31
3 votes
0 answers
1k views

:Telescope commands throw error

My environment: OS: OSX 11.6 BigSur nvim: 0.6 I had never used vim telescope before, so this is my first encounter with it. I followed the instructions of installing telescope.nvim and plenary.nvim....
3 votes
0 answers
209 views

How do I recover a specific swap file?

Last night I wrote a short piece the saved saved and exited (:wq). Then the goat-rope of trying to recover what apparently seemed to vanish stated. Since it was about 3 AM and I was getting no where, ...
  • 131
3 votes
0 answers
186 views

Delete key appears to remove two characters

I open a simple HTML file and navigate to a section of the file where I want to delete a character. I enter INSERT mode and press the DEL key, this seemingly causes two characters to be removed, ...
  • 31
3 votes
0 answers
232 views

How to set rulerformat to align left and full width in vim?

I use ruler format like this, set rulerformat=%36(%5l,%-6(%c%V%)\ %f%)%* However, if the filename gets too long, it will be broken. So I like to align left, but It can't be align like statusline %=. ...
  • 41
3 votes
2 answers
196 views

Prevent buffer loads within NERDTree

If I have many buffers opened and, if the cursor (focus) is within NERDTree, when I change the buffer with :bn or :bp, the content of buffer loads within NERDTree. There's a way to, before buffer ...
3 votes
0 answers
2k views

How to recover from swap files correctly on Neovim?

My Mac crashed and was forced to restart. So I opened Terminal, try recovering the file, but struggle to correctly recover the file. Specifically, I tried the following command: nvim ~/.config/nvim/...
  • 527
3 votes
0 answers
119 views

How to emulate vim job out_io buffer with neovim?

I'd like to make a plugin with functionality that is similar to https://github.com/ramele/agrep and grep-edit in emacs. That is get search results from ag or some other tool that supports multiline ...
  • 1,141
2 votes
0 answers
50 views

how do I perform a code action on a visual range in neovim 0.9?

In neovim 0.8, I had the following command mapped vnoremap <leader>a :lua vim.lsp.buf.range_code_action()<cr> which in visual mode, gave me options such as Wrap In Try-Catch/Extract Method ...
  • 123
2 votes
1 answer
57 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 ...
2 votes
1 answer
106 views

How to select a function in neovim using LSP?

I want to select (e.g. to comment/uncomment) entire functions at a time in neovim using the built-in LSP. I do this now by avoiding empty lines in functions so that I can vap to select the entire ...
  • 141
2 votes
1 answer
42 views

How to call incremental forward/reverse search inside function in Neovim?

I'm trying to implement a search function that finds a pattern and jumps to it without overriding the current searched for & highlighted pattern. Specifically, I want to be able to type out the ...
  • 447
2 votes
0 answers
89 views

CTRL-^ work in Vim but not in Neovim

I'm reading Neovim's usr_07.txt. When I start Neovim like neovim t1.txt t2.txt t3.txt, and then issue :next, the shortcut CTRL+^ is supposed to bring me to the previous file (i.e., the alternate file)....
2 votes
0 answers
40 views

Parse files, hidden from the user

I am working on a snippet for C/C++ that can generate switch statements with cases from the types that an enum can have. So far I have some code that can get the type location from the language server....
2 votes
0 answers
417 views

What is the file structure of Neovim?

It seems like Neovim has files in many places. The binary is in /usr/bin/nvim. Inside ~/.config/nvim is init.vim, for declaring plugins, and also directories in ~/.config for storing Neovim plugins, ...
2 votes
1 answer
74 views

Vimwiki overriding normal md highlighting

I love the concept of Vimwiki, but have a problem with it overriding the default md syntax highlighting. The default works well, and I use it regularly to edit md documents to be used with pandoc. ...
2 votes
1 answer
44 views

Where is the text data stored during typing text in insert mode?

I would like to develop a small app in React and Nodejs that sends real-time typed text from my Nodejs/Express server to my React frontend. To do this, I would like to use socket.io. The text data is ...
2 votes
1 answer
939 views

neovim: vim.fn is nil

I have a lua plugins script defining local fn = vim.fn. A couple of lines later it defines local install_path = fn.stdpath('data'). This script is called from my init.vim by lua require('plugins'). ...
2 votes
0 answers
2k views

Neovim nvim-jdtls Error Client 1 quit with exit code 13 and signal 0

i tried setting up my neovim with the nvim-jdtls plugin (https://github.com/mfussenegger/nvim-jdtls) But I always get a Client 1 quit with exit code 13 and signal 0 Error Message. I followed the ...
2 votes
0 answers
814 views

Neovim - How do you call Python from Lua and store the results as a Lua variable?

I am trying to improve a GitHub repository for Neovim called quangnguyen30192/cmp-nvim-ultisnips It's a Lua repository that calls another Vim plugin repository, SirVer/ultisnips , a primarily Python-...
2 votes
0 answers
207 views

How does neovim handle keyboard input?

In classical Vim, keyboard input is handled fairly archaically, and it's why you can't remap say <Ctrl-M> and <Enter> to different keys or commands. This is probably my biggest gripe about ...
  • 21
2 votes
1 answer
191 views

What is the difference between `tag` and `tags` command?

I've recently come across the concept of tags in vim. I run ctags on a file and it generates tags for that file. When I try to access those tags I use the tag command which basically provides a list ...
2 votes
0 answers
449 views

What Neovim GUIs have GUI scrollbars as described in vim under :h gui-scrollbars?

TL;DR I am looking for a Neovim GUI with GUI scrollbars as described in vim under :h gui-scrollbars (accessed on 2021-08-21). What GUI Vim scrollbars are like 2. Scrollbars *gui-...
  • 4,410
2 votes
0 answers
84 views

Neovim rplugin: why does vim.async_call(print, "msg") not echo?

In a traditional :python3 plugin, I can call print("msg") to echo a message. In a remote plugin function, I expect that calling vim.async_call(print, "msg") would do the same thing,...
2 votes
0 answers
409 views

Does vim-easymotion only work in neovim?

I was wondering if the easymotion-overwin was compatible with vim, or does it only works in neovim? I have my .vimrc's keymaps setup like this for easy-motion "----- Easy-Motion ----- map <...
  • 181
2 votes
0 answers
355 views

Cannot get current node tree with treesitter in Lua in nvim

I am trying to get the AST tree to find the node I want. Based on the doc, I should be able to get the tree like this: local parser = vim.treesitter.get_parser(0, vim.o.filetype) print('check ...
2 votes
1 answer
884 views

Remap enter Terminal-normal mode Neovim to something else than Esc

I have remaped enter terminal normal-mode to <Esc> with: tnoremap <Esc> <C-\><C-n> and it does work. But I am using zsh vi-mode, which also requires the use of <Esc> to ...
  • 21
2 votes
0 answers
158 views

Highlight groups stop working after sourcing vimrc

I'm working on a todo plugin for Neovim, using the remote plugin API. I set highlight groups and matching patterns in my script, and then register it with call remote#host#RegisterPlugin. When Neovim ...
  • 121
2 votes
0 answers
329 views

<ESC> does not exit command-line mode. Neovim on tmux on WSL

nvim is not exiting command-line mode when the ESC key is hit. E.g., the key sequence :ff<ESC>ff gives :ffff at the command-line prompt. The expected behavior is that the first :ff be discarded ...
  • 129
2 votes
0 answers
2k views

How to use colored icons for autocomplete menu nvim.coc?

I am using neovim-qt for typescript react development. From last week I am configuring my neovim. I have configured coc.nvim which is giving pretty good autocompletion. I wanted to add icons for ...

1
2 3 4 5
8