You are not logged in.

#1 2005-03-15 16:37:01

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Editor for ASP with syntax highlighting? (I use Bluefish)

Is there a decent, simple (or not-so-simple) editor for ASP code?  Or, is there a way to get Bluefish to highlight ASP correctly?

Don't suggest VIM.  I love it, but I haven't learned the intricacies of it yet.  smile

And, yes, I apologize for writing ASP...  smile

Offline

#2 2005-03-15 17:29:35

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

JEdit?

Offline

#3 2005-03-15 17:35:59

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

I've just installed JEdit, and it's awesome.  VERY cool.  Through its plugins, it does so much, it's crazy, baby.  smile

Thanks for the suggestion.

Offline

#4 2005-03-15 19:34:14

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

You can also use Scite which is written around the same syntax lexer api
(scintilla) as Jedit. But is has to be configured properly otherwise it becomes rather unuseable.
Unfortunately, it takes a nother degree to configure it properly. I ever wanted to write a wiki, but not enought ime so far ...

-neri

Offline

#5 2005-03-15 22:38:36

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Scite is quite nice as well...and depends on gtk2, which is nice (for me).

I'm gonna look into configuring it more.  It is a bit bare, so far.  smile  Thanks.

Offline

#6 2005-03-18 00:20:28

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Hi,

this is a short introduction, might help at start:

Starts with some generell settings, please note that I just add these
settings to the files in /usr/share/scite, most of the stuff can also be set in
files in your ~. Refer to scite docs for filenames onn that.

SciTEGlobal.properties: general settings which are mostly scattered over
the file. Find the lines and tweak them.

# I like my Scite with tabs and a statusbar, displaying line and column
tabbar.visible=1
tabbar.hide.one=1
tabbar.multiline=1
statusbar.visible=1

#comment out this line to have it displayed under the textfield not besides
#split.vertical=1

#display line numbers (create enough space for 4 digits)
line.margin.visible=1
line.margin.width=4

# ask b4 automatically reload an altered file on disk
are.you.sure.on.reload=1
# show  name and number of my tab in titlebar
title.full.path=1
title.show.buffers=1
# save the buffer state in a file 
and reload on startup
save.recent=1
save.session=1
load.on.activate=1

# allows 25 tabs
buffers=25

# I plain hate tabs and using 8 spaces is waste of place
# converts tab hits to spaces
tabsize=2
indent.size=2
use.tabs=0

# some sane fontsettings: - the ! activates pango -> AA fonts
# sets them all to similar sizes and monospace font
# after the if PLAT_GTK these must be tabs in intendation!
if PLAT_GTK
    font.base=font:!bitstream vera sans mono,size:9
    font.small=font:!bitstream vera sans mono,size:8
    font.comment=font:!bitstream vera sans mono,italics,size:9
    font.code.comment.box=$(font.comment)
    font.code.comment.line=$(font.comment)
    font.code.comment.doc=$(font.comment)
    font.text=font:!bitstream vera sans mono,size:9
    font.text.comment=font:!bitstream vera sans mono,size:8
    font.embedded.base=font:!bitstream vera sans mono,size:9
    font.embedded.comment=font:!bitstream vera sans mono,size:9
    font.monospace=font:!bitstream vera sans mono,size:9
    font.vbs=font:!bitstream vera sans mono,italics,size:9

# uuh, netscape - long time not seen, replce with firefox
if PLAT_GTK
    command.print.*=a2ps "$(FileNameExt)"
    command.scite.help=mozilla-firefox "file://$(SciteDefaultHome)/SciTEDoc.html"

# add a vertical line at column 80
edge.column=80
edge.mode=1
edge.colour=#E0E0E0

go on to html.properties file; to get the advantages you need the php.api
and the phpfunctions.properties from http://scintilla.sourceforge.net/SciTEExtras.html
there you also find api files for ASP

#replace netscape with mozilla-firefox again
if PLAT_GTK
    command.go.$(file.patterns.web)=mozilla-firefox "file:///$(FilePath)"

# load the .api file which I downloaded from the web; it contains, per line, 
# a short explaination of each command
# $file.patterns.php is defined for *.php and friends by file extensions
api.$(file.patterns.php)=$(SciteDefaultHome)/php.api
# the calltips for the hypertext lexer shall not be case sensitive
calltip.hypertext.ignorecase=1
# define how the calltipps should be parsed, the following is the same as
# the standard anyway, but might be overwritten by some people in SciTEGlobal
calltip.hypertext.parameters.start=(
calltip.hypertext.parameters.end=)
calltip.hypertext.parameters.separators=,
# some calltips have an additionally explaination after the final ")"
#   -this makes display them in a second line
calltip.hypertext.end.definition=)

# autocopleter stuff
# defines which type of characters let the autocompletion pop up 
autocomplete.hypertext.start.characters=_$(chars.alpha)
# also the autocompletion should not be case sensitive since, grrr php and html
autocomplete.html.ignorecase=1


# extend the "Extras" menu with some commands
# Tidy Checking
command.name.1.$(file.patterns.web)=HTML Tidy Validate
command.1.$(file.patterns.web)=tidy -quiet -errors $(FilePath)
error.select.line=1

# Tidy Cleanup and indent
command.name.2.$(file.patterns.web)=HTML Tidy Cleanup
command.2.$(file.patterns.web)=tidy -i -wrap 80 -m $(FilePath)
# the executed command alternates the file, so it should be saved b4 and must be
# re-read -> activate are.you.sure.on.reload=1 , makes things easier to handle
#  !!!! THERE IS NO UNDO ON THIS COMMAND !!!!
command.save.before.1.$(file.patterns.web)=1
command.is.filter.2.$(file.patterns.web)=1

# activate a lint checker for php files
command.name.1.$(file.patterns.php)=Check PHP syntax
command.1.$(file.patterns.php)=php -l $(FilePath)

the tidy doesn't work onClick, but it shows you the errors in line and column

some pictures to show stuff:
the gray edge at column 80 and the php-lint checker in action:
php-lint.png

autocomplete code:
autocomplete.png

the calltip, NOTE: it is wrapped after the ) which was our setting:
calltip.hypertext.end.definition=)
and the delimiter , let highlight the the correct argument:
calltip.png

whoever want's jump in and wikify that, go ahead, leave me a note where
I shall help.

-neri

Offline

#7 2005-03-18 06:53:46

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

or just use vim tongue

neri: the wiki is writable by all, you can add it yourself tongue

Offline

#8 2005-03-18 09:29:27

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

iphitus wrote:

or just use vim tongue

neri: the wiki is writable by all, you can add it yourself tongue

I also use vim for many things but I also give lessons in php, html, css, sql
and all this kinda stuff, so SciTE is nice on all plattforms and easy to use
for those "I have a perfect microsoft background" people smile
So It weaked it a bit for my needs.

I know, but to make a real wiki out of it takes time, much time...
We will see smile

-neri

Offline

#9 2005-03-18 10:16:06

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

http://wiki2.archlinux.org/index.php/SciTE

HTH

just got to clean it up  lol


Mr Green

Offline

#10 2005-03-18 13:26:57

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Mr Green wrote:

Thanks, I already cleaned it up a bit, and added some hints and formatting.
Currently the stuff is mainly html/php focused maybe some people can add
some more C/CPP and project based stuff.

For the lazy bummers (/me looks into the mirror...) once I set up a very
tweaked PKGBUILD, which basically makes all the changes, I wanted to
add to SciTE. Cuz of these tweaks, this is not in repos, it's absolutely not
vanilla style. NOTE: this file is work in progress and subject to any changes
of my attitude smile
But definately something to start with.
http://www.justdreams.de/archlinux/downloads/scite/

for downloaders -> DON'T C,n P, use wget or "Save Link as" or you f** up
UTF-8 related entries!
-neri

Offline

#11 2005-03-18 14:20:41

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Thanks, neri, Mr Green.  After using SciTE for a bit and finding it...challenging to configure, I was actually planning on coming back and requesting assistance.  This makes it great for me!!!

Thanks for the time!  smile

Offline

#12 2005-03-19 17:56:01

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Holy Shlamola!  I just used your PKGBUILD (I'm lazy too), and it's amazing.  I had to switch back to english (I just change a couple of lines and rebuilt), but I love scite now.

I don't have the asp working right now, but not a big issue.  I'll fool with it in a bit.

Thanks a bunch!

Offline

#13 2005-03-19 17:59:50

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Just a follow-up...If I add similar stuff to the html.properties file regarding asp, I can get the same drop-downs, etc.???

Offline

#14 2005-03-19 18:30:21

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

beniro wrote:

Just a follow-up...If I add similar stuff to the html.properties file regarding asp, I can get the same drop-downs, etc.???

Well, I'm still not sure if the drop down stuff is realized by the *.api or by the
keywordclass provided in the propertiy class. From the docs I read that the
api file is in charge.
So download the "official" asp.api file from here:
http://www.scintilla.org/asp.api and locate it to /usr/share/scite/asp.api

define the calltips and the autocompletion (I don't code asp so i didn't check that):

# note that *.asp is defined in web int the first line of html.properties
# now this api file is used for filles with extensions known to $(file.patterns.web)
api.$(file.patterns.web)=$(SciteDefaultHome)/asp.api
# same as php stuff, if you already have that - no need to repeat it
calltip.hypertext.ignorecase=1
calltip.hypertext.parameters.start=(
calltip.hypertext.parameters.end=)
calltip.hypertext.parameters.separators=,
calltip.hypertext.end.definition=)

# it is another file pattern, but still the same lexer! So it's still the same
# definition as for php
autocomplete.hypertext.start.characters=_$(chars.alpha)
autocomplete.hypertext.ignorecase=1

see if it works and extend the wiki accordingly.

Maybe it's cleaner to define a pattern for asp, but you'll need to
understand how it works before. I also saw VB api files on the web maybe
you need them  for your ASP. I dunno which language you use.

-neri

Offline

#15 2005-03-19 18:54:03

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Ok, I'll probably get around to this stuff tonight.

Thanks very much, neri...SciTE has become one of my favorie apps.  smile

Offline

#16 2005-03-30 16:19:18

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

Hi,

I probably forgot the most important hack ever smile
apply this somehow to your perl.properties file ....

# automatically highlights PKGBUILD files
sed -i 's|^(file.patterns.bash=.*)r|1;PKGBUILD|' perl.properties

-neri

Offline

#17 2005-04-06 17:59:37

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Editor for ASP with syntax highlighting? (I use Bluefish)

UPDATE:
brought my PKGBUILD to 1.63:

- upstream fontsettings changed to Bitstream Vera sans -> applied 
  sed lines to invoke the monospaced version and to italize the comments
- removed a couple of anyway commented menusettings for languages
- reactivated POV-Ray and Apache conf in menu since it got commented
  in upstream
- for those who want to switch off localization it's just one comment now
- changed order of tweaks to make it more transparent:
  - language specific changes com first
  - followed by SciTEGlobal tweaks at the end

available from:
http://www.justdreams.de/archlinux/downloads/scite/

Have fun with it,
-neri

Offline

Board footer

Powered by FluxBB