-
Is it possible to keep selected lines highlighted after commenting? |
Beta Was this translation helpful? Give feedback.
Answered by
numToStr
Jan 25, 2023
Replies: 1 comment
-
Yes, by using local U = require('Comment.utils')
require('Comment').setup({
post_hook = function(ctx)
-- Check whether we were in VISUAL mode
if ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
vim.cmd('norm! gv')
end
end,
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Imlimp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, by using
post_hook
.