Selection block comment

Hello,

It strikes me as somewhat odd the decision to not provide quick access to the possibility of commenting a block of selected code. There's not even an option for this anywhere. I dealt with the problem by defining a new Surround With entry.

Just perhaps suggesting that you consider the possibility of making this option readily available at top level on the right-click menu.

Selecting a block of code and commenting it seems to me such a common thing, it would be great if access to it was almost mechanical.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I just retested this.  Surround with can be configured to create a block comment.  You may just have just gotten confused by the meaning of the "Surround with" checkbox on the aliases dialog, or you did not realize that surround with was configured through aliases in the first place.  Unfortunately, it is't blatantly obvious.

To create a block comment surround with alias.

1) Go to Tools > Options > File Extension Setup...
2) Select the file extension to customize, for example, "c" for C/C++
3) Switch to the General tab, and click on "Aliases..."
4) Check the "Surround with" check box to customize surround aliases
5) Click "New...", type in the name for the comment alias
6) Fill in the following for the comment text.
Code: [Select]
/*
%\m sur_text%
*/
7) Click OK when done

Of course, a more direct way to configure block comments is to go to "Document" > "Comment Setup...", and configure your block and line comment preferences.  Then you can use "Document" > "Comment Block" or "Comment Line" to comment out a block you have selected.

Let us know what works best for you.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In this case you should consider to use the mentioned BlockComment.e module.
Load it 'Macro->Load Module' and add the BlockComment command to your context menu / shortcut.

This command toggles between comment / uncomment the current selection or curr. line if nth. is selected.
You may easily adopt it to support more/other file extensions.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@HS2 --
Code: [Select]
( %\m sur_text% )
@Mario -- The commands are "box" for block comments, and "comment" for line comments.
(晕!I really don't like the way these guys doing things. Why not call it "block comment"? )

====
http://community.slickedit.com/index.php?topic=696.0


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值