Questions tagged [syntax-highlighting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
29 views

Why the result of “dir” doesn't have highlighting?

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" ...
0
votes
0answers
31 views

Is it possible to display curly error underlines in terminal vim?

I want to underline errors in vim like in this example gif from the ALE github page. Though as of yet I have only been able to get gVim to display curly underlines. Is it possible to get curly ...
0
votes
1answer
42 views

How to turn on syntax highlighting for vi/vim?

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 ...
1
vote
1answer
27 views

High lighting a word in vim/bash

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 ...
0
votes
0answers
22 views

Emacs launched from command line and standalone Emacs have different syntax highlighting when using the same theme (solarized)

I have set export TERM=xterm-256color, however when I launch Emacs in terminal vs. the standalone app the syntax highlighting has different colors. What do I need to do to make them the same?
1
vote
1answer
44 views

Whois queries with color output

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 ...
1
vote
2answers
314 views

Syntax highlighting in Vim turned on for user, but off for root

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.) ...
0
votes
0answers
218 views

Bracket matching highlighting in Nano

In nano, we can enable bracket matching via these lines in ~/.nanorc: set brackets ""')>]}" set matchbrackets "(<[{)>]}" Once this put in the config, pressing Alt] while on a bracket will ...
3
votes
1answer
80 views

Using a bash array in an awk and also quoted variable: conflicting syntax issue

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 ...
2
votes
1answer
77 views

Highlighting in vim: distinguish the lines with comment delimiter followed by special string

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 ...
3
votes
1answer
2k views

How to enable syntax highlighting in ranger preview?

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 /...
-2
votes
1answer
243 views

How can I get syntax highlighting on CronTab when using Nano as Editor?

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 ...
1
vote
2answers
151 views

Setting Vim to use shell syntax for dotfiles?

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 ....
2
votes
1answer
370 views

How can I run the syntax-highlighting.sh command for cgit to check it works properly?

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 ...
0
votes
2answers
46 views

Vim — Syntax highlighting depending on whether whole line is commented

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?
0
votes
2answers
207 views

What settings to change on my local machine for syntax highlighting on all remote machines?

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 ...
1
vote
0answers
220 views

OpenWrt Linino - Enable syntax highlighting in nano

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 ...
0
votes
1answer
115 views

vim - highlight for loop iterator

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 ...
0
votes
0answers
26 views

GtkSourceView lang file is loaded but nothing gets highlighted

I want to create a custom lang file for source highlighting in gedit etc. Before I start, I cloned an existing file for testing purposes, /usr/share/gtksourceview-3.0/language-specs/imagej.lang and ...
3
votes
4answers
4k views

Shell - Customize the color of each line of a log file based on a pattern [duplicate]

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 ...
1
vote
0answers
92 views

Custom syntax highlighting misbehaving in 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 keywords, seeing ...
4
votes
1answer
310 views

What can bash do: syntax highlighting, git info prompt and autocomplete based on the middle of a word?

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 ...
4
votes
2answers
2k views

Diff patch output saved to a file. How to see it syntax-colored?

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 ...
3
votes
1answer
113 views

command line tool to reserve code high light in output file?

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 ...
2
votes
1answer
456 views

How to set default syntax highlighting in Kate

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 ...
17
votes
3answers
2k views

vim: Force specific syntax via command-line argument

When I want to easily read my PostgreSQL schema, I dump it to stderr and redirect it to vim: pg_dump -h localhost -U postgres dog_food --schema-only | vim - This gives: vim does not have a syntax ...
43
votes
7answers
15k views

Syntax highlighting in the terminal

Lots of programming-oriented editors will colorize source code. Is there a command that will colorize source code for viewing in the terminal? I could open a file with emacs -nw (which opens in the ...
0
votes
2answers
723 views

disable cursor color in putty client ssh terminal when in vi

I use putty.exe in windows 7 to connect to my Linux system. I use vi. I would like the cursor in vi to remain white all the time, and not change to green or blue around my if statement { } brackets ...
3
votes
2answers
780 views

No zsh-syntax-highlighting within tmux

I experience proper zsh-syntax-highlighting (see here) when first opening a shell session, but as soon as I enter tmux, the syntax highlighting no longer appears. I found this Github issue ...
2
votes
1answer
326 views

VIM with Python - Multiple # do not get colored as a comment

Something changed on my system and now VIM screws up syntax highlighting of commented lines. This makes having 'debug' lines very difficult as it looks like the line is still active based on the ...
0
votes
1answer
72 views

syntax highlghting in vim

I have text files which have extensions *.sc. So to make syntax highlighting for some of the keywords in that type of text files I created ~/.vim/syntax/sc.cim. Below is the file content. user $ cd ~/...
4
votes
1answer
1k views

Why does nano sometimes show colors over SSH?

Typically when I'm editing a small file over SSH I'll just open up nano. I look at my apache2 access.log a good bit. Since I don't have fail2ban or anything enabled on this box, I typically look at ...
3
votes
3answers
7k views

.bashrc file syntax error near unexpected token `('

I have been using the following lines in my bashrc file for quite some time now and suddenly now I have an error. Here are the lines: make() { /usr/bin/make "$@" 2>&1 | sed -E -e "s/...
2
votes
0answers
410 views

How to create a Kate highlight syntax to CSV files

I'm working with CSV files and I'm using vim because of the rainbow csv plugin that makes the editing easier: http://www.vim.org/scripts/script.php?script_id=4598 But I prefer using Kate and as I ...
1
vote
2answers
836 views

Color syntax highlighting working on one system but not the others. Same nanorc file

I'm trying to set my color syntax highlighting in nano, but it doesn't work as expected. One system everything works. This is an Fedora 21 laptop. Two systems everything I've tried except man ...
5
votes
1answer
495 views

How to chain multiple LESSOPEN scripts?

Linux distributions nowadays have a default LESSOPEN set to /usr/bin/lesspipe which allows one to easily inspect e.g. zipped files or PDF files. Now I wanted to see whether I can add syntax ...
3
votes
0answers
461 views

.jsf syntax highlighting file (for joe editor)

I am trying to modify the .jsf syntax highlighting file for the joe editor /usr/share/joe/syntax/ini.jsf. This file contains rules for highlithing/coloring ini files. For ini files, anything after ";" ...
0
votes
1answer
193 views

Syntax highlighting and export EPUB format

I need to write RTL format and finaly export as Epub (pdf as freedom).I need to explain my codes and somthing such as syntax highlighting, Do you have any solution? UPDATE: My question has 2 aspect: ...
1
vote
2answers
406 views

Vim syntax highlighting fails with autosession

Since I've installed this VIM autosession manager (which does its job) syntax highlighting gets killed on the first buffer change after starting vim. I can restore it with :syntax on but I would ...
1
vote
0answers
128 views

Can gedit highlight element of svg stucture?

Gedit can show matching parenthesis. Can it do the same with tags of an SVG file ? For example when I mark <text> I need to find closing </text> tag.
2
votes
1answer
2k views

.vimrc does not working as expected

I've been trying new color schemes and I set: colorscheme gotham256 set background=dark set t_Co=256 highlight Normal ctermbg=NONE highlight nonText ctermbg=NONE but these thing doesn'...
4
votes
3answers
5k views

Joe's own editor: changing syntax highlighting

Unfortunately, when I try to edit an XML, trying to read that dark blue against black is murder. I am amazed that Googling "joe editor change highlighting" returns nothing! Is it really impossible to ...
2
votes
0answers
596 views

Highlight linux shell commands

I have a log of new commands I use and my own tips/descriptions with them inside a text file. I noticed there is DOS Batch code highlighting which highlights DOS commands. Is there one for Linux ...
0
votes
1answer
812 views

Location of colorscheme-files in Kate

In Kate one can export file Fortran.katehlcolor which store the information about color in syntax-highlighting. The syntax-highlighting files itself are located in ~/.kde/share/apps/katepart/syntax ...
6
votes
2answers
4k views

How to change default syntax-highlighting for header-file in Kate

Often I have to open header-files (with ending .h) in Kate. The default syntax-highlighting with which these files will be opened is always C++. How could this be changed to Fortran so that I don't ...
5
votes
1answer
733 views

How is `vi` Aware of the Format of Configuration Files?

When I edit configuration files in vi, it seems like vi is aware of the syntax of the file. For example, vi will color tokens one way or another depending on whether its a key or a value. Furthermore,...
2
votes
1answer
818 views

How to give each variable a different color?

Is it possible to have a vim color scheme where each variable is given a unique color? If so, how? This feature would be really helpful when visually scanning code. (I think I saw this feature in ...
2
votes
0answers
557 views

AsciiDoc syntax highlighting plugin for Kate?

I'm looking for a way to add AsciiDoc syntax highlighting to the Kate editor. I haven't found anything yet, but I feel sure some solution exists because AsciiDoc appears to be very popular (and is ...
7
votes
1answer
4k views

How do I stop emacs from colouring the text of the file I am editing?

How do I stop emacs from colouring the text of the file I am editing? I want everything just in plain white. I know that I can load themes, but it's not obvious which theme does what. Can I just ...
7
votes
2answers
9k views

Change directory for Kate syntax highlighting files

I'm running Standard Debian Wheezy with KDE 4.8.4 and Kate 3.8.4. The Kate text editor's syntax highlighting files are located in: /usr/share/kde4/apps/katepart/syntax If I run kde4-config --...