Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th August 2011, 15:23   #21  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,391
years later:

you may want to replace lines 9-13 with this:
Code:
<Keywords name="Delimiters">&quot;00&quot;00</Keywords>
<Keywords name="Folder+">Try Catch Function</Keywords>
<Keywords name="Folder-">}</Keywords>
<Keywords name="Operators">- ! $ % ( ) * , . / : ? ^ | + &lt; = &gt;</Keywords> 
<Keywords name="Comment">1 2 0#</Keywords>
to get some colorfully separated numeros.

edit:

here is (my) latest version of the userDefineLang.xml: http://pastebin.com/tpUUd7ep

snap: http://imagebin.org/168107

(a lot of room for improvements)
__________________
certain other member

Last edited by smok3; 16th August 2011 at 16:16.
smok3 is offline   Reply With Quote
Old 11th December 2011, 16:42   #22  |  Link
Fyx
Registered User
 
Join Date: Apr 2002
Posts: 7
I made a ruby blue variant of smok3's latest xml if anyone is interested. The file needs to be renamed to work.
Attached Files
File Type: txt userDefineLang.xml.txt (7.6 KB, 60 views)
Fyx is offline   Reply With Quote
Old 5th March 2012, 02:18   #23  |  Link
r3t3ch
Registered User
 
Join Date: Feb 2012
Posts: 3
Here is an updated highlight scheme for avisynth: http://paste2.org/p/1930937

I updated the filter lists with what I had listed from AvsP and changed the colors to mostly match the default AvsP font and color style. Both avs and avsi extensions are supported.

It is still very limited by being a user defined language instead of an internal lexer.
A Scintilla lexer that is probably much more functional was written about a month ago for notepad2-mod here:
https://code.google.com/p/notepad2-m...ers/LexAVS.cxx

Maybe someone capable of recompiling SciLexer.dll can implement it into Notepad++?
Attached Files
File Type: zip userDefineLang.zip (3.8 KB, 162 views)

Last edited by r3t3ch; 7th March 2012 at 22:47. Reason: Added curly brace folder, missed a function
r3t3ch is offline   Reply With Quote
Old 5th March 2012, 09:00   #24  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,391
notepad mod looks interesting, what exactly is improved?

__________________
certain other member
smok3 is offline   Reply With Quote
Old 6th March 2012, 04:10   #25  |  Link
r3t3ch
Registered User
 
Join Date: Feb 2012
Posts: 3
Quote:
Originally Posted by smok3 View Post
notepad mod looks interesting, what exactly is improved?
That mod is a fork of notepad2, which as far as I know has nothing to do with notepad++. I personally prefer notepad++ as an overall text editor so I am not interested in using notepad2-mod just to edit text of avs. It might be more to your liking though and an internal lexer is still far superior to a user defined language in notepad++.
r3t3ch is offline   Reply With Quote
Old 6th March 2012, 18:40   #26  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 597
@r3t3ch
nice work
btw, after 2.5.8, avisynth can use /**/ to block comment like C.
I consider that it is better to also change this.
Code:
<Keywords name="Comment">1/* 2*/ 0#</Keywords>
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 6th March 2012, 20:01   #27  |  Link
r3t3ch
Registered User
 
Join Date: Feb 2012
Posts: 3
Quote:
Originally Posted by Chikuzen View Post
btw, after 2.5.8, avisynth can use /**/ to block comment like C.
I consider that it is better to also change this.
Code:
<Keywords name="Comment">1/* 2*/ 0#</Keywords>
I originally included this in the comment block section but the problem is that asterisk and forward-slash both need to be excluded from the activated operator list in order for the comment block to recognize them as a symbol.
Doing so would damage the formatting of certain functions, like so:


Considering how infrequently /* */ comment blocks are used opposed to # comment lines, I chose the lesser of two evils. This is among several other imperfections due to the limitations of a user defined language vs an internal lexer.
r3t3ch is offline   Reply With Quote
Old 17th November 2013, 18:14   #28  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 405
http://notepad-plus.sourceforge.net/...nth_syntax.zip

Or the attachment, which includes v2.6 commands (as far as I identified them from the v2.6 change log) plus GRunT+GScript+RT_Stats. Ctrl+B (jump to matching bracket) works also for '{ ... }' in this definition .

It happened to become a bit candy coloured; change that to your needs if you're more the reputable type
Multi line strings are configured to contain identifiers, operators etc. This means: If you find yourself writing multiline strings that are not script commands but contain script syntax, you're misguided. If you write multiline script strings, this setting is helpful.

Oh, installation guide: Open np++, in Menu 'Language' click 'Define your language', 'Import', and pick the XML. You may change the language name "AviSynth" inside the XML in advance to be able to switch between several syntax highlighters at the same time.

EDIT 23. 11.2013 updated syntax file with all AvsPmod functions and user scripts, and folding in multi line strings, more eye friendly colors

Last edited by martin53; 23rd November 2013 at 23:06. Reason: Added syntax definition file
martin53 is offline   Reply With Quote
Old 18th November 2013, 09:26   #29  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 821
for XML language highlighting package. I'm using mostly AvsPmod because of ability to preview scripts in real time but Notepad++ has been my favourite editor since few years now and sometimes it's faster to invoke this for quick/batch editing of AVS file(s)...
kypec is offline   Reply With Quote
Old 22nd November 2013, 08:09   #30  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 405
I do both: typically I use a small .AVI file in AvsPmod for preview, which calls functions from larger function collections or plugin files.
These files (typically >1000 lines) can more comfortably be edited in Notepad++. Preview update then with F5 instead of Esc.
martin53 is offline   Reply With Quote
Old 30th November 2013, 23:13   #31  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Thanks for this, I found a few issues with mp_pipeline's (mpp) syntax:

1. (""" and """) are used to start/end mpp's syntax but all appear as light blue, like they are part of quotes.
2. ### and ### ### are parameter and splitter in mpp, they show as light green like comments.
__________________
PC: FX-8320 GTS250 HTPC: G1610 GTX650
PotPlayer/MPC-BE LAVFilters MadVR-Bicubic75AR/Lanczos4AR/Lanczos4AR LumaSharpen -Strength0.9-Pattern3-Clamp0.1-OffsetBias2.0
turbojet is offline   Reply With Quote
Old 1st December 2013, 16:03   #32  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 405
Hmm, I spent hours to teach notepad++ the triple double-quotes.
For my part, I write many triple quoted script parts like e.g. ScriptClip or GScript. There I want syntax highlighting and folding.

But when I teach notepad++ double-qoutes to be string separators, triple double-quotes are automatically treated as three double-quotes and notepad++ gets confused about what follows.

I found no way to define triple double-quotes as an exception, so I abused the syntax: I defined double double-quotes as an own separator with higher priority than single double-quotes, which ends with a single double-quote, with a comma, a closing brace or end-of-line.

Since you probably know mp_pipeline's syntax far better than me, maybe you like to fiddle a bit with the settings to find a smarter solution. I'm sollr I dont think I'll be able to.
martin53 is offline   Reply With Quote
Old 28th August 2016, 09:42   #33  |  Link
feos
Registered User
 
Join Date: Nov 2012
Posts: 6
Some years ago I also made a highlighter, but forgot to post it anywhere, even though someone added it to http://avisynth.nl/index.php/Syntax_...x_Highlighting

Here it is: https://sourceforge.net/projects/feo...g.xml/download

I also couldn't make it properly recognize /* */ as comments, has that been solved by anyone yet?
feos is offline   Reply With Quote
Old 28th August 2016, 10:18   #34  |  Link
AzraelNewtype
Registered User
 
AzraelNewtype's Avatar
 
Join Date: Oct 2007
Posts: 127
Not sure where it goes in the xml, but by the time you've already installed it, go to Language>Define Your Language then do this:



Then of course just give it whatever visual style you want, probably matching the # type. I don't actually remember what the settings were before this, so no idea what you'll see on opening, but this works for both. I mean, obviously, you could also turn on folding of comments too (I did after taking the screenshot).
AzraelNewtype is offline   Reply With Quote
Old 28th August 2016, 11:01   #35  |  Link
feos
Registered User
 
Join Date: Nov 2012
Posts: 6
Thank you, finally it's working!
feos is offline   Reply With Quote
Old 13th September 2016, 08:04   #36  |  Link
anonymlol
Registered User
 
Join Date: Apr 2013
Posts: 17
I'll post mine, too. I customised it for the Obsidian theme because it's easier on the eyes.

It looks like this:
Attached Files
File Type: zip userDefineLang (for obsidian theme).zip (2.4 KB, 32 views)
anonymlol is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.