New answers tagged

0

this fix worked for me so far but I'm not too happy about it b/c it still shows the intermediary output for a second then it shows the results, I'd rather it jumped straight to the results instead. " bind K to grep word under cursor nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR><ENTER>


-1

use this: :split | terminal :vsplit | terminal Or you can use the shorter :vs | te or :vs +te. and you can assign maps for that like: nmap <C-S-P> :split | terminal <CR> this rocks! author: https://github.com/neovim/neovim/issues/5073#issuecomment-233172421


0

@LucHermitte provided the answer I was looking for. Quickcheck has a filetype = qf. Thank you! -E


0

It is likely that you are reading the wrong tutorial since you are using Windows, but your tutorial are apparently meant for Linux/macOS users. The definitive answer: the neovim config is named init.vim and its location varies based on the operating system you use. You can use command :echo stdpath('config') inside Neovim to find this directory. If this ...


0

The :echoerr test doesn't really mean anything; :echoerr just echo's what you type (no actual checking anything) with error highlighting. Probably the simplest thing do to (assuming you're on windows) is launch neovim and type :edit ~/AppData/Local/nvim/init.vim--you might have to create the nvim directory (it looks like the rest is already there). I don't ...


0

Regarding copy-paste, in Linux adding, set clipboard=unnamedplus in init.vim makes neovim use the system's clipboard. You could also try, set clipboard=unnamed


1

Those are trailing whitespaces highlighted as error. Most probably they are from vim-polyglot plugin: https://github.com/sheerun/vim-polyglot/blob/4af1321588c7dcb718022226cb27ec325973c2f0/syntax/python.vim#L160 To "fix" it: Either remove those spaces from the file Or add let g:python_highlight_space_errors = 0 to your config.


1

Sadly, no, it is not possible. If you look at :help windows-intro, the following (among other) is said: A buffer is the in-memory text of a file. A window is a viewport on a buffer. ...


2

I've done something similar before. I was learning Vim's fold commands. I just stuffed my cheat sheet in a string that separated each line with a comma... let g:foldcmds = split("zf (Plus a motion) Operator to create a fold.,zF Create a fold for [count] lines. Works like zf.,zd Delete one fold at the cursor.,zD Delete folds recursively at the ...


0

When you run a command in a terminal (such as what termopen() does), the program assumes it's running in an interactive environment with an user connected to a terminal emulation program. Many programs will use that fact to decide whether to use interactive features such as colorizing the output. Terminal emulation programs implement colors and attributes ...


3

Is there a reason you open each file in a different tab with -p? The standard way to open multiple files is to open them in different buffers. See this answer for more about buffers vs windows vs tabs. You can cycle through the buffer displayed in the top window with :bnext and similar. The workflow I would suggest to achieve what you want would be ...


1

You could open the terminal in a new tab page (:tab terminal) and then use :tabnext / :tabprevious to switch between them.


3

You can use any of the popup_* functions that open popups with a buffer number, so, let bufnr = bufadd(expand('<cfile>')) let popup_id = popup_create (bufnr, {})


1

Option 1 (not in Gvim): Use CTRL-Z to suspend Vim. That will give you Vim's parent shell. To go back to Vim, enter fg in the command line. Option 2: Spawn a terminal in a Vim window with :ter (or :terminal). Now, go back to the original window with CTRL-W CTRL-W and press CTRL-W _ to maximize its height. Note that the terminal window will still occupy one ...


0

It seems that when saving, Vim deletes the file and replaces it with a new one with the same attributes, meaning that the previous pointer is no longer valid. Setting this in vim seems to fix the issue : :set backupcopy=yes


0

filetype is a buffer-local option, so you can access it with: vim.bo.filetype From :h lua-vim-options: From Lua you can work with editor |options| by reading and setting items in these Lua tables: vim.w ... vim.bo *vim.bo* Get or set buffer-scoped |local-options|. Invalid key is an error. ...


3

The [..] form is known as a collection (:h /[]) and can contain a sequence of characters and/or one or more ranges of characters, separated with -. It will match any single character that is contained in the sequence/range(s). You can, of course, also match the inverse with ^. In :h white-space you'll find a collection equivalent to \w: \w word character: ...


1

coc#util#float_scroll has been replaced by coc#float#scroll() The example keymapping has been given in the documentation. if has('nvim-0.4.3') || has('patch-8.2.0750') nnoremap <nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>" nnoremap <nowait><expr> <C-b> coc#...


Top 50 recent answers are included