[OS X TeX] TeXShop: a way to automate terminating each line in a block with a comment symbol

Murray Eisenberg murrayeisenberg at gmail.com
Mon May 18 15:54:56 EDT 2020


Perfect! thank you.

> On 18 May2020, at 2:58 PM, Martin Costabel <costabel at wanadoo.fr> wrote:
> 
> In Luis Sequeira's method you can easily remove trailing blanks. Just write
> " *$" (without quotes) instead of "$" (without quotes) in the search box.
> 
> -- 
> Martin
> 
> On 17/05/20 21:36, Murray Eisenberg wrote:
>> It’s worth saying three things for this procedure:
>> 
>> (a) This method is possible only when using the OgreKit Find Panel.
>> 
>> (b) It does not work as I’d expect if there are trailing blanks in one
>> of the block’s lines, as it leaves those unwanted blanks there.
>> 
>> (c) [of course] one also has to check the “Selection” option of the
>> Scope section in the OgreKit Find Panel.
>> 
>> ** It would still be very nice to have a TeXShop menu items, or at least
>> a macro, to do this operation.
>> 
>> Compare, for example, BBEdit, where after selecting a block of lines,
>> one uses the Text > Prefix/Suffix Lines menu item and then just enters
>> the desired prefix or suffix in the resulting pop-up window.  (Albeit
>> that suffers from the same trailing-blank issue.) I suspect other
>> programmers’ text editors have similar built-in menu items or macros.
>> 
>>> On 17 May2020, at 6:37 AM, Luis Sequeira <lfsequeira at gmail.com
>>> <mailto:lfsequeira at gmail.com>> wrote:
>>> 
>>> 1) Select the block of text where you want to add the comment sign.
>>> 
>>> 2) Press Command-F to open the Find window
>>> 
>>> 3) Chech the box for "Regular Expressions"
>>>   Make sure that you have selected Origin: "Top" and Scope: "Selection"
>>> 
>>>   Type "$" (without quotes) in the search box
>>>   Type "%" (without quotes) in the replace box
>>>   Press Replace All
>> 
>> ---

---
Murray Eisenberg			murrayeisenberg at gmail.com
503 King Farm Blvd #101	Home (240)-246-7240
Rockville, MD 20850-6667	Mobile (413)-427-5334




More information about the MacOSX-TeX mailing list