1 vote
Accepted

How can I match a regexp containing newlines?

I would try: :execute 'match PrompterCompletion /' . substitute(g:last_completion_text, "[\n\<C-m>]", '\\n', 'g') . '/'
Vivian De Smedt's user avatar
1 vote
Accepted

Neovim paste without overwriting register w/ Lua

I believe you should do: vim.api.nvim_set_keymap('v', 'p', 'pgvy', { noremap = true }) The first argument is the mode: n for Normal (equivalent to nnoremap) v for Visual (equivalent to vnoremap) ...
Vivian De Smedt's user avatar
1 vote

What are the escaping rules of command arguments?

What are the rules that :file arguments are escaped? The argument to :file is undergoing expand() function. expand() expands wildcards and all special keywords. All special characters % # <, ...
KamilCuk's user avatar
  • 265
1 vote

How to detect IntelliJ/IdeaVim in vimrc?

Since IdeaVim 1.8.0 you can use the following condition: has("ide"). This works because IdeaVim supports VimScript for several years since 1.7.0.
Vladimir Parfinenko's user avatar

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