Lee Gold | 3 Nov 2011 06:05

how to run a script

Hi,

How do I run a python script?

I don't see a run or compile button anywhere.

Ubuntu.

Thanks

-- 
http://www.fastmail.fm - mmm... Fastmail...

--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-users" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/

Olivier Sessink | 3 Nov 2011 08:59
Picon
Gravatar

Re: how to run a script

On 11/03/2011 06:05 AM, Lee Gold wrote:
> Hi,
>
> How do I run a python script?
>
> I don't see a run or compile button anywhere.

do you want to run a script internally in bluefish 1), or you have 
created some script in bluefish and you want to use it outside bluefish 2)?

for 1): configure it in the preferences dialog under external commands

for 2) make it executable (chmod a+x scriptname) and then you can 
execute the script /path/to/scriptname

Olivier
--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-users" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/

Harvey S. Frey | 9 Nov 2011 02:38
Picon

perl syntax

I just downloaded Bluefish, and it seems very nice, but the syntax highlighting for perl is poor.

I'd like to have different colors for different variable types ( <at> , %, $) and different quote types (' ', " ", ` `).

The instructions in the manual seem to refer to a different version than 2.0.3 I downloaded.

I found a perl.bflang2 file in the share subdirectory, but I have no idea how to change it. I don't see colors mentioned in it anywhere.

Is it documented somewhere?
-- ============================= Harvey S. Frey MD PhD JD hsfrey-FhXRvTsqfPI@public.gmane.org www.harp.org ------------------------------ Obama campaigned on a pledge to close down the jail at Guantánamo Bay, and to end the use of military commissions. How is it possible that, two years after he was elected, there are still more than 150 prisoners there, and this November, one of them will go on trial before one of those very commissions? =============================
Olivier Sessink | 9 Nov 2011 09:12
Picon
Gravatar

Re: perl syntax

On 11/09/2011 02:38 AM, Harvey S. Frey wrote:
> I just downloaded Bluefish, and it seems very nice, but the syntax
> highlighting for perl is poor.
>
> I'd like to have different colors for different variable types ( <at> , %, $)
> and different quote types (' ', " ", ` `).
>
> The instructions in the manual seem to refer to a different version than
> 2.0.3 I downloaded.
>
> I found a perl.bflang2 file in the share subdirectory, but I have no
> idea how to change it. I don't see colors mentioned in it anywhere.
>
> Is it documented somewhere?

look at sample.bflang2 which has a lot of comments how the syntax engine 
works.

The elements in the language file have a 'highlight' property, and in 
the top of the language file the highlight property is linked to a 
textstyle. This can be changed by the user. If you have three 
'highlights' for variable's, the user can change in the preferences 
which textstyle they are linked with (all the same or all different). 
Each textstyle has a font style, weight and fg/bg color which again can 
be set by the user (look in the preferences panel).

To make all languages look similar there is a textstyle 'value' for 
example. If you change that, the color of value's is changed in all 
supported languages. If you need more textstyles with a good 
argumentation we can add them. The best way to start is to give each of 
the elements first a different 'highlight'.

Does my explanation make sense for you?

Olivier
-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-users" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/

Harvey S. Frey | 9 Nov 2011 19:01
Picon

Re: perl syntax

Hi Olivier:

    There is no file named "sample.bflang2" in the download.

    Of the *.bflang2 files I have looked at, none has any explanatory comments at all.

    But, I think you've given me what I need. :-) What I missed was that the "styles" which are undefined in the bflang2 files refer to the styles defined in the preference panel. I can play around with that.

    I assume that I can define new highlight names ad lib, but not new style names.

    I'm not sure there are enough unused style names to accommodate 3 variable types and 3 string types.
It would be nice if we had variable1, variable2, variable3, string1, string2, and string3.
Perl actually has a 4th variable type, one with no prefix, used eg for filehandles.

    Thanks for your help!

Harvey

On 11/9/2011 12:12 AM, Olivier Sessink wrote:
On 11/09/2011 02:38 AM, Harvey S. Frey wrote:
I just downloaded Bluefish, and it seems very nice, but the syntax
highlighting for perl is poor.

I'd like to have different colors for different variable types ( <at> , %, $)
and different quote types (' ', " ", ` `).

The instructions in the manual seem to refer to a different version than
2.0.3 I downloaded.

I found a perl.bflang2 file in the share subdirectory, but I have no
idea how to change it. I don't see colors mentioned in it anywhere.

Is it documented somewhere?

look at sample.bflang2 which has a lot of comments how the syntax engine works.

The elements in the language file have a 'highlight' property, and in the top of the language file the highlight property is linked to a textstyle. This can be changed by the user. If you have three 'highlights' for variable's, the user can change in the preferences which textstyle they are linked with (all the same or all different). Each textstyle has a font style, weight and fg/bg color which again can be set by the user (look in the preferences panel).

To make all languages look similar there is a textstyle 'value' for example. If you change that, the color of value's is changed in all supported languages. If you need more textstyles with a good argumentation we can add them. The best way to start is to give each of the elements first a different 'highlight'.


Does my explanation make sense for you?

Olivier

-- ============================= Harvey S. Frey MD PhD JD hsfrey-FhXRvTsqfPI@public.gmane.org www.harp.org ------------------------------ Obama campaigned on a pledge to close down the jail at Guantánamo Bay, and to end the use of military commissions. How is it possible that, two years after he was elected, there are still more than 150 prisoners there, and this November, one of them will go on trial before one of those very commissions? =============================
Harvey S. Frey | 9 Nov 2011 20:40
Picon

Re: perl syntax

Hi again Olivier:

    OK, there are plenty of unused text style types which I could adapt for the needed perl syntax.
The problem is that they would retain their original names in the preferences panel.
So, for instance, in order to change the color of a hash variable, you would have to know to change, say, foldheader, in the preference panel. Not at all user-friendly! :-)

     I see no way to change the names used in the preference panel. Apparently they're not defined in a file. (It would be nice if the user could specify the language, and the panel could show the 'highlight' names from the relevant bflang2 file.)

    I realize that the preferences apply to all languages, so can't be tailored for perl.

    Can we at least have variables 1-4, strings 1-3, and brackets 1-3 added to the preference panel?

    Actually, the string and bracket types are probably sufficiently general across languages that they could be given more descriptive names.

Harvey
==========================================

On 11/9/2011 12:12 AM, Olivier Sessink wrote:
On 11/09/2011 02:38 AM, Harvey S. Frey wrote:
I just downloaded Bluefish, and it seems very nice, but the syntax
highlighting for perl is poor.

I'd like to have different colors for different variable types ( <at> , %, $)
and different quote types (' ', " ", ` `).

The instructions in the manual seem to refer to a different version than
2.0.3 I downloaded.

I found a perl.bflang2 file in the share subdirectory, but I have no
idea how to change it. I don't see colors mentioned in it anywhere.

Is it documented somewhere?

look at sample.bflang2 which has a lot of comments how the syntax engine works.

The elements in the language file have a 'highlight' property, and in the top of the language file the highlight property is linked to a textstyle. This can be changed by the user. If you have three 'highlights' for variable's, the user can change in the preferences which textstyle they are linked with (all the same or all different). Each textstyle has a font style, weight and fg/bg color which again can be set by the user (look in the preferences panel).

To make all languages look similar there is a textstyle 'value' for example. If you change that, the color of value's is changed in all supported languages. If you need more textstyles with a good argumentation we can add them. The best way to start is to give each of the elements first a different 'highlight'.

Does my explanation make sense for you?

Olivier

-- ============================= Harvey S. Frey MD PhD JD hsfrey-FhXRvTsqfPI@public.gmane.org www.harp.org ------------------------------ Obama campaigned on a pledge to close down the jail at Guantánamo Bay, and to end the use of military commissions. How is it possible that, two years after he was elected, there are still more than 150 prisoners there, and this November, one of them will go on trial before one of those very commissions? =============================
Olivier Sessink | 10 Nov 2011 00:02
Picon
Gravatar

Re: perl syntax

On 11/09/2011 07:01 PM, Harvey S. Frey wrote:
> Hi Olivier:
>
> There is no file named "sample.bflang2" in the download.

in the source download it is in data/bflang/

in the packages it is usually installed in /usr/share/bluefish/examples/

> But, I think you've given me what I need. :-) What I missed was that the
> "styles" which are undefined in the bflang2 files refer to the styles
> defined in the preference panel. I can play around with that.
>
> I assume that I can define new highlight names ad lib, but not new style
> names.

correct, we try to keep the number of styles limited so all the 
languages will have a similar look.

> I'm not sure there are enough unused style names to accommodate 3
> variable types and 3 string types.
> It would be nice if we had variable1, variable2, variable3, string1,
> string2, and string3.
> Perl actually has a 4th variable type, one with no prefix, used eg for
> filehandles.

to stay close to the other names, string-special and variable-special?

Olivier
-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-users" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/

Olivier Sessink | 10 Nov 2011 00:09
Picon
Gravatar

Re: perl syntax

On 11/09/2011 08:40 PM, Harvey S. Frey wrote:
> Hi again Olivier:
>
> OK, there are plenty of unused text style types which I could adapt for
> the needed perl syntax.
> The problem is that they would retain their original names in the
> preferences panel.
> So, for instance, in order to change the color of a hash variable, you
> would have to know to change, say, foldheader, in the preference panel.
> Not at all user-friendly! :-)

it's designed the other way around. In the language file you specify a 
highlight called "hash-variable" with textstyle "variable".

Now a user can do two things: change the color of 'variable', but that 
will make all instances that use style 'variable' changer their color. 
But a user may also go to the perl preferences, and make 'hash-variable' 
use a different textstyle than 'variable', e.g. 'value'. And at that 
point the hash-variable becomes different from another variable.

> I see no way to change the names used in the preference panel.
> Apparently they're not defined in a file. (It would be nice if the user
> could specify the language, and the panel could show the 'highlight'
> names from the relevant bflang2 file.)

the textstyles are user defined (so a user may add or delete 
textstyles), but the initial values are hardcoded in bluefish.

the assignment from highlight to textstyle is also user defined, but the 
initial values are defined in the language file.

which element is using a highlight is defined in the language file and 
cannot be changed by the user.

> Can we at least have variables 1-4, strings 1-3, and brackets 1-3 added
> to the preference panel?

do you have a suggestion how they should look (initially)?

> Actually, the string and bracket types are probably sufficiently general
> across languages that they could be given more descriptive names.

true, I'll update c.bflang2 so we have a good example.

Olivier

-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-users" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/

Olivier Sessink | 10 Nov 2011 00:10
Picon
Gravatar

Re: perl syntax

On 11/10/2011 12:02 AM, Olivier Sessink wrote:
> On 11/09/2011 07:01 PM, Harvey S. Frey wrote:
>> Hi Olivier:
>>
>> There is no file named "sample.bflang2" in the download.
>
> in the source download it is in data/bflang/
>
> in the packages it is usually installed in /usr/share/bluefish/examples/

and on-line it is here:
http://bluefish.svn.sourceforge.net/viewvc/bluefish/trunk/bluefish/data/bflang/sample.bflang2

Olivier

-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-users" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/

Harvey S. Frey | 10 Nov 2011 05:52
Picon

Re: perl syntax

Olivier:

    Using x-special would be OK if there were only one extra type, but in perl there are at least 4 variable types and 3 string types, and help to keep them distinguishable would be very helpful.

    You've already started down path of numerical names with "tag, special-tag, special-tag2 and special-tag3", so we wouldn't be breaking precedent here by doing the same with variables and strings.

    Or, you could avoid numbers if you wanted to use names for constructs not available in all languages, like "arrayVariable, hashVariable, scalarVariable", and "quoteString, doublequoteString, backquoteString". People using languages without those constructs could just ignore them. Most of your styles are unused as it is.

    BTW, there is no 'examples' subfolder in the ./share/bluefish subfolder, nor anywhere else in my download that I can see.

Harvey

   

On 11/9/2011 3:02 PM, Olivier Sessink wrote:
On 11/09/2011 07:01 PM, Harvey S. Frey wrote:
Hi Olivier:

There is no file named "sample.bflang2" in the download.

in the source download it is in data/bflang/

in the packages it is usually installed in /usr/share/bluefish/examples/

But, I think you've given me what I need. :-) What I missed was that the
"styles" which are undefined in the bflang2 files refer to the styles
defined in the preference panel. I can play around with that.

I assume that I can define new highlight names ad lib, but not new style
names.

correct, we try to keep the number of styles limited so all the languages will have a similar look.

I'm not sure there are enough unused style names to accommodate 3
variable types and 3 string types.
It would be nice if we had variable1, variable2, variable3, string1,
string2, and string3.
Perl actually has a 4th variable type, one with no prefix, used eg for
filehandles.

to stay close to the other names, string-special and variable-special?

Olivier

-- ============================= Harvey S. Frey MD PhD JD hsfrey-FhXRvTsqfPI@public.gmane.org www.harp.org ------------------------------ Obama campaigned on a pledge to close down the jail at Guantánamo Bay, and to end the use of military commissions. How is it possible that, two years after he was elected, there are still more than 150 prisoners there, and this November, one of them will go on trial before one of those very commissions? =============================

Gmane