zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
2.56k stars 179 forks source link

快捷键注释添加空格 #711

Closed auqhjjqdo closed 9 months ago

auqhjjqdo commented 11 months ago

现在使用ctrl+/给文本添加注释时,注释符号后面直接是注释文本,但其他IDE都是在注释符号后加上了空格,然后才是注释文本,notepad2的使用习惯有点差别,希望能加上该功能

zufuliu commented 11 months ago

The shortcut is normally used to comment out code block, adding space seems has no benefit, Visual Studio, Android Studio and Eclipse does not add space. We can add code to remove the extra space on removing comment marker, also current code has bug on removing comment marker that requires space.

auqhjjqdo commented 11 months ago

我常用Visual Studio Code和PyCharm编写代码,它们在注释代码时都会在注释符号后面添加空格,但我需要临时在notepad2中添加注释时还要额外添加空格以做到代码风格统一,这令人困扰 db079ede-4a39-4b40-a5b7-35de6ec43bc6 1e51e147-839a-4661-bd63-b37569f67215

zufuliu commented 11 months ago

Implemented by 0dc02bed43fef47e9eb270c77ee6b08e80b4200f, please test latest builds from https://github.com/zufuliu/notepad2/actions.

auqhjjqdo commented 11 months ago

我已经测试了该版本,注释后的空格能正常添加,十分感谢

zufuliu commented 11 months ago

baf1cc1bfc95fa633bcfca5fbae88d3d794df4a6 added option "Insert space after comment marker on toggle line comment." on Auto Completion Settings dialog. Auto Completion Settings