'Comment out' Buttons

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
kefernandez
Posts: 1
Joined: Wed Feb 09, 2005 2:36 am

'Comment out' Buttons

Post by kefernandez »

It would be nice to have two new buttons at the top that let someone comment out code and then uncomment code. The buttons could look similar to the 'undo'/'redo' buttons already present, or even the same buttons in Visual Studio.net.

Maybe the buttons could be coded to insert a '//' at the beginning of any lines that are highlighted?

Just a thought. Excellent application by the way!

Kirk
User avatar
nyugi
Posts: 21
Joined: Mon Jun 16, 2003 7:52 am
Location: Kecskemét, Hungary

Post by nyugi »

Good idea, but TP is a text editor, not an IDE.
However if the commenting feature would be added, I think there should be 4 functions:
  • comment/uncomment selection or the line where the cursor resides with line comment
  • comment/uncomment selection or the line where the cursor resides with block comment
The functions should use the Syntax definition file's CommentStart, CommentEnd and SingleComment for commenting, and Comment* and SingleComment* for uncommenting.
csalsa
Posts: 20
Joined: Mon Jul 14, 2003 1:36 am

Post by csalsa »

nyugi wrote:Good idea, but TP is a text editor, not an IDE
Just curious. But does anyone know what the profile is of users for Textpad? Just thinking out loud.

Like how many people use Textpad for what reasons and for what features? Though Textpad is a text editor, what is it being used for and how is it being used?

Anyone like to comment?
vwamenel
Posts: 6
Joined: Tue Jul 13, 2004 12:22 pm

Post by vwamenel »

I use TextPad mainly for coding in C++, printing guitar tabs, writing LaTeX files, and viewing any text file (or sometimes binary files).

I have had commenting and uncommenting for a group of lines in a selection coded by macros (for Latex with '%' and for C++ with '//'). You just have to record a macro.
SamuelReynolds
Posts: 9
Joined: Tue Dec 28, 2004 10:55 pm
Location: Colorado
Contact:

Post by SamuelReynolds »

I use it for editing C++ and Python source files, Windows batch files, Unix shell scripts, HTML files, and plain old text files. It's also my default application for viewing/editing .txt files.

I have defined macros (using regex substitution) for un/commenting Python and shell files (#) and C++ files (//). The real hassle is that to have both installed I have to either remember different "shortcuts" depending on what language I'm editing (not likely) or change the shortcuts manually when I change files (fat chance).

There is another discussion thread about macros, though.

- Sam
User avatar
nyugi
Posts: 21
Joined: Mon Jun 16, 2003 7:52 am
Location: Kecskemét, Hungary

Post by nyugi »

csalsa wrote:Just curious. But does anyone know what the profile is of users for Textpad? Just thinking out loud.

Like how many people use Textpad for what reasons and for what features? Though Textpad is a text editor, what is it being used for and how is it being used?

Anyone like to comment?
I use it as THE editor. For anything and for everything. Also as the editor in Total Commander.

Anyway, I think you should open a new topic for this question!

Nyugi
briankiser
Posts: 11
Joined: Thu Aug 14, 2003 6:11 pm
Location: Frankfort, Kentucky
Contact:

Post by briankiser »

csalsa wrote: Just curious. But does anyone know what the profile is of users for Textpad? Just thinking out loud.

Like how many people use Textpad for what reasons and for what features? Though Textpad is a text editor, what is it being used for and how is it being used?

Anyone like to comment?
I use my programming IDE for programming. I use Textpad 98% of the time for editing text files (all types), however... I am taking grad classes and occasionally use Textpad for languages that don't provide a decent IDE.
User avatar
Drxenos
Posts: 209
Joined: Mon Jul 07, 2003 8:38 pm

Re: 'Comment out' Buttons

Post by Drxenos »

kefernandez wrote:It would be nice to have two new buttons at the top that let someone comment out code and then uncomment code. The buttons could look similar to the 'undo'/'redo' buttons already present, or even the same buttons in Visual Studio.net.

Maybe the buttons could be coded to insert a '//' at the beginning of any lines that are highlighted?

Just a thought. Excellent application by the way!

Kirk
I have macros setup to do this. I have macros defined for C, C++, Ada, and scripts (or any other that uses # as the comment starter such as makefiles or Perl). They will comment out or uncomment the selected block of code. I also have ones that will sandwich the block inside a #if 0/endif block.
Post Reply