Skip to content
Back to formatted view

Raw Message

Message-ID: <B734DF49-8237-4D60-98EC-20BBD7E003C0@xs4all.nl>
Date: 2009-10-30T20:02:32Z
From: Berend Hasselman
Subject: BBEdit Language Module Enhancements
In-Reply-To: <54D069FF-6FC7-4123-8160-FA0D4862E4C1@gmail.com>

On 30/10/2009, at 20:10, Jonathan Marc Bearak wrote:

> Hi,
>
> I made a couple of enhancements to the BBEdit Language Module found  
> in this thread:
> 	https://stat.ethz.ch/pipermail/r-sig-mac/2005-December/002520.html
>
> I have uploaded the language module here:
> 	http://homepages.nyu.edu/~jmb736/code/R_language_module_for_BBEdit/R.plist
>
> This language module, as revised, will detect R functions, so you  
> can browse functions in the symbols menu.
>
> I have not yet figured out how to match the function body.  As such,  
> when the cursor is placed, not in the function name, but in the  
> function body, the symbols menu will display "(no symbols  
> selected)".  I am not sure when I will next have time to look at  
> this, but in any case, simply being able to browse function names is  
> the really important thing (for me, anyway) so I do not have to  
> scroll down a file or use the find dialog just to find a function.

I tried your R.plist in TextWrangler 3 and it failed to recognise  
functions.
I changed the function pattern to this

		<key>Function Pattern</key>
		<string>(?P&lt;function_name&gt;[a-z0-9_A-Z.]+)\s*&lt;-\s*function</ 
string>

and then TextWrangler does recognise R functions with function names  
appearing in the symbols popup menu.

The string for <key>Identifier and Keyword Characters</key> should  
also contain a 0 (zero digit).

Berend