3 votes
Accepted

Edit multiple lines and insert

The answer is: after selecting in visual mode, use I to insert before the selection, and use A to insert after it. Thanks a lot @Christian Brabandt!
cheersmate's user avatar
3 votes
Accepted

Cursor position 'o' and 'O' insert command with count number

Counting is not fun, so an immediate improvement would be to use :help '[ instead of 4k. I am not sure if you can do better without some kind of mapping: :nnoremap gO O<Esc>'[i where gO does ...
romainl's user avatar
  • 40.7k
2 votes

Stop repositioning last line at bottom of window

The cause of the problem is :set scrolloff=9999, which one might use during searches to keep the cursor line as the middle row of the [sub]window. From the help documentation, this is expected ...
user2153235's user avatar
2 votes

How to enter insert mode when entering Neovim terminal pane?

A lot of answers in this thread do not support reopening terminal buffer back. This autocmd will always enter terminal mode upon opening the terminal buffer. In Lua: vim.api.nvim_create_autocmd({ &...
ivanjermakov's user avatar
2 votes
Accepted

How can I jump outside the scope of LaTeX delimiters?

You can use VimTeX for this, but it does require that we use some of the api's that users generally don't know. Here's a Lua implementation that seems to work well: vim.keymap.set("i", "...
Karl Yngve Lervåg's user avatar
1 vote

How can I jump outside the scope of LaTeX delimiters?

I would do: inoremap <Tab> <Esc>/[\])}$]<CR>a This mapping: Switch to Normal mode <Esc> Search for a closing brace (), }, ]) or a $ /[\])}$] Switch back to insert mode a But ...
Vivian De Smedt's user avatar
1 vote
Accepted

Searching for text while in insert mode of Neovim

While is insert mode you can use the Ctrl o to escape for one action and automatically come back to insert mode right after. Ctrl o/fooEnter move the cursor to the next occurrence of foo but stay in ...
Vivian De Smedt's user avatar
1 vote

Remove the insert delay after entering insert in a read-only file

Below is an excerpt from my ~/.vimrc that approaches the OP's issue a bit differently. I didn't want to lose the warning message, which I find rather useful, but the hardcoded delay has simply become ...
dsimic's user avatar
  • 217
1 vote
Accepted

How does <cword> work in insert mode?

<cword> is mostly a command-line mode thing, not an insert mode thing. I don't think it is reliable in this context. Here is how I would approach the initial problem: augroup Foo autocmd! ...
romainl's user avatar
  • 40.7k
1 vote

Neovim how to keep the diagnostic message in insert mode?

Try using this config. vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( vim.lsp.diagnostic.on_publish_diagnostics, { -- delay update diagnostics update_in_insert ...
jamesblackshaw22's user avatar

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