Re: Are there any cross referencing hooks?

2017-11-17 Thread Rich Siegel
On 11/16/17 at 1:31 AM, reflectiv...@gmail.com (Everywhere is 
Nowhere) wrote:


So let's say I want to implement something like ctags lookup 
for C/C++ programs in BBEdit... [...]


WAYRTTD? There are many ways to accomplish this. :-)

BBEdit already has ctags lookup built in (try right-clicking on 
something that's been colored with the ctags color, or select it 
and use "Find Definition" on the Search menu).


There's also Dash support for "Find in Reference", as well as 
the "reference URL" (which can be configured per-language in the Preferences.


You could also write a macOS "Service", which will then appear 
on the contextual menu (BBEdit 12 and later) which does whatever 
you need.


R.
--
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they 
sedate me.


--
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email

"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Are there any cross referencing hooks?

2017-11-17 Thread Everywhere is Nowhere
So let's say I want to implement something like ctags lookup for C/C++ 
programs in BBEdit...  wherein I could put the cursor on a word and click, 
and it would invoke some code to do a lookup and anything with the result 
(in my case I want to send something in a form of my choosing to a website).

Is there some reasonable way to accomplish that in BBEdit?

And I would hate to have to override the factory C++ language module merely 
for that, if a module is the way to go on that. But I was hoping for 
something a little simpler for the matter of simply things and responding 
to it outside the editor contents.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Filter to reverse order of lines

2017-11-17 Thread Rich Siegel
On 11/17/17 at 6:36 AM, ms...@podiuminternational.org (Marek 
Stepanek) wrote:



I would like to reverse the order of a selected lines with a BBEdit
filter. Best with Perl.


Just last week, in fact. :-) 


Enjoy,

R.
--
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they 
sedate me.


--
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email

"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Filter to reverse order of lines

2017-11-17 Thread Mark Damon Hughes
> On Nov 17, 2017, at 03:36, Marek Stepanek  
> wrote:
> Hello all!
> I would like to reverse the order of a selected lines with a BBEdit
> filter. Best with Perl.

I'm sure there's a Perl one-liner, but the Python script I use is:

#!/usr/bin/env python3
import sys
with sys.stdin as f:
lines = f.readlines()
lines.reverse()
for l in lines:
sys.stdout.write(l)
sys.stdout.flush()

-- 
 Mark Damon Hughes
 

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Filter to reverse order of lines

2017-11-17 Thread Marek Stepanek

Hello all!


I would like to reverse the order of a selected lines with a BBEdit
filter. Best with Perl.

My approach is something like follows:

#!/usr/bin/local/perl

use File::ReadBackwards;
use warnings;
use strict;

tie *BW, 'File::ReadBackwards', (<>) or
   die "can't read selected text $!" ;

   while(  ) {
   print ;
   }


Is there somebody who could help me with this?


Best greetings to all from Munich


marek

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.