Questions tagged [insert-mode]
The mode in Vi and Vim in which you can insert text to the open document.
299 questions
1
vote
1
answer
74
views
How to run colon commands in the main window?
I'm not sure I know the right words to use to ask / search for my question.
In my main Vim window, I can type:
<Esc>!ls
and it will put a directory listing in that place in the window.
I can ...
1
vote
1
answer
232
views
Delete Word before cursor in insert mode regardless of the "insert start" position
In bash readline we can delete word before cursor using ctrl+w
In vim though, this remap works great however there is a small issue that I am trying to get rid of.
Suppose we did the following in vim
...
0
votes
1
answer
67
views
How to avoid "screen blinking" when running command on insert mode?
I want to do insert mode mappings (like inoremap <C-Right> <C-o>W) that play nice with airline plugins, avoiding "screen blinking", like below. Note the annoying text toggling ...
1
vote
1
answer
127
views
Mutt : shortcut to access previous field
I am trying to setup some shortcut keys in mutt which composes email using the vim editor.
On choosing to compose a new message, the user can enter the recipient(s) and the subject field and the ...
1
vote
2
answers
408
views
Vim/Neovim without normal/insert/etc mode
Is it possible to turn vim or neovim to no normal/insert/command/visual mode? Like in micro editor.
I just want to open file for editing and type, for example, ctrl+e for command.
For example, I want ...
2
votes
1
answer
189
views
Insert newline above current line?
Let's assume I am in INSERT mode and my cursor is just after * in the following line.
This is * a line of text.
I would like to know of some shortcut key or a mapping to insert a new line before this ...
1
vote
1
answer
144
views
Syntax aware tabulation in Vim
Suppose, we have the following Perl code:
sub test {
my $a = 1;
if ($a == 0) {
[cursor]
}
In Emacs when we click <tab>, it inserts 2 indentations, indenting it according to the if ...
2
votes
3
answers
193
views
i_<CTRL-Right> to advance WORDs (not words)
In insert mode, I want to move between WORDs (like normal mode's big W), so that I can save keystrokes. Specifically, inoremap ., to go left and inoremap ,. to go right. This way I can avoid changing ...
0
votes
1
answer
80
views
On insert mode letting backspace to work, with but
How, in Lua setting file, do we have Neovim insert mode letting backspace to work wherever cursor is not at start of line, but then at the start of line it must by default to do nothing, as it was.
...
2
votes
1
answer
399
views
Vim: move in the INSERT mode between lines using left/right arrow keys
In Vim while in the INSERT mode, I would like to be able to move between lines using the left and right arrow keys. For example, if the cursor is at the beginning of a line and I press the left arrow ...
2
votes
2
answers
162
views
How can I jump outside the scope of LaTeX delimiters?
I want to define insert mode mappings that will jump outside the scope of any delimiter I'm in (forward/backward). Where "delimiter" is in the broad sense of LaTeX delimiters, so not only {},...
1
vote
1
answer
350
views
Going to insert mode at the end of command with lua function
I am using Neovim and I want to go to insert mode at the end of this command.
vim.cmd([[command! DunB lua run_only_current_file("below") ]])
I have tried | startinsert and | :startinsert.
...
2
votes
3
answers
3k
views
How to force Read-only mode?
I recently learned about view <filename> or [vim_launcher] -R <filename>. While both of these commands are great, they don't actually force Read-only mode, because you can still exit that ...
1
vote
1
answer
616
views
Searching for text while in insert mode of Neovim
I know how to search for text in visual mode in Vim/Neovim. However, I find it unnecessary when I am in insert mode to have to exit it, search and then come back to insert mode.
Is there a way to ...
1
vote
1
answer
83
views
Stop repositioning last line at bottom of window
I've just noticed that if the cursor is at the last line of a file and
I enter insert mode, then the buffer pans so that the cursorline is at the bottom of the [sub]window, as if in response to a zb
...