Page 1 of 1
'Comment out' Buttons
Posted: Wed Feb 09, 2005 2:42 am
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
Posted: Wed Feb 09, 2005 10:04 am
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.
Posted: Wed Feb 09, 2005 12:14 pm
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?
Posted: Tue Feb 22, 2005 2:51 pm
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.
Posted: Mon Mar 21, 2005 11:06 pm
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
Posted: Fri Mar 25, 2005 2:32 pm
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
Posted: Tue Mar 29, 2005 8:28 pm
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.
Re: 'Comment out' Buttons
Posted: Fri Apr 08, 2005 2:14 pm
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.