This is the best comment plugin for me. nvim-comment and kommentary still need improvement. The only missing feature in this plugin is left aligned commenting. Some code formater will align comments. For example, python format black will turn
into
lua's format lua-format will turn
--if a == 1 then
--a = 2
--a = 2
--end
into
-- if a == 1 then
-- a = 2
-- a = 2
-- end
This makes coding tough, and left aligned commenting can avoid this issue. Both nvim-comment and kommentary choose left aligned commenting. and nerdcommenter binds <leader>cl to it.
Also, when <leader>cl is used to uncomment, various spacing handling should be skiped.
This is the best comment plugin for me.
nvim-commentandkommentarystill need improvement. The only missing feature in this plugin is left aligned commenting. Some code formater will align comments. For example, python formatblackwill turninto
lua's format
lua-formatwill turninto
This makes coding tough, and left aligned commenting can avoid this issue. Both
nvim-commentandkommentarychoose left aligned commenting. andnerdcommenterbinds<leader>clto it.Also, when
<leader>clis used to uncomment, various spacing handling should be skiped.