Re: [code] [textadept] Toggle Block Comment

From: Robert Gieseke <rob.g.att.web.de>
Date: Mon, 02 Sep 2013 14:04:52 +0200

Hi,

Am 9/2/13 1:26 PM, schrieb A.M. Genaev:
> Toggle Block Comment key (Ctrl+/) works fine but there is a problem when block
> contains commented lines.
>
> How may i to change behaviour of Ctrl+/ to comment commented lines
> additionally? And to add some key (for example Ctrl+Shift+/) to uncomment
> block?

in the block_comment function in 'editing.lua' is an if block where the
first removes comments and the else block adds a comment prefix/suffix
if none exists. You could take this function as a starting point,
turning it into two functions that have only one of these options.

Cheers,
Robert

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 02 Sep 2013 - 08:04:52 EDT

This archive was generated by hypermail 2.2.0 : Tue 03 Sep 2013 - 06:41:37 EDT