It is currently Mon Oct 15, 2018 11:41 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Sun Aug 26, 2018 12:00 am 
Offline

Joined: Mon May 25, 2009 2:20 pm
Posts: 64
Hello, i want to ask a question about the text editor called "Sakura Edtior" which is japanese text editing program, i have a english-language plugin added i found from somewhere that translates all the menu's, options and everything to english.

Now, i want to know how i can get this program to label opcodes address'es in color "not black". It's really difficult to find where to look exactly cause this program has hundreds and hundreds of menu's and options. I do know where the color-coding options are, and i've been able to edit most things to my liking like this:

https://i.imgur.com/X7Ay5VU.png

The problem is, numbers do seem to get highlited in red, but only by themself, it doesnt ever happen with $xxx ..if i put a space after the $ sign ...then i'll just only get errors like "incorrct syntax" ..invalid opcode, stuff like that. And it doesnt work either with letters. like 88 will show up red ...but A8 wont.

it's really weird. :( I hope someone understands what im trying to say. I know this is possible with other text editors, just dont know how to do it with "sakura editor" Anyone possibly might know ?

here's 1 more screenshot directly - notice how if i put a space aftr the $ it turns red ..great! ..but if i use a hex number with a letter, only the "3" lights up and not the A0.

But again, spaces are not allowd like this because it'll just complain "invalid opcode" or some message like that.

Image


Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 12:47 am 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 380
My best guess would be the "regex keyword" tab. You'd have to change the regex of the syntax highlighter.


Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 3:52 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 608
If you don't speak Japanese, why are you using a Japanese editor?


Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 6:07 am 
Offline

Joined: Mon May 25, 2009 2:20 pm
Posts: 64
Oh yea i looked at the Regex menu before, and tried like 20 times to type different combinations of letters and numbers but i really dont understand how exactly to use it though. with the /n /k and whatever format it's supposed to be used in.

And to Oziphantom ..i personally liked this type of editor much better than others. i tried out several different kinds before, and i ultimately chose Sakura editor because it's just the most comfortable to me. And besides i have a english plugin attached to it anyways, so all the buttons and windows is in english.
this is where i got it from
https://sourceforge.net/projects/sakura-editor/files/language2/


Last edited by kuja killer on Sun Aug 26, 2018 1:38 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 6:26 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 608
well if you were using it because it has features X, might have been able to suggest something else that will highlight your code and still have feature X...

Regex is a language, you need to think of it like Japanese, and apply time to learn it, it's complicated. It also has a few dialects so you also need to loop up their documentation to find out which dialect they want.


Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 9:36 am 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 380
kuja killer wrote:
Oh yea i looked at the Regex menu before, and tried like 20 times to type different combinations of letters and numbers but i really dont understand how exactly to use it though. with the /n /k and whatever format it's supposed to be used in.


Post a screenshot of that tab.


Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 10:40 am 
Offline

Joined: Mon May 25, 2009 2:20 pm
Posts: 64
Okay - it looks like this by default:
Image

I dont know why the window's kind of cut off like that, but the buttons are:
First, Last, up, down, Insert, Add, Update, Delete


Top
 Profile  
 
PostPosted: Sun Aug 26, 2018 1:13 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3629
Location: Mountain View, CA
The dialog/window "cuts off" because the person who did the "plugin" (it's probably a hack) to convert Japanese text to English didn't change the pre-set size of the window, the buttons, text rendering areas, etc.. In other words, they did a half-ass job.


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 12:09 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 608
ok so Perl form. My Regex tool doesn't actually cover Perl form (which is kinda odd ) but you want something like this

[$][a-fA-F0-9]{1,4}

which means
Match a $
Then match either a,b,c,d,e,f,A,B,C,D,E,F,0,1,2,3,4,5,6,7,8,9 and then you must have at least 1 but not more than 4 ( if you are doing SNES work, change the 4 for a 6 ;) )


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 4:52 am 
Offline

Joined: Mon May 25, 2009 2:20 pm
Posts: 64
Ah wow well it's almost perfect, cant seem to ever make it stop highlighting the dollar sign symbol.

Image

Lots of things i tried after your line
2,4 = no change
3,4 = all the #$xx are no longer highlighted
4,4 = all highlights disappear

placing the {1,4} in the middle between the [$] and [hex number/letter] = only 1 digit/letter gets highlighted including the $ sign

placing the {1,4} at the start "before" the $ and hex = "invalid regex command"

making a new entry with just only [$] and forcing it to black = all highlights disappear


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 4:59 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 608
this is into the "custom extensions that vary per dialect" but try
(?<=\$)[a-fA-F0-9]{1,4}


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 5:12 am 
Offline

Joined: Mon May 25, 2009 2:20 pm
Posts: 64
woooa awesome. that worked. :)
here's 2 more screenshots just want to show. Now all the different types of colors are all perfect.

got light blue for .whatever, dark blue for NES opcodes, red for the $xxxx stuff, dark red/brown for quoted text, green for comments, pink for macro scripts

https://i.imgur.com/HlAwH4J.png
https://i.imgur.com/JhXd8F1.png

thank you very much.


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 5:38 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 608
personally I would recommended coloring

#something and something as different, that way you will easily be able to read and see if you have made the time honored mistake of "forgot the #"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group