Skip to main content

Questions tagged [syntax-highlighting]

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

When I open up neovim on my raspbian device the syntax highlighting works perfectly well. As soon as I use the screen command (to create a multi-paned setup) nvim becomes black and white. Colors ...
Sambews's user avatar
0 votes
0 answers
68 views

im using an arch linux variant with xfce, opening up a terminal shell and running sudo nano .bashrc I can see the file is colorized despite there being no headers referencing a schema. Looking inside ...
Rachel1983's user avatar
1 vote
0 answers
30 views

I can't get the JOE editor to highlight tags like due:YYYY-MM-TT for due dates or rec:NP for recurrences to work; I was able to highlight prioritized tasks though. A sample todo.txt looks like this: ...
montionoimi's user avatar
0 votes
2 answers
122 views

Sciancisco and I developed a syntax highlighter for the Groff markup language to be used with Gedit, Pluma, Xed etc. I installed it in /usr/share/gtksourceview-4/language-specs/groff.lang and it ...
Daniel's user avatar
  • 432
1 vote
1 answer
123 views

In my ~/.vim/vimrc, I have: set shiftwidth=4 set tabstop=4 and when I edit a plain text file, that is respected. However, when I edit a CMake file - these both becomes 8. I tried looking for the ...
einpoklum's user avatar
  • 11.1k
0 votes
2 answers
1k views

Here's an image: Every time I type something with a leading tab, I get this obnoxious green/teal background until I type a value in for that line. Also, for some reason on line 27, the color I ...
fmotion1's user avatar
0 votes
1 answer
109 views

I'm trying to unhighlight string if one of the quotes is escaped. sh.nanorc regex is as follows: color brightyellow ""(\\.|[^"])*"" I'm having success with the closing quote ...
Multifix's user avatar
  • 145
0 votes
1 answer
396 views

I sometimes cat a c file or a JSON file, there is no colorful format text. Is there any command line tool that can show colorful format text as it is in ex: gedit?
Mark Kang's user avatar
  • 975
0 votes
1 answer
782 views

So, I used batcat to syntax highlight a file in the terminal. After I close it through Ctrl + C, my cursor stops blinking and I cant see the text I type in my terminal. Error
lunix's user avatar
  • 129
0 votes
1 answer
256 views

I've a strange problem with vim editor: if i write a simple text, all is normal, white text If i add shebang, save and exit...reopen and ..color change after first line! :(( Can you help me?! Thanks ...
ancoling67's user avatar
0 votes
1 answer
174 views

The last two array expansions don't get proper highlighting: This is the setting in sh.nanorc that defines it: # More complicated variable names; handles braces and replacements and arrays. color ...
Multifix's user avatar
  • 145
-1 votes
2 answers
322 views

When I open the file /etc/login.defs on a RHEL 8.3 system, it looks like this: As you can see, it highlights the content. But when I open the same file in a Ubuntu 20.04 system, there is no ...
Fajela Tajkiya's user avatar
0 votes
0 answers
115 views

I like how nano highlights bash scripts and I often use GNOME terminal's "Copy as HTML" option to copy/paste the color highlights to LibreOffice when writing documentation. That works fine ...
A. Que's user avatar
  • 673
1 vote
0 answers
170 views

I'm writing a simple vim syntax file for random note takings for work. I would like to color filenames according to $LS_COLORS. I can prefix a filename in the notes file with something random, like '·'...
japh's user avatar
  • 11
1 vote
0 answers
188 views

I adopted printing solution from https://unix.stackexchange.com/a/20448/9689 : vim -c 'hardcopy > /path/to/saved.ps' -c 'quit' /path/to/file Problem is, when I have this file opened in VIM and I ...
Grzegorz Wierzowiecki's user avatar
1 vote
1 answer
545 views

I was wondering if anyone could tell me if it possible to configure syntax highlighting in .nanorc so that in the following text ... Dim s$ = "foo ' bar" ' bar "foo" ... the ...
Tom Williams's user avatar
2 votes
0 answers
222 views

I am working on a new project that saves data in an XML format but does not use the XML file extension. As such, whenever I open the file in gedit I have to go and set the manually set the highlight ...
Olumide's user avatar
  • 177
2 votes
1 answer
392 views

This might be considered abuse by some, but perhaps I (and others) can learn something here. I'm using vscode and recently when editing a crontab file I was annoyed that there was no syntax ...
glaux's user avatar
  • 121
0 votes
1 answer
168 views

I can get source highlighting to work with lesspipe or GNU source-highlight, but both depend on environment variables that are specific to less. How would I get syntax highlighting in most?
xuq01's user avatar
  • 109
1 vote
1 answer
1k views

I want to get Kate to highlight files ending in .jinja2 as html. As described here, I tried adding *.jinja2 to the markdown/html mime type using settings, but even after closing/reopening Kate, the ...
Stonecraft's user avatar
9 votes
3 answers
15k views

I am looking for a program like cat but with syntax highlighting. As an example I would like to display the content of one of my Python script highlighted in the terminal without using a pager like we ...
user avatar
1 vote
1 answer
2k views

In ZSH, when I'm trying to cd into a directory and use tab to get the list of directories, some of them have this very bright green highlight. I noticed that the background highlight is the same as ...
abhijeetviswa's user avatar
2 votes
1 answer
171 views

I use Geany (v1.123.1), my favourite text editor for code editing, as it's nice and simple. One thing which it doesn't do right is the syntax highlighting of comments, in erb files (a type of ruby ...
Max Williams's user avatar
  • 1,167
0 votes
0 answers
389 views

I'm using Gnome Xed text editor. Is there a way to auto select all occurrences of currently selected-text across the document. If Xed cant do it, what other linux text editor can do it ? How ?
sten's user avatar
  • 103
1 vote
1 answer
517 views

When I less /some/file.ext, I get syntax highlighting by /usr/bin/lesspipe. Unfortunately, the colors are annoying and have poor visibility on my distro, by default - it's Devuan 3.0. My question: ...
einpoklum's user avatar
  • 11.1k
3 votes
3 answers
837 views

The source-highlight package is installed on my system. It highlights files I view with less using /usr/bin/lesspipe and LESSOPEN environment variable. Now, I want to change the color scheme this ...
einpoklum's user avatar
  • 11.1k
5 votes
1 answer
5k views

I use nano as my standard editor for a file type it has no build in syntax-highlighting for LilyPond. It is nothing I really need, though I'm missing out quite a lot of white-space characters at the ...
nath's user avatar
  • 6,104
4 votes
1 answer
476 views

Sometimes I write a long command in Zsh, or rather, a Zsh command ending with a long string literal containing code for another language like R or Perl, and I lose track of my parentheses, square ...
Kodiologist's user avatar
1 vote
1 answer
119 views

I'm looking for a Debian editor with syntax highlight for the DOT language.
GattoVizzato's user avatar
-1 votes
1 answer
68 views

I'm on Oracle Linux. [root@ol76 systemd]# cat /etc/*release* Oracle Linux Server release 7.6 NAME="Oracle Linux Server" VERSION="7.6" ID="ol" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.6" ...
Just a learner's user avatar
0 votes
1 answer
291 views

Running a minimal ISO of CentOS_7 I've tried writing a .sh script using vi but can't get syntax highlighting to work. Pressing escape and typing :syntax on as shown in articles like this one are not ...
Alex Ritchie's user avatar
1 vote
1 answer
754 views

While I was working on the terminal (mac os) I pressed wrong combo then the 'def' word highlightend. I found it is very useful. How to turn on and turn off highlight on a word? (shortcut key, no ...
DGKang's user avatar
  • 121
1 vote
2 answers
623 views

Is there an easy way to make whois queries from the terminal have syntax coloring in the output so it would be easier to read? Something basic like coloring NOT FOUND in red, and field names and ...
Lassi's user avatar
  • 891
3 votes
2 answers
4k views

I noticed that when I open a file like ~/.bashrc in Vim as root, the syntax highlighting (SH) when editing a bash script as normal user (blue for comments, orange for keywords, red for numbers, etc.) ...
Stefan Hamcke's user avatar
3 votes
1 answer
265 views

I have a script the aim of which is: For a list of files, obtain a specific number for each file (this is sequencing data, to be specific) and store these into array1 Using array1, find the smallest ...
mf94's user avatar
  • 229
2 votes
1 answer
477 views

Highlighting in vim: distinguish the lines with comment delimiter followed by special string In some cases, for example with the scripts for HPC clusters, when using SGE, TORQUE or Slurm we can have ...
myradio's user avatar
  • 333
17 votes
2 answers
12k views

I have seen some screenshots where ranger uses syntax-highlighting in its preview window. So I was wondering how to enable this feature and found out that I need the scope.sh file in the directory /...
PatrickSteiner's user avatar
-2 votes
1 answer
994 views

Ubuntu, RaspBian and FreeBSD offer the user to choose editor on first crontab -e execution, so I selected Nano Editor. But syntax highlighting seems not be enabled. I tried the same parameter I use ...
Sopalajo de Arrierez's user avatar
3 votes
3 answers
2k views

I am creating multiple files (.school_aliases and .git_aliases) to put my aliases in for organization. However, Vim doesn't highlight syntax for these files automatically like for .bashrc or ....
Kevin's user avatar
  • 139
4 votes
1 answer
2k views

The syntax highlighting option in a cgit installation is no working properly and I want to see if it will run properly from the command line if all the necessary parameters are present. The option in ...
vfclists's user avatar
  • 7,919
0 votes
2 answers
195 views

Is it possible to have vim highlight folds differently depending on whether every line in a fold is only comments or whitespace? In that case, how?
nijoakim's user avatar
  • 291
0 votes
2 answers
628 views

There are a large number of not very helpful answers on this question all over the place. I have tried several. Some would require me to change settings on each remote machine I access. Some promised ...
LShaver's user avatar
  • 103
1 vote
0 answers
404 views

I'm running Linino on my Arduino Yun and I'm trying to enable Python syntax highlighting when using nano. I've looked under /usr/share but there's no nano folder there. Ctrl+G from inside nano just ...
ad01's user avatar
  • 11
0 votes
1 answer
330 views

how can I highlight the iterator of a for loop? for example, in: for (int iter=0; iter<test; iter++) array[iter][5] = array2[iter] & (array[iter] < test2) end I want every instance of ...
Nben's user avatar
  • 103
7 votes
4 answers
13k views

I would like to change the way I display a big (~6000 lines) log file using wim, less or whatever, in order to simplify the problem checking. I'd like to highlight some line of the log based on a ...
Peppe's user avatar
  • 191
1 vote
0 answers
194 views

For gedit, I'm creating a custom syntax highlighter for a markup-like language that I created to accomplish some natural language manipulation stuff, so I thought I'd get started with the simple ...
Alex Clough's user avatar
6 votes
1 answer
1k views

I'm using prezto framework for zsh and started wondering if I really need zsh. Main features I really enjoy are: syntax highlighting for commands, fancy prompt when in a git repository and the ...
Somebody still uses you MS-DOS's user avatar
8 votes
2 answers
5k views

I have a folder with subfolders that contains text files. Every now and then I run a script that makes a copy of that folder tree and then creates a new one with fresh info. After that, having the ...
Tulains Córdova's user avatar
3 votes
1 answer
143 views

For example, when using ack to search code in source files, the output is high lighted. But if you pipe the output into a local file, you lose the code high light. Do we have a command line tool to ...
JACK M's user avatar
  • 133
3 votes
1 answer
1k views

By default when a new document is opened in Kate, the highlighting is set to normal, i.e. none. Is there any way to change this behavior, with a result that when a new "untitled" document is opened C ...
Spencer Brown's user avatar