I edit my configuration offline the routeros, so syntax highlighting would be a good help.
I use notepad++ and this morning made a “user defined lang” highlighting schema for .rsc files. I attach it (zipped).
Sure it’s not perfect, but if anyone has better editor with routeros syntax, let me know!
Thanks dtoffo for sharing! I took me a bit to figure out how to add it to Notepad++ amongst all the menus. In case anyone wants to know: Click View > User-Defined Dialogue > click Import button
I’ve made some improvements to the colour scheme (matching what’s in winbox) and added a bunch more keywords; do you mind if I upload a copy of my modified version here and host another one on my website?
Post it for us and put where you want: there’s no copyright nor any other restriction.
just I think it will be good to update this thread for anyone searching it on mikrotik forum
I would really like to try this tool, but, I download Notepad++ and try to install the user defined .xml file here , but there is NO entry in the View Menu for User-defined dialouge…
THere are many many entries in that menu…just not THAT one…I am using ver 6.22
Hi,
my editor of choice is VIM and here’s my VIM syntax file based on dtoffo’s work.
Linux HowTo:
create your own syntax repository
[b]mkdir -p ~/.vim/syntax[/b]
and copy there “rsc.vim”, then edit
[b]~/.vim/scripts.vim[/b]
and add lines to let vim recognize them.
Just in case this is your first custom syntax file here’s the content for a minimal scripts.vim file:
[b]" Vim support file to detect file types in scripts
"
" first line check
let s:first_line = getline(1)
" Mikrotik RouterOS script
if s:first_line =~ "^#.* by RouterOS"
setfiletype rsc
endif
unlet s:first_line[/b]