Autoindent isn't automatically applied when creating a new line using Lua API #27329
-
I have a custom keymap that allows me to use the vim.keymap.set("i", "<C-j>", function() vim.cmd(":normal o") end, opts) The problem is that I can't figure out how to also trigger the autoindent feature when I use the custom keymap: no-autoindent.mp4When using autoindent.mp4 |
Beta Was this translation helpful? Give feedback.
Answered by
zeertzjq
Feb 4, 2024
Replies: 1 comment 2 replies
-
You can use this: vim.keymap.set("i", "<C-J>", "<C-O>o", opts) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
anthony-S93
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use this: