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

Luis Sequeira lfsequeira at gmail.com
Mon May 18 22:38:21 CEST 2020

Murray, a few comments on your comments:

	(a) This method is possible only when using the OgreKit Find Panel.

True. I have always used OgreKit. I do remember there were other options, but OgreKit is so much more flexible.

	(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.

This one is very easy.
Just replace the find regular expression to include any number of blanks before the end of the line.

Instead of "$", search for "\b*$"

Incidentally, regular expressions are not that hard to figure out.
I use them a lot, both in TeXShop and BBEdit (and good'ole vi...)

	(c) [of course] one also has to check the ?Selection? option of the Scope section in the OgreKit Find Panel.

I did write that!

Also: yes, it would be nice to have a macro for it, and I have no doubt one can be created, but I have not looked much into it.


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list.