Questions tagged [syntax-highlighting]

Questions about the feature of syntax-highlighting (where code structure is made visually prominent) in software such as text-editors and integrated development environments (ide).

63 questions
241
votes
15 answers

How do I enable syntax highlighting in nano?

Can nano do syntax highlighting like gedit and vim? How can I enable it? I need at least bash and python syntax highlights.
Oxwivi
  • 17,589
  • 53
  • 136
  • 197
27
votes
4 answers

Can I set a default syntax highlighting in Gedit?

Until you save a document in gedit, syntax highlighting is turned off. There are obviously good reasons for this -- people might get confused if certain words were randomly showing up in different colors. But for my purposes, I use gedit almost…
Michael Martin-Smucker
  • 6,572
  • 4
  • 29
  • 57
24
votes
2 answers

How do I add a syntax highlighter format to Gedit?

How can I add in the regular expressions for an additional syntax language?
700 Software
  • 2,187
  • 4
  • 23
  • 29
12
votes
1 answer

How to change the default highlighting of gedit for a specific extension

Everytime I open a .m file, gedit associates Octave highlighting to it. I would like to change the default behavior to Matlab. How can I, in general, change the default highlighting that gedit gives to a file associated to one extension to another…
adn
  • 251
  • 5
  • 23
10
votes
2 answers

Is there syntax highlighting for psql?

Is there some setting or package that I could use to give syntax highlighting to psql (the PostgreSQL shell)?
tutuca
  • 2,612
  • 5
  • 30
  • 39
9
votes
1 answer

Create a custom syntax highlight in gedit

Following my question from long ago, I am still trying to tweak my fortune handling capabilities. The display in terminal is awesome, just one thing remains - syntax highlighting in Gedit as I add, edit or delete individual fortunes. My custom…
Parto
  • 15,027
  • 24
  • 86
  • 114
7
votes
1 answer

Swift syntax highlighting in gedit?

I do not see an option for Swift highlighting in the gedit language menu. How can I get gedit to highlight Swift code for me?
taylor swift
  • 442
  • 1
  • 3
  • 17
6
votes
1 answer

Syntax Highlighting vi editor

How to enable syntax highlighting features in vi editor ? I am currently using ubuntu 16.10. Here is the output of vi --version. VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 22:32:42) Included patches: 1-1829 Extra patches:…
Kaushal
  • 73
  • 1
  • 5
6
votes
3 answers

How to set nano default syntax highlighting for files with no extension?

I'm trying to set a 'default' syntax highlighting scheme for nano when I'm editing files with no extension such as /etc/nginx/sites-available/default or /etc/ssh/sshd_config but I can't seem to make it work. I've copied the c syntax highlighting…
AJB
  • 187
  • 1
  • 1
  • 10
6
votes
4 answers

How do I enable syntax highlighting for groovy in Vi?

I was using Fedora for about six months, and recently switched to Ubuntu. Here in Ubuntu, there is no code/syntax highlighting for groovy in Vi editor, which was actually there in Fedora Vi. How to enable that?
Ant's
  • 3,780
  • 16
  • 36
  • 50
5
votes
2 answers

How to use pygmentize automatically with less

I found pygmentize thanks to this answer, but it would be great if it could be used to highlight text with less or maybe replace the command. Is there a way to do that? Thanks in advance.
Alter Lagos
  • 1,119
  • 2
  • 14
  • 29
5
votes
2 answers

Syntax highlighting with less, trouble with lexer

I have installed python-pygments and using it for syntax highlighting with less as described by mankoff here I put a function in my .bashrc cless () { pygmentize -f terminal "$1" | less -R } it is enabling syntax highlighting with less. But…
sourav c.
  • 44,037
  • 20
  • 101
  • 128
5
votes
1 answer

How to add a new language definition for syntax highlighting in Gedit?

I've attempted to create a new .lang file for getting Gedit to recognize the Julia programming language. I have read the tutorial, the reference document and the wiki page Gedit/NewLanguage, and I believe the file to be correct. However, upon…
waldyrious
  • 2,189
  • 2
  • 21
  • 36
4
votes
1 answer

How can I tell Gedit which syntax highlighting to apply?

For some godforsaken reason, Twig files in our source code are saved with a .html extension, instead of a .twig extension. I followed guidelines to add custom highlighting to Gedit, and the Twig highlighter I found does attach to .html files (with…
TRiG
  • 1,960
  • 2
  • 18
  • 39
4
votes
1 answer

Highlight search results in GNOME Terminal?

Is there a way/plugin to highlight the searched strings in GNOME Terminal on Ubuntu (When using Ctrl+F or similar keys)? Not just a single result, but all which appear inside the window?
valk
  • 417
  • 5
  • 14
1
2 3 4 5