In a .R file, I have a bunch of headers like this:
# this is a header -----------------------------------------------------------
How can I get these headers to show in symbol list and fold? I¹ve tried changing the foldingStartMarker/foldingStopMarker line without success, and I cannot find the showInSymbolList line in the R language grammar.
Thanks Ross
On 05 Dec 2013, at 11:35, Ross Ahmed rossahmed@googlemail.com wrote:
In a .R file, I have a bunch of headers like this:
# this is a header -----------------------------------------------------------
How can I get these headers to show in symbol list and fold? I’ve tried changing the foldingStartMarker/foldingStopMarker line without success, and I cannot find the showInSymbolList line in the R language grammar.
Hi,
first, the R grammar recognises the normal “pragma” notation à la:
#pragma mark - #pragma mark f1
f1<-function(x) { 1 }
#pragma mark - #pragma mark f3 and f5
f3<-function(x) { 3 } f5<-function(x) { 5 }
Regarding to folding, well, how to you define a to be folded area?
E.g.: In above example from "#pragma mark f1” to the next occurrence of a “#pragma”?
Cheers, Hans
I have it set up in R so that block comments get captured as symbols. Much easier navigating when they appear in the ⌘⇧-T box!
e.g. here: http://d.pr/i/VmQ6
It’s just this content
{ showInSymbolList = 1; symbolTransformation = 's/(^# =+ *)(.*)([ =]+$)/#: $2/;'; }
In a SETTING item called "Symbol List: Block comments” which I gave scope
comment.line.number-sign.block.r
Do it with:
On 5 Dec 2013, at 10:35 AM, Ross Ahmed rossahmed@googlemail.com wrote: In a .R file, I have a bunch of headers like this:
# this is a header -----------------------------------------------------------
How can I get these headers to show in symbol list and fold? I’ve tried changing the foldingStartMarker/foldingStopMarker line without success, and I cannot find the showInSymbolList line in the R language grammar.
Unfortunately not working, here’s what I’ve do
1. Gone to bundles > edit bundles > R > settings 2. Created a new setting called "Symbol List: Block comments” 3. Inserted "comment.line.number-sign.block.R” into Scope Selector 4. Entered this in body of setting: { showInSymbolList = 1; symbolTransformation = 's/(^# =+ *)(.*)([ =]+$)/#: $2/;'; } 5. Tried it on # = this is a header
Any ideas what I’m doing wrong?
Thanks Ross
On 05/12/2013 12:54, "Tim Bates" timothy.c.bates@gmail.com wrote:
I have it set up in R so that block comments get captured as symbols. Much easier navigating when they appear in the ⌘⇧-T box!
e.g. here: http://d.pr/i/VmQ6
It’s just this content
{ showInSymbolList = 1; symbolTransformation = 's/(^# =+ *)(.*)([ =]+$)/#: $2/;'; }
In a SETTING item called "Symbol List: Block comments” which I gave scope
comment.line.number-sign.block.r
Do it with:
On 5 Dec 2013, at 10:35 AM, Ross Ahmed rossahmed@googlemail.com wrote: In a .R file, I have a bunch of headers like this:
# this is a header
How can I get these headers to show in symbol list and fold? I’ve tried changing the foldingStartMarker/foldingStopMarker line without success, and I cannot find the showInSymbolList line in the R language grammar.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
should comment.line.number-sign.block.R be comment.line.number-sign.block.r ??
On 5 Dec 2013, at 3:32 PM, Ross Ahmed rossahmed@googlemail.com wrote:
Unfortunately not working, here’s what I’ve do
- Gone to bundles > edit bundles > R > settings
- Created a new setting called "Symbol List: Block comments”
- Inserted "comment.line.number-sign.block.R” into Scope Selector
- Entered this in body of setting:
{ showInSymbolList = 1; symbolTransformation = 's/(^# =+ *)(.*)([ =]+$)/#: $2/;'; } 5. Tried it on # = this is a header
Any ideas what I’m doing wrong?
Thanks Ross
On 05/12/2013 12:54, "Tim Bates" timothy.c.bates@gmail.com wrote:
I have it set up in R so that block comments get captured as symbols. Much easier navigating when they appear in the ⌘⇧-T box!
e.g. here: http://d.pr/i/VmQ6
It’s just this content
{ showInSymbolList = 1; symbolTransformation = 's/(^# =+ *)(.*)([ =]+$)/#: $2/;'; }
In a SETTING item called "Symbol List: Block comments” which I gave scope
comment.line.number-sign.block.r
Do it with:
On 5 Dec 2013, at 10:35 AM, Ross Ahmed rossahmed@googlemail.com wrote: In a .R file, I have a bunch of headers like this:
# this is a header
How can I get these headers to show in symbol list and fold? I’ve tried changing the foldingStartMarker/foldingStopMarker line without success, and I cannot find the showInSymbolList line in the R language grammar.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate