You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Is possible to insert a line break where the cursor is in Vim without entering into insert mode?
Sometimes, I might want to type more code.I press I into insert mode, press Enter to insert a newline character, and then I start typing code
I've been doing this a while, but there's surely a better way to do it?
Describe the solution you'd like
After adding a new line after the current cursor, split the current line, similar to "J" will merge multiple lines of code without entering insert mode!
Describe alternatives you've considered
Map keys like Vimrc
Additional context
Is there a similar (or relatively short) one-key command that splits a line at a given cursor position? Similar problem links
The text was updated successfully, but these errors were encountered:
Maybe this is what you've already considered but it does work.
This assigns +f (change that to be whatever you like) to do what you're looking for. If you don't want to enter insert mode add , "" to the after property.
Add this to your settings.json:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [ "", "f" ],
"after": ["i", ""]
}
],
@liby I'm glad you got what I was trying to say I just realized looking back that parts of my comment were filtered out.
f is used to find a character in the line you're in (e.g. f-m finds the next "m" in the current line). You might still want to use that.
Maybe even better than using "f" something like this could work: "vim.normalModeKeyBindingsNonRecursive": [{ "before": ["<leader>", "i"], "after": ["i", "<Enter>", "Esc"] }]
Great, thank you.I learned something new. @vernvandamn
China is particular about drawing inferences from one example,The ideas you've provided have helped me a lot.
Is your feature request related to a problem? Please describe.
Is possible to insert a line break where the cursor is in Vim without entering into insert mode?
Sometimes, I might want to type more code.I press I into insert mode, press Enter to insert a newline character, and then I start typing code
I've been doing this a while, but there's surely a better way to do it?
Describe the solution you'd like
After adding a new line after the current cursor, split the current line, similar to "J" will merge multiple lines of code without entering insert mode!
Describe alternatives you've considered
Map keys like Vimrc
Additional context
Is there a similar (or relatively short) one-key command that splits a line at a given cursor position?
Similar problem links
The text was updated successfully, but these errors were encountered: