Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» 建议:Ctrl + . 注释保持缩进。
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 建议:Ctrl + . 注释保持缩进。
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#1
Post at 2016-6-7 15:09
Profile
|
Blog
|
P.M.
建议:Ctrl + . 注释保持缩进。
目前情况:Ctrl + . 注释代码后,注释符号(即双斜杠//) 总是在每一行的第一例。
建议修改的效果:Ctrl + . 注释代码后,保持每一行代码原来的缩进。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2016-6-9 15:14
Profile
|
Blog
|
P.M.
你的意思是,//不加在行首,而是插入在每行的第一个非空格字符前面?
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#3
Post at 2016-6-10 14:33
Profile
|
Blog
|
P.M.
是啊,不然像现在这样,整体的缩进格局就乱了。。。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2016-6-14 12:06
Profile
|
Blog
|
P.M.
最新每日构建版加了相关选项,可以试用一下?
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#5
Post at 2016-6-14 18:12
Profile
|
Blog
|
P.M.
在xe4里面测试了,还是不行呢,'//'还是加到了行首。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#6
Post at 2016-6-15 05:41
Profile
|
Blog
|
P.M.
选项对话框里提供了三个选项,请问你选择的是哪一个?
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#7
Post at 2016-6-15 14:26
Profile
|
Blog
|
P.M.
请问您说的‘选项对话框’是哪个?
下图红框里面的三个功能我都试过了,但是不知道相应的设置在哪里。谢谢。
https://snag.gy/j6FsE0.jpg
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#8
Post at 2016-6-15 21:25
Profile
|
Blog
|
P.M.
CnPack菜单,编码工具集,设置,对话框中选择“反转代码块注释工具”,点设置按钮。
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#9
Post at 2016-6-15 22:23
Profile
|
Blog
|
P.M.
谢谢,试了,和我之前想的还是不一样,抱歉先前没说清楚,下面给出例子说明:
目前新版效果(用的是第二个选项):
[Copy to clipboard]
CODE:
procedure procA;
begin
//if true then
//begin
//if false then
//begin
//doSomething();
//end;
//end;
end;
理想效果(即,注释符垂直对齐,而右边的代码保持原来的缩进结构):
[Copy to clipboard]
CODE:
procedure procA;
begin
//if true then
//begin
// if false then
// begin
// doSomething();
// end;
//end;
end;
[
本帖最后由 edwinyeah 于 2016-6-15 22:25 编辑
]
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#10
Post at 2016-6-16 12:42
Profile
|
Blog
|
P.M.
哎要这样的话,你使用第一个选项整体注释代码块后,再直接Tab键缩进就行了吧。
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#11
Post at 2016-6-16 14:37
Profile
|
Blog
|
P.M.
刘哥,真的耶!
之前用的是GExperts的注释功能(误以为是CnPack,因为二者都有这个功能),GExperts注释后,相关代码不保持选定状态,用你这招不方便。
现在用cnpack的这个注释功能,再按一次TAB即可,非常方便!谢谢啦。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#12
Post at 2016-6-20 10:23
Profile
|
Blog
|
P.M.
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#13
Post at 2018-6-14 16:22
Profile
|
Blog
|
P.M.
刘哥,进一步的建议请求:
除了“反转代码注释”这个命令本身已有“相关代码保持选定状态”这个功能特性之外,能否给“注释代码”和“反注释代码”这两个命令也加上“相关代码保持选定状态”这个功能?
因为“反转代码注释”命令下面的代码无效:
[Copy to clipboard]
CODE:
// This is a comment
if 1 =1 then
begin
doSomething();
end;
反转注释后,虽然保持选定状态可以让我缩进,但是变成了:
[Copy to clipboard]
CODE:
This is a comment
//if 1 =1 then
//begin
// doSomething();
//end;
而如果给“注释代码”和“反注释代码”这两个命令也加上“相关代码保持选定状态”这个功能,那么不论什么样的代码都能应付了!
谢谢。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#14
Post at 2018-6-14 18:50
Profile
|
Blog
|
P.M.
“注释代码”和“反注释代码”这俩功能,针对已经选中的代码块是整几行的情况,才能和“翻转注释”一样,处理后保持选中状态。
如果选择区域不是整行而是两头有零碎的,则处理完后就不选中了。
edwinyeah
灌水司司长
UID 40580
Digest Posts 0
Credits 343
Posts 129
点点分 343
Reading Access 10
Registered 2008-6-18
Status Offline
#15
Post at 2018-6-15 14:45
Profile
|
Blog
|
P.M.
噢!这下明白了,谢谢!
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-24 23:15
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.009373 second(s), 9 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats