[rkward-users] Syntax highlighting in Sweave files

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Dec 16 08:48:55 UTC 2010


Hi,

On Wednesday 15 December 2010, SmallSoap [Nexus6] wrote:
> 1) When I open an Sweave script in rkward, the syntax-highlighting
> initially is set to R-code. However, from the moment I save my file
> (CTRL-S), syntax-highlighting is set to latex-style. I would like it to
> stick to R-type syntax highlighting. Is that possible?

to switch back to R highlighting once, on an individual script, use Edit-
>Tools Move->Highlighting->Scripts->R Script. One quick and dirty way to avoid 
the highlight-switching, would be to save the file with .R/.r extension.

To make the editor use R highlighting for .Rtex files, open any script window, 
select Settings->Configure Editor->Open / Save->Modes & Filetypes. There you 
can add a new Filetype for the extension .Rtex, and set it to use R 
highlighting (make sure to also set a priority of at least 20).

> 2) Can I set or change the recognized file-types in the open-file dialog?
> My Sweave files have the extension .Rtex, so I always have to switch to
> "all files" before I can see them.

No, unfortunately, this is not possible, ATM. Could you add a request to make 
this configurable to our feature req	uest tracker 
(http://sourceforge.net/tracker/?group_id=50231&atid=459010)?

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-users/attachments/20101216/9335f496/attachment.sig>


More information about the Rkward-users mailing list