✨ Feat(keymap): don't comment newline when using o key
Normal insert-mode newlines continue comments. Pressing `o` in normal-mode will create a newline without commenting it.
This commit is contained in:
@@ -133,7 +133,6 @@ autocmd('CmdlineLeave', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
autogrp('RootyCustomEvent', { clear = true })
|
autogrp('RootyCustomEvent', { clear = true })
|
||||||
|
|
||||||
autocmd({ 'BufReadPost', 'BufNewFile' }, {
|
autocmd({ 'BufReadPost', 'BufNewFile' }, {
|
||||||
group = 'RootyCustomEvent',
|
group = 'RootyCustomEvent',
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
@@ -145,3 +144,11 @@ autocmd({ 'BufReadPost', 'BufNewFile' }, {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Don't comment next line when using `o`
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = '*',
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.formatoptions:remove({ 'o' })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user