Comments in TextPad edidor

General questions about using TextPad

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

Post Reply
nio123
Posts: 6
Joined: Tue Jun 12, 2007 9:43 am

Comments in TextPad edidor

Post by nio123 »

Hi everybody !

Is there anyone know, if i can make comments in some lines simultaneous,in TextPad edidor ?
(or if i can configure the TextPad edidor with this option? )

thanks

nio123
kitimat
Posts: 45
Joined: Tue Jul 20, 2004 5:44 pm

comment out block of text

Post by kitimat »

i assume you are asking hoq to comment out a block of text in textpad.

try this: ( it assumes that the # is the comment char)

Configure > Block Select Mode - Ctrl+Q,B

Select a block, one column wide, using mouse or keyboard.

Menu > Edit > Fill Block (brings up dialog box)
Fill character: #
Format: Left align
Fill mode: Replace
OK



remember you can't go into block mode is word wrap is on.

there are also some addins on the download page that may help depending on what language you are using

I suspect that a macro containg a regex s&r would also work but you did not specify which programming language you are using
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

If that's what the original poster meant, this will do it:

Select the lines to be commented.
Then Search | Replace...
Find what: ^
Replace with: #

[X] Regular expression

Replace All
nio123
Posts: 6
Joined: Tue Jun 12, 2007 9:43 am

Post by nio123 »

Hi

ben_josephs & kitimat,

and thanks ,

u help me a lot


nio123
nio123
Posts: 6
Joined: Tue Jun 12, 2007 9:43 am

Comments in textpad ->Another question

Post by nio123 »

Hi all :!:

How can i comment out, block of lines with comments simultaneously ? :?:

(i work with vhdl language).

thanks,

nio123
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

You might insert VHDL comment symbols at the beginnings of lines with
Find what: ^
Replace with: --

[X] Regular expression

Replace All
and remove them with
Find what: ^--
Replace with: [nothing]

[X] Regular expression

Replace All
nio123
Posts: 6
Joined: Tue Jun 12, 2007 9:43 am

Post by nio123 »

Hi ben_josephs :D

And thanks again.

nio123
nio123
Posts: 6
Joined: Tue Jun 12, 2007 9:43 am

Post by nio123 »

Hi ben_josephs


May it possible, to make macro, to the opration u told me,
of inserting comments or removing them ?

thanks friend,

nio123
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Yes. I just tried it. Do the instructions in TextPad's help under How to... | Use Keystroke Macros not work for you?
nio123
Posts: 6
Joined: Tue Jun 12, 2007 9:43 am

Macro comment

Post by nio123 »

Hi ben_josephs

And thanks again

nio123
Post Reply