Dear friends!
I am using Textmate for my LaTeX projects (writing arcticles at the university).
I want the following macro: I want to mark a text that I have written and then I want to push a special keyboard shortcut to activate it.
Example: "This is a text and it is just an example."
I want to mark the word "text", push a keyboard shortcut and then it should create automatically:
"This is a \frqq text\flqq\ and it is just an example."
Can this be realized with TextMate?
Kind regards!
Chris (Austria)
Try this out:
echo -en "\\frqq $TM_SELECTED_TEXT\\flqq\"
as command with no input and replace selected text.
On 11 Jul 2007, at 11:46, Christoph-Waibl.at wrote:
Dear friends!
I am using Textmate for my LaTeX projects (writing arcticles at the university).
I want the following macro: I want to mark a text that I have written and then I want to push a special keyboard shortcut to activate it.
Example: "This is a text and it is just an example."
I want to mark the word "text", push a keyboard shortcut and then it should create automatically:
"This is a \frqq text\flqq\ and it is just an example."
Can this be realized with TextMate?
Kind regards!
Chris (Austria)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
********************************************************** Hans-Joerg Bibiko Max Planck Institute for Evolutionary Anthropology Department of Linguistics Deutscher Platz 6 phone: +49 (0) 341 3550 341 D-04103 Leipzig fax: +49 (0) 341 3550 333 Germany e-mail: bibiko@eva.mpg.de **********************************************************
You don't need a command for this – just a snippet with
\frqq$TM_SELECTED_TEXT\flqq
would be fine.
On 11 Jul 2007, at 10:56, Hans-Joerg Bibiko wrote:
Try this out:
echo -en "\\frqq $TM_SELECTED_TEXT\\flqq\"
as command with no input and replace selected text.
<chris.tmCommand>
On 11 Jul 2007, at 11:46, Christoph-Waibl.at wrote:
Dear friends!
I am using Textmate for my LaTeX projects (writing arcticles at the university).
I want the following macro: I want to mark a text that I have written and then I want to push a special keyboard shortcut to activate it.
Example: "This is a text and it is just an example."
I want to mark the word "text", push a keyboard shortcut and then it should create automatically:
"This is a \frqq text\flqq\ and it is just an example."
Can this be realized with TextMate?
Kind regards!
Chris (Austria)
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Hans-Joerg Bibiko Max Planck Institute for Evolutionary Anthropology Department of Linguistics Deutscher Platz 6 phone: +49 (0) 341 3550 341 D-04103 Leipzig fax: +49 (0) 341 3550 333 Germany e-mail: bibiko@eva.mpg.de
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Of course the backslashes should be escaped:
\frqq$TM_SELECTED_TEXT\flqq
Do you really want the words frqq and flqq there? More importantly, do you want to be able to edit that text and have it mirrored or something like that? If so, then you will want to use placeholders in the snippet.
On Jul 11, 2007, at 6:06 AM, Ciarán Walsh wrote:
You don't need a command for this – just a snippet with
\frqq$TM_SELECTED_TEXT\flqq
would be fine.
On 11 Jul 2007, at 10:56, Hans-Joerg Bibiko wrote:
Try this out:
echo -en "\\frqq $TM_SELECTED_TEXT\\flqq\"
as command with no input and replace selected text.
<chris.tmCommand>
On 11 Jul 2007, at 11:46, Christoph-Waibl.at wrote:
Dear friends!
I am using Textmate for my LaTeX projects (writing arcticles at the university).
I want the following macro: I want to mark a text that I have written and then I want to push a special keyboard shortcut to activate it.
Example: "This is a text and it is just an example."
I want to mark the word "text", push a keyboard shortcut and then it should create automatically:
"This is a \frqq text\flqq\ and it is just an example."
Can this be realized with TextMate?
Kind regards!
Chris (Austria)
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Jul 12, 2007, at 2:32 AM, Ciarán Walsh wrote:
On 11 Jul 2007, at 19:21, Charilaos Skiadas wrote:
Of course the backslashes should be escaped
Why? Is that a LaTeX thing?
Oh I guess no, you don't need to escape them. I was thinking of the usual case for me, where the output of a command needs to be a snippet, so the backslash needs to be escaped inside the Ruby string.
Haris Skiadas Department of Mathematics and Computer Science Hanover College