The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

5

I don't use fzf and use Vim instead of neovim. So I couldn't reproduce your scenario. Also I was not able to reproduce what @dedowsdi described in his comment.(See end of answer.) But some general stuff around autocmd and feedkeys: Assume we open Vim with three new files in split windows: vim -O a.txt b.txt c.txt Vim will open with three windows like ...


5

As you can read from :h 'termguicolors': 'termguicolors' 'tgc' boolean (default off) global Enables 24-bit RGB color in the TUI. Uses "gui" :highlight attributes instead of "cterm" attributes. So your highlighting command can not work since it doesn't provide a guifg attribute. I think the following should do the trick: highlight ...


4

has('terminal') is for Vim only. In Neovim this feature is always present, and so checking it is not supported. :h feature-compile Nvim always includes ALL features, in contrast to Vim (which ships with various combinations of 100+ optional features). Think of it as a leaner version of Vim's "HUGE" build. This reduces surface area for bugs, and removes a ...


4

Here's another way to do it, all within fugitive. I believe some of this is new with the 3.0 release on Aug 20, 2019. Someone had created a "What's New?" video, which I sadly can't find now. The :Gstatus command received a lot of attention. In the :Gstatus window, you can use these subcommands. There are many others, but these serve me well. <C-N> or ...


2

It works for me in Vim (8.1.2044). Anyway, I would recommend to create the file ~/.config/nvim/after/syntax/c.vim to extend the C highlighting. syn match Parens /[(){}]/ syn match Bracks /[[\]]/ hi Parens term=underline ctermfg=11 guifg=Yellow hi Bracks term=underline ctermfg=11 guifg=Yellow Adjust hi ... to your liking. For working with syntax and ...


1

Just to add to ipatch answer, which is the correct answer, if you have a slightly different setup from Vim you might need to adapt the path. For example, on Windows, rather than using the default configuration with: $HOME +--.vimrc +--.vim I am using: $HOME +--vimfiles +--vimrc (The reasons is that is it easier to put a single ...


1

I don't have term_sendkeys() in my neovim instance, so I'll use chandsend() in my example. Also, the i is unnecessary, since this function can't put you into insert mode. Now, regarding your problem. "\<Up>" does indeed have some unexpected behavior inside double quotes. But, I managed to work around it like this: Open vim preemptively to not get ...


1

The issue you're having is that your mappings are non-recursive, so they won't trigger other mappings (such as the ones from vim-unimpaired), only built-in key mappings. In order to fix that, use nmap instead of nnoremap for the { mapping: nmap { [ But note that you'll get into trouble if you keep the two mappings, since then it will go back to expanding ...


1

Ralf had the correct intuition regarding the other parameter gvimargs. This does not work with nvim-qt. If you to pass argument from "nvim-qt" to the neovim implementation you have to separate them by a double dash. This is specific to nvim-qt, nvim in the terminal works both with and without double dash. I ended up putting in my _vrapperrc set gvimargs=...


1

First off, you might like to look into any of the many plugins that incorporate a REPL into Vim (vim-slime is the one I use). They don't do exactly what you're asking, but they do something very similar and are far more flexible. If you want your exact behaviour, though, then here's a proof of concept that shows how you can implement it: augroup ...


1

should I base this setup upon neovim or vim 8? If you don't have any problems with Vim, there's no need to switch to Neovim. In particular, Vim's terminal support is very decent. Open new splits with terminal similar to tmux (each split is a separate terminal) Yes, it's trivial. In fact, it's hard to avoid this. Ability to go into netrw from terminal ...


1

AFAIK, there's no "good" way to do it, but there is a "hacky" way. Suppose you want <c-w><c-l> combination to clear vim internal buffer in both normal and terminal(insert) modes. The mappings in vimrc would look like this: nmap <c-w><c-l> :set scrollback=1 \| sleep 100m \| set scrollback=10000<cr> tmap <c-w><c-l> &...


1

Both clear and Ctrl+l work for me using Neovim and bash. Would have asked you to try it in a comment before posting as an answer but I don't have enough rep.


1

Have a look at :help :!. It says: The command runs in a non-interactive shell connected to a pipe (not a terminal). Use :terminal to run an interactive shell connected to a terminal. As top requires a terminal, it can't be run this way. Running :!top in Vim works as expected, so :! seems to be implemented differently in neovim.


Only top voted, non community-wiki answers of a minimum length are eligible