[TxMt] Re: How do I tell TextMate to move the cursor one line down

Yaomin Xu yaomin at gmail.com
Sun Oct 5 17:39:44 UTC 2008


I have the same need. I have done the following to accomplish this.
Generally speaking, you need to combine the command with a macro:

1. modify the command in 'normal' R bundle to additionally active
Textmate after it sends the R statements
2. record a macro to move the cursor: You first active the above R
command, which sends the R statement to the R GUI's R console window,
and  let it return back to Textmate; Then move the cursor one line
down and finish the macro.
3. save the macro and give it a good keystroke.
Optionally, you can use the power of the search (^F) in Textmate to
move the cursor. By using the proper regular expression in the search,
you can move the cursor to the next non-comment R statement.

The above steps work generally for both a line and a selection.

Yaomin


On Sun, Oct 5, 2008 at 7:43 AM,  <textmate-request at lists.macromates.com> wrote:
> Send textmate mailing list submissions to
>        textmate at lists.macromates.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.macromates.com/listinfo/textmate
> or, via email, send a message with subject or body 'help' to
>        textmate-request at lists.macromates.com
>
> You can reach the person managing the list at
>        textmate-owner at lists.macromates.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of textmate digest..."
>
>
> Today's Topics:
>
>   1.  Re: Simple markdown to book workflow? (jiho)
>   2.  Re: Python 2.6? (Pedro Borges)
>   3.  How do I tell TextMate to move the cursor one line down?
>      (Tobias Pyndt Steinmann)
>   4.  Re: How do I tell TextMate to move the cursor one line down?
>      (Hans-J?rg Bibiko)
>   5.  Re: How do I tell TextMate to move the cursor one line down?
>      (Hans-J?rg Bibiko)
>   6.  Suddenly xelatex is not found anymore (Niels Kobschaetzki)
>   7.  HTML-output-window just looks plain wrong (Niels Kobschaetzki)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 4 Oct 2008 09:34:39 -0400
> From: jiho <jo.irisson at gmail.com>
> Subject: [TxMt] Re: Simple markdown to book workflow?
> To: gerti-textmate at bitart.com, TextMate users
>        <textmate at lists.macromates.com>
> Message-ID: <6646DC23-E892-47E0-B77A-C6936351061D at gmail.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> On 2008-October-04  , at 02:16 , Gerd Knops wrote:
>> Thanks everybody for the help, it is much appreciated!
>>
>> Using markdown to Latex (memoir) conversion gets me most of the way.
>>
>> One problem I have that I can't seem to figure out is that when I set
>> \geometry{a5paper} the book is formatted for A5, but the physical
>> paper size still seems to be Letter. How can I fix that?
>
>
> This is actually a feature of the memoir class. The thinking behind it
> is that, whatever your page size is, you will probably print it on a
> stock paper, which has a standard size (A4, letter etc.) and them cut
> (trim) it (if you add the options showtrims to the document class, you
> should see those trim marks). This is why the stock size and the page
> size are separated in memoir. You can set them easily without
> resorting to the geometry package, with commands that are specific to
> the memoir class. Check the chapter "Laying out the page" (section II,
> p 49) of the memoir manual (meman.pdf) for the commands. It also gives
> more details on the dimensions of the page and how to make them
> harmonious (A5 is probably not the best idea because the height to
> width ratio might make the text look awkward). My advice: take a book
> with a similar purpose that you find enjoyable to read and well laid
> out and copy the dimensions.
>
> This is for example what I used in a recent document, based on several
> published books with margin notes:
>
> \usepackage{calc}             % easy calculations
>
> % Page size
> \settrimmedsize{246mm}{172mm}{*}    % size of final page  : h w ratio
>
> % Stock paper size = A4
> \setstocksize{297mm}{210mm}         % size of paper sheet : h w
>
> % Trims (i.e. cuts) = set interior edge of the page to be the actual
> edge of the stock and center vertically
> \settrims{0.5\stockheight-0.5\paperheight}{\stockwidth-
> \paperwidth}           % portions to trim from : top edge
>
> % Set margins and compute size of text block
> % NB: \textheight is set to an integer number of lines by
> \checkandfixthelayout below
> \settypeblocksize{197mm}{100mm}{*}  % block: height width ratio
> \setlrmargins{32mm}{*}{*}           % horiz margins : spine edge ratio
> \setulmargins{69pt}{*}{*}           % vertical margins : upper lower
> ratio
>
> % Margin notes
> \setmarginnotes{3.8mm}{31mm}{5mm}   % margin notes: separation width
> push
> %  separation: horiz space between text and note
> %  width: max width of note
> %  push: min space between notes
>
> \checkandfixthelayout[nearest]
> % nearest = chose the integral number of lines nearest to the
> specified textheight and use this as the textheight
>
> I hope that helps.
>
> JiHO
> ---
> http://jo.irisson.free.fr/
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 4 Oct 2008 17:03:34 +0100
> From: "Pedro Borges" <pedro.dhb at gmail.com>
> Subject: [TxMt] Re: Python 2.6?
> To: "TextMate users" <textmate at lists.macromates.com>
> Message-ID:
>        <d82a1ed0810040903q34795f72qc3d82e8bac77b423 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Is there a list of requested features for the bundle?
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 4 Oct 2008 18:12:13 +0200
> From: Tobias Pyndt Steinmann <tobii at tobii.dk>
> Subject: [TxMt] How do I tell TextMate to move the cursor one line
>        down?
> To: TextMate users <textmate at lists.macromates.com>
> Message-ID: <A63860BE-556B-49BF-881D-255872FEC11D at tobii.dk>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
> I am trying add a command to the R bundle that will send the current
> line to the R GUI, in the same way the ESS for Emacs "Eval line &
> step" command works.
> It is quite easy to send the line to R GUI, but I cannot find a good
> way to move to the cursor to the next line in TextMate.
> Currently I am using this Applescript to do the job:
> # move the cursor
> osascript -e 'tell application "System Events"' \
>                 -e 'tell application "TextMate" to activate' \
>                 -e 'tell process "TextMate"' \
>                 -e 'keystroke (ASCII character 31)' \
>                 -e 'end tell' \
>                 -e 'end tell'
>
> But the problem is that when you call the command using a keyboard
> shortcut ie. cmd+shift + R and keep holding cmd+shift for some time (I
> have this of a habit unfortunately :) ) the keystroke will be cmd
> +shift + (ASCII character 31) causing the text from the cursor to the
> end of the document to be selected.
>
> Is there a smarter way to advance the cursor one line? -- maybe an
> internal TextMate command?
>
> Thanks in advance.
> with best regards,
> Tobias Pyndt Steinmann
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 1929 bytes
> Desc: not available
> Url : http://lists.macromates.com/textmate/attachments/20081004/d2c2f454/attachment-0001.p7s
>
> ------------------------------
>
> Message: 4
> Date: Sat, 4 Oct 2008 18:25:03 +0200
> From: Hans-J?rg Bibiko <bibiko at eva.mpg.de>
> Subject: [TxMt] Re: How do I tell TextMate to move the cursor one line
>        down?
> To: TextMate users <textmate at lists.macromates.com>
> Message-ID: <B48E0110-1797-4D0B-8E54-70263406B973 at eva.mpg.de>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> On 04.10.2008, at 18:12, Tobias Pyndt Steinmann wrote:
>> I am trying add a command to the R bundle that will send the
>> current line to the R GUI, in the same way the ESS for Emacs "Eval
>> line & step" command works.
>
> Before I start one question. Which R bundle do you are using? The
> 'normal' one or the Review bundles R, R Console (R.app), R Console
> (Rdaemon)?
>
> --Hans
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 4 Oct 2008 18:29:48 +0200
> From: Hans-J?rg Bibiko <bibiko at eva.mpg.de>
> Subject: [TxMt] Re: How do I tell TextMate to move the cursor one line
>        down?
> To: TextMate users <textmate at lists.macromates.com>
> Message-ID: <59F56592-9BF7-4541-8217-179886497334 at eva.mpg.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> On 04.10.2008, at 18:25, Hans-J?rg Bibiko wrote:
>
>>
>> On 04.10.2008, at 18:12, Tobias Pyndt Steinmann wrote:
>>> I am trying add a command to the R bundle that will send the
>>> current line to the R GUI, in the same way the ESS for Emacs "Eval
>>> line & step" command works.
>>
>> Before I start one question. Which R bundle do you are using? The
>> 'normal' one or the Review bundles R, R Console (R.app), R Console
>> (Rdaemon)?
>
> And I forgot my second question ;)
> Why do you want to do it?
>
> --Hans
>
> ------------------------------
>
> Message: 6
> Date: Sun, 5 Oct 2008 12:14:23 +0200
> From: "Niels Kobschaetzki" <n.kobschaetzki at googlemail.com>
> Subject: [TxMt] Suddenly xelatex is not found anymore
> To: textmate at lists.macromates.com
> Message-ID:
>        <bf4e1fa10810050314p7c6e8cabr2e7132484a054c9e at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hi!
>
> I've installed MacTex 2008 some days ago and switched finally from
> pdftex to xelatex. On friday I still compiled files successfully,
> today I get only a
>
> Error: xelatex is not found, you need to install LaTeX or be sure that
> your PATH is setup properly.
>
> sh: line 0: type: xelatex: not found
>
> When I run from TextMate "which xelatex" it gives me: /usr/texbin/xelatex
> In Terminal the same, command completion in Terminal works fine as
> well. Compiling the file in Terminal works as well.
>
> I'm working with TM 1.5.7 (1464) and a recent SVN-checkout.
>
> Does anyone have an idea what the problem could be and how to fix it?
>
> Niels
>
>
> ------------------------------
>
> Message: 7
> Date: Sun, 5 Oct 2008 13:43:42 +0200
> From: "Niels Kobschaetzki" <n.kobschaetzki at googlemail.com>
> Subject: [TxMt] HTML-output-window just looks plain wrong
> To: textmate at lists.macromates.com
> Message-ID:
>        <bf4e1fa10810050443s2f6a59dfy39d540ffa507b60e at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi!
>
> In addition to my TeX-typesetting-problem I noticed that the
> HTML-output-window suddenly looks just plain wrong. I attached a
> screenshot. Some of the text is huge, other parts are very small and
> behind the huge stuff.
>
> Niels
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Typesetting technologiepolitikarbeit.tex.png
> Type: image/png
> Size: 41960 bytes
> Desc: not available
> Url : http://lists.macromates.com/textmate/attachments/20081005/daefc63a/attachment.png
>
> ------------------------------
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
>
> End of textmate Digest, Vol 5, Issue 8
> **************************************
>



More information about the textmate mailing list