Tag Info

Hot answers tagged

35

The nano editor provides syntax highlighting for a few languages and scripts by itself. Check out /usr/share/nano/ nits@nits-excalibur:~$ ls /usr/share/nano/ asm.nanorc fortran.nanorc man.nanorc ocaml.nanorc ruby.nanorc awk.nanorc gentoo.nanorc mgp.nanorc patch.nanorc sh.nanorc c.nanorc groff.nanorc mutt.nanorc ...


14

You can at least add file extensions in the html syntax coloring scheme by editing html.lang in /usr/share/gtksourceview-2.0/language-specs/ as a super user. So say you want to add HTML syntax highlighting to cfm files, you'd change this <property name="globs">*.html;*.htm</property> (default html.lang) into this <property ...


5

Gedit (the default text editor) using GTKSourceView for it's syntax highlighting. It uses XML files to define how to highlight different syntax. There is a tutorial and a reference document on the GTKSourceView site. Finished source file definitions are stored in /usr/share/gtksourceview-2.0/language-specs/, you might want to check them out to learn by ...


4

You can create your own language definition files in your $HOME directory. Editing the gtk language specs is not recommended as it will be overriden by every gtksourceview update. Copy your language specs file to your home directory: $ cp /usr/share/gtksourceview-3.0/language-specs/html.lang ~/.local/share/gtksourceview-3.0/language-specs/ Then, add ...


2

I got the github link to work. The steps I took was the following: Copy the files to a folder. smarty.lang smarty.xml smarty.sh Navigate to the folder with the cd command in a terminal. Make smarty.sh executable chmod +x ./smarty.sh And finally install it! ./smarty.sh


1

I assume you are talking about gedit (labeled as "text editor" in the ubuntu menu). Here is everything you need to know. Basically you have to create a new language definition for GtkSourceView, which is the syntax highlighting component used by gedit.


1

I don't know of an existing highlight for C# in Nano but you could write your own. The syntax for syntax highlighting is pretty simple. Here's the one for Java (which will be very similar to a C# syntax - mainly just different keywords): ## Here is an example for Java. ## syntax "java" "\.java$" color green ...


1

to enable syntax highlighting in vim you have to enable it thrugh vimrc. add syntax on to your vimrc. here is the typical script for groovy. I donot know if it is compatible with vi or not because I am also novice to vi/vim. You can install the full vim with sudo apt-get install vim


1

i really really really like geany, however it doesnt really provide the kind of answer you're looking for. iSeth's suggestion is close to the best in my opinion, but doesnt really tell you how to use it. you may have already figured it out, but like most applications, vim accepts in put from STDIN, so you can pipe supported source files to it. I created an ...


1

I do not know why your original julia.lang file is not working since you're not showing the source, but the one you based on matlab.lang will not work because there's no context inside <definitions> with the same id you mentioned for <language>. Basically, you're saying the id of this language is julia, but there is no context with that id being ...



Only top voted, non community-wiki answers of a minimum length are eligible