Ace Editor Editing existing mode

87 Views Asked by At

i want to edit/update existing ace editor coding language. i want to make curly braces act like block(not comment block) same as begin end; keywords.

i managed to change curly braces. i make them have keyword.control class/token but between curly braces editor still act as comments. how can i fix this this is only the begining i want to change keyword procedure to void so when user write void it will act like procedure.

I dont want to create new custom mode i want to edit existing one

editor demo screenshot

Code: Code Download Link

Rule Object: A text file contains rule object

  • Removing comment block for curly braces "{" "}"
  • Adding new block keyword: Curly Braces "{" "}"
  • Between curly braces shouldn't act like comments
  • New keyword should be added "void" will act same as "procedure" keyword

thanks for viewing this post. i really need help.

1

There are 1 best solutions below

0
YellowAfterlife On

Unless you absolutely have to, I would recommend borrowing the code from an existing mode into a new one - there's an amount of preprocessing that happens when a mode is loaded so trying to hack into it afterwards doesn't work as well as one might think.