七月份能种什么菜
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Results tagged with insert-mode
Search options answers only
not deleted
user 18609
百度 同时,2017年全国商品房销售额万亿元,同比增长%,商品房销售面积亿平方米,同比增长%,再创新高。
The mode in Vi and Vim in which you can insert text to the open document.
3
votes
Accepted
How can I use `ci'` to change the N'th occurrence of single-quoted text in a line?
Plug-in wellle/targets.vim implements this feature, through an in' text-object (n for "next".) You can use it with a count, so you can use c3in' or 3cin' to change inside the third next single quoted …
1
vote
Accepted
line-completion based on non-initial substring
You can use a user defined complete function to implement this kind of custom completion.
See :help complete-function for how to write such a function.
For example, the function below will use the beg …
2
votes
Automate breaking of history in insert mode
See :help ins-special-special, that section has some specific examples on using inoremap to trigger <C-G>u automatically for specific keystrokes such as backspace or newline.
An example for using …
2
votes
How can I stop Vim from inserting keypresses into the document unless the document is visible?
There doesn't seem to be a good way around what you're looking for.
The behavior is clearly documented, in quite some detail, in :help press-enter.
In particular:
Press : or any other Normal mod …
5
votes
Accepted
Is it possible to supply arguments to inoremap?
TL;DR: Yes, you can find simple ways to pass arguments to mappings (in particular inoremap), but they tend to be somewhat awkward or limited in some ways.
For the particular case you mentioned, using …
1
vote
Accepted
Map hex character
The documentation explicitly recommends using the maximum number of digits. See :help i_CTRL-V_digit:
Normally you would type the maximum number of characters. Thus to enter a
space (value 32) …
4
votes
Accepted
Call a function after inserting a newline
The InsertCharPre event doesn't trigger for characters such as <Enter> or <Tab>.
Instead, use an insert-mode mapping to call a function after pressing <Enter>:
inoremap <CR> <CR><C-O>:call MyFunc()< …
2
votes
Accepted
How to insert on a newline, pushing everything after the cursor down with it
You can accomplish this task with i (to enter Insert mode) followed by Enter, which will break the line taking the part starting at the character under the cursor to the next line. This sequence will …
3
votes
Accepted
How to yank the filename of specific buffer?
One way to accomplish this is to use the expression register = together with the bufname() function.
In Insert mode, you can enter the following sequence: Ctrl+R, =, bufname(1), Enter, which will inse …
7
votes
Accepted
Saving file from INSERT mode
Yes, just use the <C-O> keystroke to temporarily leave insert mode for a single command. You can then run :w<CR> to write the file and you'll be back to insert mode.
You can use that to create a mapp …
2
votes
Accepted
vimtex imap not working
Please note that the `a mapping is using vimtex#imaps#wrap_math(), which only expands to the right hand side when typed in a math context. (See the code in vimtex.)
So, this mapping will only expand …
2
votes
Accepted
How to backward-kill-word in Vim insert mode like zsh?
One option is instead of trying to bind a key combination to this action, just use the default key binding for it, which is Ctrl+W.
See :help i_CTRL-W.
This same key binding should be available by def …
1
vote
Accepted
Why do arrow keys behave differently in insert mode than in other modes?
So the issue is that the mapping for <Esc> is interfering with other mappings. Since most special keys generate sequences that start with an ESC character (which typically shows up as ^[), the mapping …
2
votes
Accepted
Auto pairing using strings instead of characters
Since you're looking at pairing open/close tags across multiple lines (enclosing a block) and in your case it makes sense to insert the closing tag when breaking the line, my suggestion is to add a ma …
3
votes
How to loop backwards through getline
You can use the range() function, which accepts a second and third optional arguments and can take a negative stride of -1 to iterate backwards:
function! CustomSearch()
let currentLine = getline(" …