1. WEE Enhancement Request - Toggle Comments On/Off

I'd like to use Ctrl+m to toggle comments on/off, but I'm sure I could adapt to any other standard keystroke for said functionality.

Can you add this to WEE?

Ctrl+m would simply insert or remove "--" at the beginning of all selected lines.

new topic     » topic index » view message » categorize

2. Re: WEE Enhancement Request - Toggle Comments On/Off

euphoric said...

I'd like to use Ctrl+m to toggle comments on/off, but I'm sure I could adapt to any other standard keystroke for said functionality.

Can you add this to WEE?

Ctrl+m would simply insert or remove "--" at the beginning of all selected lines.

Yes, I can work that in with the next release, possibly by this weekend.

new topic     » goto parent     » topic index » view message » categorize

3. Re: WEE Enhancement Request - Toggle Comments On/Off

euphoric said...

I'd like to use Ctrl+m to toggle comments on/off, but I'm sure I could adapt to any other standard keystroke for said functionality.

The only standard is to be different. smile

  • Geany uses Ctrl+E to toggle comments on or off
  • Notepad++ uses Ctrl+K to comment and Ctrl+Shift+K to uncomment
  • Visual Studio uses Ctrl+K, Ctrl+C to comment and Ctrl+K, Ctrl+U to uncomment
  • Eclipse uses Ctrl+/ to toggle single-line comment and Ctrl+Shift+/ to toggle multi-line comment

Personally, I like Notepad++'s style.

-Greg

new topic     » goto parent     » topic index » view message » categorize

4. Re: WEE Enhancement Request - Toggle Comments On/Off

ghaberek said...
euphoric said...

I'd like to use Ctrl+m to toggle comments on/off, but I'm sure I could adapt to any other standard keystroke for said functionality.

The only standard is to be different. smile

  • Geany uses Ctrl+E to toggle comments on or off
  • Notepad++ uses Ctrl+K to comment and Ctrl+Shift+K to uncomment
  • Visual Studio uses Ctrl+K, Ctrl+C to comment and Ctrl+K, Ctrl+U to uncomment
  • Eclipse uses Ctrl+/ to toggle single-line comment and Ctrl+Shift+/ to toggle multi-line comment

Personally, I like Notepad++'s style.

-Greg

Ctrl+m it is! heheh

I can't believe VS would use Ctrl+C! That's the copy keystroke for every other app in the solar system!

I'd rather just have a toggle key. Throwing a shift in there is just cruel. smile

new topic     » goto parent     » topic index » view message » categorize

5. Re: WEE Enhancement Request - Toggle Comments On/Off

euphoric said...

I can't believe VS would use Ctrl+C! That's the copy keystroke for every other app in the solar system!

It's Ctrl+K then Ctrl+C. Ctrl+K is a macro key for extended options.

-Greg

new topic     » goto parent     » topic index » view message » categorize

6. Re: WEE Enhancement Request - Toggle Comments On/Off

ghaberek said...
euphoric said...

I can't believe VS would use Ctrl+C! That's the copy keystroke for every other app in the solar system!

It's Ctrl+K then Ctrl+C. Ctrl+K is a macro key for extended options.

-Greg

OooOoOoh. That sounds horrible. grin

new topic     » goto parent     » topic index » view message » categorize

7. Re: WEE Enhancement Request - Toggle Comments On/Off

If you look at CK's version of EE editor

EE has this comment feature

holding down the control key and pressing the minus key

comments out the ( selected ) high lighted lines.

If the lines are commented out then doing this will remove the comments

new topic     » goto parent     » topic index » view message » categorize

8. Re: WEE Enhancement Request - Toggle Comments On/Off

euphoric said...

OooOoOoh. That sounds horrible. grin

It does get tedious. But, what else are you going to do to give hundreds of commands a keyboard shortcut?

This is just a list of the Ctrl+K shortcuts found in the Edit menu. There are also a whole slew of Ctrl+M shortcuts.

Command Shortcut
Edit.ClearBookmarks Ctrl+K, Ctrl+L
Edit.CommentSelection Ctrl+K, Ctrl+C
Edit.CompleteWord Ctrl+K, Ctrl+W
Edit.DeleteHorizontalWhiteSpace Ctrl+K, Ctrl+\
Edit.FormatDocument Ctrl+K, Ctrl+D
Edit.FormatSelection Ctrl+K, Ctrl+F
Edit.GenerateMethod Ctrl+K, Ctrl+M
Edit.InsertSnippit Ctrl+K, Ctrl+X
Edit.ListMembers Ctrl+K, Ctrl+L
Edit.NextBookmark Ctrl+K, Ctrl+N
Edit.ParameterInfo Ctrl+K, Ctrl+P
Edit.PreviousBookmark Ctrl+K, Ctrl+P
Edit.QuickInfo Ctrl+K, Ctrl+I
Edit.SurroundWith Ctrl+K, Ctrl+S
Edit.SwapAnchor Ctrl+K, Ctrl+A
Edit.ToggleBookmark Ctrl+K, Ctrl+K
Edit.ToggleTaskListShortcut Ctrl+K, Ctrl+H
Edit.UncommentSelection Ctrl+K, Ctrl+U

Luckily I have been able to avoid Visual Studio a lot lately. smile

-Greg

new topic     » goto parent     » topic index » view message » categorize

9. Re: WEE Enhancement Request - Toggle Comments On/Off

BRyan said...

If you look at CK's version of EE editor

EE has this comment feature

holding down the control key and pressing the minus key

comments out the ( selected ) high lighted lines.

I would think that Ctrl+- and Ctrl+= (the plus key) would toggle code folding at the current line (if applicable).

-Greg

new topic     » goto parent     » topic index » view message » categorize

10. Re: WEE Enhancement Request - Toggle Comments On/Off

ghaberek said...

I would think that Ctrl+- and Ctrl+= (the plus key) would toggle code folding at the current line (if applicable).

Edita uses <Ctrl -> and Ctrl +> to fold and unfold, and <Ctrl >> and <Ctrl <> to comment and uncomment. (It may really be/I may really mean <Ctrl ,> and Ctrl .> for the latter two, no Shift needed anyway.)

The problem with a toggle is that it has to decide which it is doing somehow, so if some block you have selected starts with a "real" comment (as in -- this is a comment) then it will remove comments which is likely to be the opposite of what was really wanted. Maybe it is just me, but if I have say

-- 
-- Preload the grinch-blocks 
-- 
EnterCriticalSection() 
Blockify(LoadGrinches()) 
LeaveCriticalSection() 

then I often want to (visually) remove/replace both the code and comments together as one.

Pete

new topic     » goto parent     » topic index » view message » categorize

11. Re: WEE Enhancement Request - Toggle Comments On/Off

FWIW, and just to add to the discussion, Crimson Editor uses Ctrl+M to comment, and Ctrl+Shift+M to uncomment. Doesn't really matter to me which key combination is used.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu