I'm new to TextMate, mainly used it for LaTeX editing so far and very much like it. I know it's not a new issue (http://lists.macromates.com/textmate/2007-October/022871.html etc), but I am seriously missing any way to wrap my text -- I am collaborating via svn with coauthors who are working on different platforms (and some of them with all-too-basic editors) and hence, having paragraphs in long lines is out of the question. As suggested before, hard-wrapped paragraphs are certainly not the perfect solution, but they work reasonably well with line-based diff tools (and there is no way I can get my coauthors to use others).
It is not necessarily a question of automatic hard-wrapping. I would be fine to ``manually'' do that only before committing a file. For now it's opening it in Emacs and hitting C-c C-q C-e. Does it seem feasible to extend the Control-Shift-H "Tidy" functionality of the LaTeX bundle to include hard-wrapping at a user-specified point, maybe along these lines: http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/ ? Would also be great if one was able to do that by paragraph (Emacs Alt-q).
Another thing is that I am using the harvard citation styles and it feels a bit strange to have \cite{.} highlighted differently than \citeasnoun{.} etc. Can anybody help me out on whether the list of citation commands is adjustable and if so, how?
Many thanks and best wishes, Hans-Martin
On 8 Jul 2008, at 10:51, Hans-Martin v. Gaudecker wrote:
I'm new to TextMate, mainly used it for LaTeX editing so far and very much like it. I know it's not a new issue (http://lists.macromates.com/textmate/2007-October/022871.html etc), but I am seriously missing any way to wrap my text -- I am collaborating via svn with coauthors who are working on different platforms (and some of them with all-too-basic editors) and hence, having paragraphs in long lines is out of the question. As suggested before, hard-wrapped paragraphs are certainly not the perfect solution, but they work reasonably well with line-based diff tools (and there is no way I can get my coauthors to use others).
It is not necessarily a question of automatic hard-wrapping. I would be fine to ``manually'' do that only before committing a file.
By myself I have two naïve commands for that:
Select your paragraph and invoke either:
fold -s -w ${TM_COLUMNS:-72}
or
fmt ${TM_COLUMNS:-72}
According to TM's 'Wrap Columns' setting you can fold or format the selection. The second one has the advantage if you increase the 'Wrap Columns' setting from let's say 72 to 80, this command will reformat it nicely. The first one only works if you decrease the number of columns.
For me it works pretty good. But beware of the fmt command. If you invoke it to format the entire latex document it will destroy the lines.
As an attachment I have these two tmcommands.
Cheers,
--Hans