Re: Incrementing numbers in a rectangular selection

2011-08-13 Thread John Delacour

At 21:10 -0500 12/08/2011, Christopher Stone wrote:



On Aug 12, 2011, at 11:50, John Delacour wrote:


Place the cursor anywhere in a line consisting of variable1


...the line content is not propagated on my system.  Starting with 
the cursor in the variable line the variable gets eaten and the 
result:


someVariable
--
1
2
3
4



To repeat the line you quote, Chris:

At 17:50 +0100 12/08/2011, I wrote:


Place the cursor anywhere in a line consisting of variable1


... or someVariable1 or var_1 if you like.  If you want to start with 
something not ending with an integer then the script would need to be 
slightly different; it hasn't got eyes in the back of its head :-;


JD

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Greedy GREP

2011-08-13 Thread John Delacour

At 23:50 -0500 12/08/2011, Christopher Stone wrote:

Ronald will no doubt come up with something brilliant, and JD will 
likely come up with a nice Perl filter.


:)


You bet!

#! /usr/bin/perl
while () {
  $found++ if /^time/i;
  print if $found == 2;
}



That's presuming you have something like

time : 01:15
other
other
time : 2:15
other
other
time : 03:15
other
other

and you want

time : 02:15
other
other

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Greedy GREP

2011-08-13 Thread John Delacour
Let's try that again with HTML.  Google always gets plain text wrong 
in the display in the web archive.  Google things are designed by 
neanderthals with no idea what an RFC is.  I wish Barebones would 
transfer the list to ListServ or some other decent list server.


#! /usr/bin/perl
while () {
  $found++ if /^time/i;
  print if $found == 2;
}

JD

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Incrementing numbers in a rectangular selection

2011-08-13 Thread Christopher Stone
On Aug 13, 2011, at 02:00, John Delacour wrote:
 ... or someVariable1 or var_1 if you like.  If you want to start with 
 something not ending with an integer then the script would need to be 
 slightly different; it hasn't got eyes in the back of its head :-;

__

Aha!  I missed that.  Thanks John.  :)

--
Chris

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


More support for HDL

2011-08-13 Thread Aman
Hi,

BBEdit supports VHDL and Verilog HDL (Hardware Description Language).
I use both Verilog and SystemVerilog too. Has anyone created a
language support for SystemVerilog? Is it easy to create support for a
language if one knows the EBNF form of syntax and semantics?

Regards,

Aman

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Greedy GREP

2011-08-13 Thread Ronald J Kimball
On Fri, Aug 12, 2011 at 09:11:08PM -0700, Warren Michelsen wrote:
 I must be misunderstanding how {1}? works.

Normally, quantifiers (? * + {n,m}) match as many times as possible.
Adding a ? after a quantifier makes it match as few times as possible.
(To be more precise, normally the longest leftmost match is found; adding ?
after a quantifier means the shortest leftmost match is found.)

So, {n}? means match exactly n times, but as few as possible.  But the only
possibility is exactly n times, so adding the ? doesn't have any effect.

Further, {1} means match exactly 1 time.  But without a quantifier it
matches 1 time anyway, so {1} also has no effect.


 I would expect (^time : (?s).*) to match the entire document and it does. 
 
 So where do I place the {1}? to limit the find to the second, not third 
 instance of ^time : ?
 
 Using (^(time : ){1}?(?s).*)^time selects up to the third ^time.

I believe this is what you're looking for:

(^time : (?s).*?)^time

You want to match any character, as few times as possible to get to ^time.

You were on the right track; you were just adding the question mark in the
wrong place.


Ronald

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Patrick James
Hi

I have a strong feeling this question is more about Apache and how my server 
works than BBEdit, however this issue only arises in the BBEdit  FTP/SFTP 
browser window, so maybe it is a BBEdit query.

In every directory shown in there browser there are two folders (okay 
directories) one has a single full-stop only as its name, the other has two 
full-stops as its name. (In US english full-stop is called a period).

Well I know that the full-stop, or period, or dot, at the beginning of a 
file-name makes that file invisible. When I go to my File Manager in cPanel 
with show dot files enabled I do not see these two directories in every 
directory.

I only see them in BBEdit. I had Transmit for a while on a trial basis and it 
did not show these folders when it was set to show invisibles.

Thank you for any assistance you may have.

It is not a very big issue of course, I am just wondering why they are there :)

Patrick

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Herbert Schulz

On Aug 13, 2011, at 11:23 AM, Patrick James wrote:

 Hi
 
 I have a strong feeling this question is more about Apache and how my server 
 works than BBEdit, however this issue only arises in the BBEdit  FTP/SFTP 
 browser window, so maybe it is a BBEdit query.
 
 In every directory shown in there browser there are two folders (okay 
 directories) one has a single full-stop only as its name, the other has two 
 full-stops as its name. (In US english full-stop is called a period).
 
 Well I know that the full-stop, or period, or dot, at the beginning of a 
 file-name makes that file invisible. When I go to my File Manager in cPanel 
 with show dot files enabled I do not see these two directories in every 
 directory.
 
 I only see them in BBEdit. I had Transmit for a while on a trial basis and it 
 did not show these folders when it was set to show invisibles.
 
 Thank you for any assistance you may have.
 
 It is not a very big issue of course, I am just wondering why they are there 
 :)
 
 Patrick


Howdy,

The ./ directory is a self-reference to the present directory and the ../ is a 
reference to the parent directory. Try

cd ..

in Terminal and you'll go up one directory in the tree. If you have an UNIX 
executable, e.g., mycommand, in the present directory and it's NOT in your PATH 
trying to execute by simply using its name will not work; it won't be found. 
However if you execute

./mycommand

the OS will find it in the present directory.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)



-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Ronald J Kimball
On Sat, Aug 13, 2011 at 05:23:27PM +0100, Patrick James wrote:

 I have a strong feeling this question is more about Apache and how my server 
 works than BBEdit, however this issue only arises in the BBEdit  FTP/SFTP 
 browser window, so maybe it is a BBEdit query.
 
 In every directory shown in there browser there are two folders (okay 
 directories) one has a single full-stop only as its name, the other has two 
 full-stops as its name. (In US english full-stop is called a period).

. represents the current directory, and .. the parent directory.

Ronald

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Zajkowski, James
On Aug 13, 2011, at 12:23 PM, Patrick James wrote:

 In every directory shown in there browser there are two folders (okay 
 directories) one has a single full-stop only as its name, the other has two 
 full-stops as its name. (In US english full-stop is called a period).

 I only see them in BBEdit. I had Transmit for a while on a trial basis and it 
 did not show these folders when it was set to show invisibles.

 It is not a very big issue of course, I am just wondering why they are there 
 :)

These are magic directory entries, and are presented and handled by the various 
UNIX directory-reading libraries.  The directory . means the current 
directory and .. means the previous directory.  They let you construct 
paths like /Users/pjlist/Library/Preferences/../Application Support/./BBEdit  
These are conveniences that make locating files from a script or an application 
easier.

Transmit is simply hiding them - if you use Transmit's show transcript you 
will see them listed, and also if you type ls -al from the Terminal on your 
Mac you will see them at the top of the list.

There's some information in the dir(5) manpage:

 Each directory file contains two special directory entries; one is a 
pointer to the directory itself
 called dot `.' and the other a pointer to its parent directory called 
dot-dot `..'.  Dot and dot-dot
 are valid pathnames, however, the system root directory `/', has no parent 
and dot-dot points to
 itself like dot.


--Jim

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Patrick James
On 13 Aug 2011, at 17:34, Zajkowski, James wrote:

 These are magic directory entries,

Thank you Jim, Ronald and Herb. I learn something new everyday :)

Patrick

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread LuKreme
Patrick James pjl...@gmail.com squawked out on Saturday 13-Aug-2011@10:23:27
 In every directory shown in there browser there are two folders (okay 
 directories) one has a single full-stop only as its name, the other has two 
 full-stops as its name. (In US english full-stop is called a period).

These two special directories exist in every UNIX system, ‘.’ is a shorthand 
for ‘this directory’ and ‘..’ is a shorthand for ‘the parent directory’. You 
can see then in OS X by opening up the Terminal and typing 

ls -a

BBEdit is simply showing what the server says is there. FTP clients can often 
be set to hide them (GUI clients tend to always hide them because there is no 
need to ever show them with a GUI of the folder tree accessible).

-- 
Don't be afraid to be weak, Don't be too proud to be strong.

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


View ncx and opf files within epubs?

2011-08-13 Thread Derek
I'm really enjoying the ability to view the contents of epub files
from directly within BBEdit, but it's frustrating that it doesn't also
open the ncx and opf files. Am I doing something wrong? Is there any
way I can have BBEdit automatically include those files as well?

Derek

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Prachi Gauriar
In UNIX, the . directory is the current directory, and .. is its parent. This 
is common throughout UNIX and many FTP clients. In other words, nothing to 
worry about.

-Prachi (sent from my iPhone)

On Aug 13, 2011, at 12:23 PM, Patrick James pjl...@gmail.com wrote:

 Hi
 
 I have a strong feeling this question is more about Apache and how my server 
 works than BBEdit, however this issue only arises in the BBEdit  FTP/SFTP 
 browser window, so maybe it is a BBEdit query.
 
 In every directory shown in there browser there are two folders (okay 
 directories) one has a single full-stop only as its name, the other has two 
 full-stops as its name. (In US english full-stop is called a period).
 
 Well I know that the full-stop, or period, or dot, at the beginning of a 
 file-name makes that file invisible. When I go to my File Manager in cPanel 
 with show dot files enabled I do not see these two directories in every 
 directory.
 
 I only see them in BBEdit. I had Transmit for a while on a trial basis and it 
 did not show these folders when it was set to show invisibles.
 
 Thank you for any assistance you may have.
 
 It is not a very big issue of course, I am just wondering why they are there 
 :)
 
 Patrick
 
 -- 
 You received this message because you are subscribed to the 
 BBEdit Talk discussion group on Google Groups.
 To post to this group, send email to bbedit@googlegroups.com
 To unsubscribe from this group, send email to
 bbedit+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/bbedit?hl=en
 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: http://www.twitter.com/bbedit

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: auto-save on preview?

2011-08-13 Thread blinde
chris -

'using terms from application BBEdit'?!?? 'end postmenuselect?!? how
do you know this stuff?!?!??!?  8-)

anyway, i use the keyboard shortcut to preview in (mostly) safari...
i.e., a browser instead of bbedit.

i created the script, but it didn't work at first. i looked at it
again, and thought ah ha... i need to change the 'if' clause to read
like the menu... i.e., 'Preview in Safari (5.1)'... which did not
work.

i went to the prefs to double-check what the keyboard shortcut thought
it was attached to, and prefs said only 'Preview'.

i changed the script name to Markup•Preview.scpt, changed the 'if'
check to look for just 'Preview', and life is fantastic.

you rock.

thank you for your help and expertise!

bruce



p.s.: i used to think that javascript was fragile voodoo, and
applescript was obscure voodoo. i still feel the same way about
applescript... when it works, it rocks... but it's the weirdest, most
inconsistent language i've even come across. i'm sure glad it makes
sense to you!





On Aug 12, 9:07 pm, Christopher Stone listmeis...@thestoneforge.com
wrote:
 On Aug 12, 2011, at 10:08, blinde wrote:

  I just don't have any room to breathe until into next week... but could 
  really use this functionality now. if anyone can forward how i would do 
  this in applescript, i'll take it from there... thanks.

 __

 Hey Bruce,

 Script Name: Markup•Preview in BBEdit.scpt

 Script Path: ~/Library/Application Support/BBEdit/Menu Scripts/Markup•Preview 
 in BBEdit.scpt

 This should save every time you use the keyboard shortcut or select the menu 
 item.

 Let me know if it doesn't do what you want.

 Props to Rich and Patrick; the example script in the manual wasn't hard to 
 figure out.

 --
 Best Regards,
 Chris

 --- 
 -
 using terms from application BBEdit

   on menuselect(menuName, itemName)
     if menuName = Markup and itemName = Preview in BBEdit then

       set weHandledCommand to true

       try

         tell document of text window 1 to save
         set weHandledCommand to false

       on error errMsg number errNum
         set sep to ==
         set e to sep  return  Error:   errMsg  return  sep  return ¬
            Error Number:   errNum  return  sep
         beep
         display dialog e

       end try
       return weHandledCommand
     end if
   end menuselect

   on postmenuselect(menuName, itemName)
     -- This is called after the application has processed the command.
   end postmenuselect

 end using terms from
 --- 
 -

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: FTP/SFTP Browser shows two folders in every directory

2011-08-13 Thread Robert A. Rosenberg
At 22:07 +0100 on 08/13/2011, Patrick James wrote about Re: FTP/SFTP 
Browser shows two folders in every directory:


The funny thing, for me, is that I now realise that I have been 
using these directories for years  , well, at least the .. one. In 
website creation I am frequently using ../ to take a url up a 
level.


Patrick


In addition, there is no harm in using ./something in lieu of just 
something. In fact, there are cases where you HAVE TO use the 
./something form because the plain something will not work. I find it 
is simpler to always use ./ to avoid these cases.


--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit
attachment: -!3a) Happy.gif