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

2
votes
1answer
82 views

Does NeoVim really need plugins in 2019?

I've been using Vim with vim-plug, yiang-miao/auto-pairs and youcompleteme for a time now, and I really love it; but a friend recently recommended me NeoVim, and it seems it's more polished since it's ...
0
votes
1answer
34 views

Change saved session's working directory

I have a neovim session saved using :mks which by default saves to a subdirectory in my project ~/project/subdir/Session.vim. I want it to save to ~/project/Session.vim, which I can do by running :cd ...
0
votes
1answer
31 views

Neovim-Qt: environment variable TERM not set

Running :checkhealth in NeoVim-Qt (v0.3.5) I get the following report on terminal: ERROR: command failed: infocmp -L infocmp: environment variable TERM not set How can I set the environment variable ...
4
votes
2answers
153 views

How to make insert mode mapping count as multiple undos?

I have the following mappings: nnoremap # /___<CR>ciw imap # <Esc>:w<CR><Esc># And the following file that I am editing: foo ___ goo ___ hoo ___ The idea is that I start at ...
1
vote
1answer
19 views

How to wrap a command which can handle a text object?

The scenario is that the plugin I use (iron.nvim) has a mapping crt which handle text objects. Ultimately, this mapping is based on a command <Plug>(iron-send-motion). I would like to create a ...
0
votes
0answers
33 views

My cursor is changed after “df” [duplicate]

I have the following to change my cursor from a block into an underline: set guicursor=a:hor20-Cursor Whenever I run df to delete a range, my cursor is changed back to a block. I have to source my ...
2
votes
1answer
49 views

Where can I find color settings used by Vim and NeoVim?

I've been using dotfiles created by other people to setup Vim. Recently I decided to create my own config and investigate what's NeoVim about. I'm using default OSX Terminal.app with zsh shell (I've ...
1
vote
1answer
29 views

How to get rid of inline linting errors?

I ran PlugUpdate recently and somehow all the Ale linter errors started popping up right in the buffer at the end of the line. It used to just put signs on the left side for the problematic line and ...
0
votes
0answers
50 views

How to make vim theme looks exactly as on screenshot

I've tried dozens of different themes but always get wrong coloring. For example: This is how vim-afterglow should look with LaTeX code. This is mine screenshot: This is example for Python. And ...
2
votes
1answer
53 views

why doesn't this autocmd take effect for neovim?

I am writing an autocmd which will warn me if the file opened is not in UTF-8 format. This is what I have got: augroup non_utf8_file autocmd! autocmd BufRead * if &fileencoding != 'utf-8' ...
1
vote
0answers
26 views

Using ! (filter command) just to see the terminal behind vim

I recently started a transition from vim to neovim and one of the things that I noticed that changed is that typing :! doesn't do anything in neovim but in vim it displays the content of the terminal ...
1
vote
2answers
51 views

How can I focus on one vimsplit fullscreen?

Say I've got three splits open with code in, and I suddenly want to make the one I'm in fullscreen, temporarily. How can I do that?
2
votes
1answer
34 views

Difference between searching and substituting pattern matching

I have a string in a JSON file which is repeated with different values for chance. I want to replace all of these blocks by moving the miss chance out of the attack array and into a separate property. ...
0
votes
1answer
83 views

How can I emulate :shell command in Neovim?

There is no :shell command in neovim. :terminal opens a shell without previous output, while :shell contains all the output of the parent shell and all previous shells. Is there any way to emulate :...
1
vote
1answer
38 views

NeoVim: Single-Line Comments Also Format the Next Line [duplicate]

So, I started using NeoVim a little while ago and discovered a rather annoying quirk when using C++-style single-line comments // in source code of any language. Specifically, when you create a new ...
0
votes
0answers
33 views

Automatically inserting predefined strings to terminal buffer

When I compile any code file in vim, I use a specific mapping to open the terminal buffer and get into insert mode, but this requires me to be aware of the (potentially long and complicated) file name....
1
vote
3answers
62 views

How to setup spelling for same words in different languages?

I use vim for prose and and code, and when it comes to prose I use spelling a lot to help me out. I have it set up and already, and I'm already working with z=, zg, zw, [s , and ]s to work with ...
0
votes
0answers
41 views

Ctrlp and neovim

I recently switched to neovim. I was using CtrlP plugin. But whenever I fire it up on neovim, it starts spitting out weird symbols which makes my tmux glitch. I have added the following to my init.vim ...
1
vote
2answers
103 views

neovim key remap specific to terminal buffer

I have been using nvim terminal mode to learn python and I want to have Ctrl-C break the python script from the terminal window even when I am not in insert mode. However, I also want Ctrl-C in my ...
1
vote
1answer
32 views

Is it possible to obtain status line strings?

I am developing a neovim client using RPC, and trying to get all status line texts shown in below figure. Are there any ways to get them? I have already tried using execute function and the ...
0
votes
0answers
68 views

UltiSnips: snippets not expanding

This is a noob question. I just installed UltiSnip to make use of the TeX snippets. Here is the relevant part of my init.vim: " Specify a directory for plugins (powered by vim-plug) call plug#begin('~...
2
votes
1answer
97 views

Neovim spellcheck: all the words highlighted as misspelled

I've been trying to set up spell checking in neovim. init.vim: setlocal spell spelllang=ru_ru First time it downloaded ru.utf-8.spl and ru.utf-8.sug, just as it probably should. Unfortunately, as ...
0
votes
1answer
24 views

nnoremap conflicts with i_CTRL-O

I added two normal mode mappings so that the cursor doesn't move when changing case nnoremap gUiw m0gUiw`0 nnoremap guiw m0guiw`0 Recently I had to uppercase a word and I tried like this: ...
0
votes
1answer
24 views

How to subscribe event by using nvim_subscribe

I am trying to handle events of nvim using nvim_subscribe() API via RPC. For instance, calling nvim_subscribe('CmdLineEnter'). I am not sure the specification of this API exactly, but I imagine that ...
0
votes
0answers
112 views

How to hide terminal buffer without closing it?

I want to make toggleable window with terminal buffer similar to every IDE terminal feature. Currently i have mapped: noremap <F4> :botright 8split term://bash<CR> tnoremap <F4> &...
0
votes
1answer
78 views

How to keep the neovim terminal buffer in the buffer list even after it being hidden

My problem is similar to, if not same as, this issues. But I can't follow what they're talking about. The following steps are necessary to reproduce my problems: :sp :term :wincmd w :wincmd o :ls ...
1
vote
2answers
171 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 ...
1
vote
1answer
49 views

Importing project-specific rc files in Neovim

Vim probably did this by default, whenever I invoke files from a project that has its own .vimrcs it's auto-sourced. Neovim, however, doesn't import vimrcs. How can I make Neovim scan and use project-...
1
vote
0answers
36 views

Sharing a copy register between vim on different machines?

The image below shows two terminals. Both are running vim instances on remote machines (ssh and a serial connection through an UART cable). Vim's on those machines don't have a way to access the ...
1
vote
2answers
43 views

How to test for :terminal support?

I have neovim 0.3.4 installed which means I can run the :terminal command, however, doing :echo has('terminal') shows 0. So, I wonder if there is any other way I can test for its support because all ...
0
votes
1answer
33 views

How to show the left-hand side of insert mode mappings while invoking them in Neovim

Much like what was asked in this question: I want Neovim to show what I type, and keep recognising it as a mapping in progress even if I use Backspace or Delete. This is actually a very useful ...
0
votes
1answer
33 views

How can I make Vimscript check if the current line has a comment?

I want to make a Python ftplugin (but other filetypes will also have this option) where, if the previous line has a comment that starts with #, the next line can be commented via <Shift><CR&...
4
votes
2answers
66 views

Command works in ex mode but not during init (call)

When I run this command in ex mode it works without a problem: :call deoplete#custom#source('ultisnips', 'rank', 1000) However, when I put it in my vimrc I get an error: Error detected while ...
0
votes
1answer
39 views

Why buffer tab plugin not work with Neovim 0.4

I installed the latest Neovim 0.4 from scratch, install 'vim-plug', then add only 4 lines to my init.vim: call plug#begin('d:/neovim/nvim/plugged') Plug 'ap/vim-buftabline' set hidden call plug#end() ...
0
votes
1answer
148 views

Setting $XDG_CONFIG_HOME

My current nvim is in ~/AppData/Local/ and I want to drag it out just one directory below $HOME. How can I set $XDG_CONFIG_HOME, and can it be done via Neovim?
0
votes
1answer
46 views

vim looks different when i launch it via the terminal

I'm using NVIM 0.2.2. When I launch it from the terminal, the color scheme of the terminal affects it's look. And when I launch it from the search menu, it works just fine What makes it behaves that ...
1
vote
1answer
61 views

Paste mode sometimes inserting “<Paste>”

Sometimes when I paste (via cmd+v) some text into neovim, it inserts <Paste> at the bottom, i.e: This was pasted and I got some bonus letters <Paste> I can't figure where this text comes ...
0
votes
0answers
29 views

How does (neo)vim set $PATH for system(['command'])

When I want to call an external program, I have the option of spawning a shell or not. system('my command') will spawn a shell (executing your .bashrc/etc and all it seems). system(['my command']) ...
3
votes
1answer
71 views

jobstart callback wont assign variable outside of function

I have a job I want to run in the background of vim, and update my status line with the periodic results of that job. I'm able to setup the timer, call the external job and get my response back. I'm ...
1
vote
0answers
132 views

Configure Denite to Open File in New Window

Below is my configuration for denite. When I select a file from the denite buffer, the file is opened in the preview split window rather than a new window. How can I configure denite to open the ...
1
vote
1answer
59 views

Have a buffer show a “state mark”

I'm trying to to have a visible mark depicting the "state" the buffer is at. A "state" is nothing more but a function that sets or unsets some keymapings that should be easily arbitrarily turned on ...
0
votes
0answers
60 views

2-pane layout on vim for writing (with narrowing fuction, goyo, and outlining)

Is it possible to get a layout like this using only vim? Desired functionalities: A) 2 pane layout like VOoM B) Narrowed region of the whole document on 2nd (right) panel with formatted like ...
0
votes
0answers
28 views

How to limit a key binding to a single key

I'm having trouble putting to words what I'm looking for, please mark as duplicate if appropriate I have a key binding that launches a search based on a fuzzy finder (specifically bindings to fzf and ...
0
votes
0answers
70 views

Can not use mouse to switch window and resize window on Windows with cmder

I am using Neovim on Windows with Cmder terminal. Everything works quite well except that it seems that I can not switch windows and resize window using my mouse even though I have set mouse=a in my ...
0
votes
0answers
82 views

<localleader> not working in .tex files, but working for the other filetypes

I use vimtex, latexmk and neovim in order to edit .tex files in Vim, but for some reason my local leader does not work in .tex files, though the leader works and the local leader works for other ...
1
vote
0answers
22 views

Copy/paste across terminals in nvim? [duplicate]

How do you copy/paste a piece of text across different terminals in nvim (neovim)?
0
votes
3answers
158 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 ...
0
votes
0answers
28 views

How to add nvim to launchpad in Ubuntu?

I'd like to add NeoVim to the launchpad in Ubuntu 18.04. When I open nvim in Ubuntu, it just opens a terminal with nvim running in it. If I added it to the favorites (i.e., the lauchpad), only the ...
1
vote
0answers
131 views

Jinja html templates formatting with ALE and Prettier in Vim

I am using NVIM v0.3.2-208-g2841e89 on Ubuntu 16.04 LTS and using ALE as my Linting Engine plugin. I am having issue with formatting for jinja template html files with prettier. The html files which ...
0
votes
3answers
262 views

Start a new terminal instance if window splitting was initiated from a terminal buffer

When I'm in the terminal and I press <C-w>s the screen is split vertically and the terminal buffer is shown twice. Then I have to do :terminal if I want a separate terminal instance. Typing ...