2022 Developer Survey is open! Take survey.

Questions tagged [highlighting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
2 answers
47 views

How to enable the highlighting of the file "/etc/login.defs" on Ubuntu?

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 ...
user avatar
0 votes
1 answer
77 views

less a file with JSON rows - how to highlight/colorize the rows?

I have log files with json rows inside - less displays it as just plain text Can I colorize the output with less abilities? As well as I didn't find any less-compatible third party tool with json ...
user avatar
0 votes
0 answers
13 views

Why are identifiers for the id attribute of gtksourcview language and context tags failing?

A perplexing problem. Unlike the documented conventions for id identifiers of gtksourceview only some of the constructs "work". Various identifiers following the rules of engagement failed ...
user avatar
  • 1
5 votes
1 answer
450 views

Current date in cal is not highlighted in recent Debian

As answered in Highlight the current date in cal the current date in output form cal is automatically highlighted (reverse colors) if the output goes to terminal. That's what I had always been ...
user avatar
  • 495
2 votes
1 answer
359 views

Retain selection highlight after copying text to clipboard in tmux

I'm using macOS and tmux 3.1c. When copying a text via mouse selection, the highlight will be auto-cleared after copying the text to clipboard, this will make it difficult to keep track the last line ...
user avatar
0 votes
1 answer
57 views

Kubuntu - Strange Copy-Paste behaviour after upgrade to 20.04

I recently upgraded from 18.04 to 20.04 with Kubuntu. I had to delete Python2 to do it, but it worked. However, since the update, something strange is occuring with the copy paste function. A piece of ...
user avatar
  • 101
1 vote
1 answer
53 views

Custom colors for ls are correctly applied for some categories, but ignored for others

With the help of dircolors, I changed ls colors. My .dircolors file is FILE 00;97 DIR 00;96 LINK 00;95 MULTIHARDLINK 00;34 ORPHAN ...
user avatar
  • 17.3k
0 votes
1 answer
79 views

How to highlight a screen session of an ssh connection?

Others have asked (How to scroll inside a screen session of an ssh connection?) on how to scroll within a screen session. However, while I can highlight what is shown in front of me, I can't figure ...
user avatar
  • 13
-1 votes
1 answer
41 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" ...
user avatar
1 vote
1 answer
73 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 ...
user avatar
  • 121
1 vote
1 answer
229 views

How to configure the "most" pager to highlight all matches on search?

I have been using the "most" pager for couple of years, but when searching and jumping and navigating between the matches ( with n and p ) the cursor is quite small (I barely notice it), so i'd like ...
user avatar
1 vote
0 answers
1k views

Can't highlight words in terminal

I have been using the gnome Terminal for 3 months already, but today I can't highlight the words on the terminal suddenly. I can't do so on nedit as well. When I use the 'find' function in nedit to ...
user avatar
  • 11
0 votes
1 answer
53 views

PDF editor to highlight text on Lubuntu

I would need a PDF editor that works well on Lubuntu to highlight some sections of a PDF and save the changes.
user avatar
  • 101
0 votes
2 answers
2k views

Bash script command to search and highlight text in terminal buffer

I need to simulate selecting (highlighting) text that is in the terminal buffer. It's long past stdout so all the grep/awk/sed/redirection stuff is not relevant AFAIK. Plus I don't want it highlighted ...
user avatar
4 votes
1 answer
2k views

Mouse continues "dragging" or "highlighting" after I release left button

I just moved over to Antergos (Arch-based) from Ubuntu with XFCE and Awesome WM. I use a HP laptop with a touchpad. When I hold down the left mouse button to highlight text or drag an icon, the drag ...
user avatar
  • 3,315
4 votes
1 answer
896 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 ...
user avatar
  • 6,667
0 votes
0 answers
316 views

Highlight specific text in command output, allowing interaction with the command

Is there a grep -like command to highlight specific text in a command's output, but shows all lines irrespective of the presence of the desired text and allows one to interact with the piped(1) or ...
user avatar
  • 2,289
0 votes
1 answer
2k views

How to highlight certain word? [duplicate]

How do I highlight certain word using the cat command on the terminal?
user avatar
  • 1
5 votes
1 answer
5k views

How to highlight entire line on matching a word within the line in egrep? [duplicate]

Currently, I use egrep --color 'error|$' to highlight every word in a line containing the word error: I would like to highlight the entire line though so that the entire string appears in red. How ...
user avatar
  • 13.2k
-3 votes
1 answer
4k views

How to highlight words in a text file [closed]

I would like to highlight particular parts of the text using cat. How is this possible? The answer is cat filename | grep word Thanks for the help
user avatar
  • 435
4 votes
2 answers
688 views

Why does 'cal' use weird 08 / ^H / \b terminal code for highlighting and how does that work?

When you run cal on Linux, the output for the current month will reverse video highlight the current day. When I send that output to hexdump -c, I get some interesting results: 0000000 ...
user avatar
  • 1,183
2 votes
2 answers
1k views

Access highlighted text from script?

Is it possible to access highlighted text via a shell script? I want to make a keyboard shortcut to use 'espeak' to read highlighted text.
user avatar
0 votes
3 answers
2k views

highlighting parameters in with grep

I'm in need of some assistance with using the highlight feature in bash. My goal is to grep three parameters and then highlight them with three different colors. I've been messing around with this ...
user avatar
  • 1
1 vote
0 answers
60 views

highlighting of zsh correction

When zsh's autocorrection suggests a change in long filename, it may be hard to spot which change is actually suggested: The example is of cause artificial as tab completion would've done the job (...
user avatar
  • 738
2 votes
1 answer
480 views

Pattern highlighting command [duplicate]

Folks, I want to know if there exists a command that just highlight some portions of the input text, rather than filtering it like grep does. To give an example, suppose the following input text: ...
user avatar
  • 4,407
4 votes
1 answer
286 views

Highlighting with regex within ssh session?

I'm working with a lot of routers and switches from Juniper, Brocade etc and none of those vendors have syntax highlighting or output coloring. Does anyone know a working solution: how to setup ...
user avatar
  • 41
0 votes
1 answer
243 views

No highlighted selection in Slingshot (Elementary OS Freya)

After logging in, when I invoke Slingshot search for the first time the highlight is there -- and it is very useful when scrolling up and down. But after that it is absent. In all cases except during ...
user avatar
1 vote
0 answers
238 views

visual mode/highlighting/selecting text on uzbl?

Is there a way to do a vim-like visual mode to select text with uzbl? Or any way to select text in uzbl with the keyboard? I installed arch-linux recently, and I haven't gotten my touchpad working. ...
user avatar
  • 211
5 votes
2 answers
3k views

Man page highlight color

To colorize my man pages, I put this code from archlinux.org into .bashrc: man() { env LESS_TERMCAP_mb=$'\E[01;31m' \ LESS_TERMCAP_md=$'\E[01;38;5;74m' \ LESS_TERMCAP_me=$'\E[0m' \ ...
user avatar
  • 531
3 votes
2 answers
2k views

Coloring tail output with perl

tail -f logfile.log | perl -pe 's/.*foo*/\e[1;41m$&\e[0m/g' will color all the lines containing the pattern "foo" in the logfile.log file. How can I make use of this in order to highlight ...
user avatar
  • 111
6 votes
1 answer
3k views

Highlight the current search match in man pages

When I open a man page, for example man chmod and I hit / for searching a string in the page I can see all the matching strings highlighted. Pressing n or N will focus on the next/previous matching ...
user avatar
  • 163
3 votes
4 answers
226 views

colourize the first part of each line

I have some chat logs like: (15:12:56) rubo77: mist migration (15:05:22) hans: ist hugo da? (15:36:13) rubo77: test (13:30:15) rubo77: what are the access data? (15:06:38) someone@jabber.ccc.de: user ...
user avatar
  • 24.7k
2 votes
1 answer
1k views

How to auto highlight comments in nano?

I was wondering how could I make lines commented with a # highlighted in a different colour in nano? I saw this question on askubuntu that shows how to syntax highlight for different languages. ...
user avatar
  • 1,505
2 votes
1 answer
2k views

Can I change tmux status bar color when I hit C-b

I use tmux on the local computer then ssh and use tmux too. I can easily use them both (C-b twice for modifying the second tmux) but for more readability I'd like to highlight the status bar of the ...
user avatar
  • 203
0 votes
1 answer
641 views

Highlight patterns in command output (grep-like but without excluding lines) [duplicate]

I need a command that colorizes some symbol sequence in output of a certain command. I'd like it like grep make it. $ some-command | grep symbol-sequence However grep removed lines that isn't ...
user avatar
  • 3,523
2 votes
2 answers
1k views

How to highlight some text on a man page? [duplicate]

I find the manuals very difficult to read using the terminal. Is there a way to highlight specific text on the terminal? I tried piping to gedit using man man | gedit, but it opens a blank file ...
user avatar
15 votes
2 answers
33k views

How to highlight a word in the output of "cat"? [duplicate]

I can do the following to see if some word is available in the output of "cat": cat filename | grep word This filters the output and shows only those lines which contain "word". Now, is it possible ...
user avatar
  • 3,933
3 votes
1 answer
6k views

highlighting text in shell

I have always been using below method to highlight background of text in shell . tput smso;printf " TEXT ";tput rmso; How can I achieve the same thing without using tput( I mean some way formatting ...
user avatar
  • 1,584
0 votes
1 answer
76 views

What is this feature in Linux 'to highlight characters' with QT?

Recently I came across this site. It says, in Linux with QT, it is possible 'to highlight characters' by pressing ShiftCtrl {Left,Right} or Shift {Left,Right}. Could somebody please explain this ...
user avatar
2 votes
2 answers
547 views

mark or color empty directories for `ls`

ls's -F flag allows to see the types of file and distinguish directories. Is there a way to add a functionality to distinguish an empty directory?
user avatar
  • 1,289
4 votes
4 answers
5k views

No syntax highlighting when editing crontab

I am trying to figure out why I don't have syntax highlighting when editing my crontab. I have both $EDITOR and $VISUAL set to /usr/bin/vim: > echo $EDITOR /usr/bin/vim > echo $VISUAL /usr/bin/...
user avatar
  • 151
14 votes
4 answers
10k views

Command that highlights regex in text?

Is there a command that highlights a certain expression in text? I'm looking for something like the 'search' function in less, but with normal text output on stdout, instead of the less viewer. ...
user avatar
  • 2,731
11 votes
4 answers
2k views

syntax_highlight <source_file> | lpr

Does anyone know of a simple way to produce the PostScript corresponding to a syntax-highlighted version of a source file that can be piped directly to a PostScript printer? As the wording of the ...
user avatar
  • 12.8k
46 votes
5 answers
15k views

How can I display syntax highlighting on a file?

Is there a variant of cat that outputs syntax-highlighted lines of code when used on a source file? An idea: maybe vi[m] or another editor can be asked to dump the syntax-highlighted contents of said ...
user avatar
  • 1,375
7 votes
7 answers
8k views

Highlight the current date in cal

I would like to highlight today's date in the output of the cal command. What is the best way? This is what I have so far: cal -m | grep -C6 --color "$(date +%e)" but it doesn't work for all cases ...
user avatar
  • 26.9k
14 votes
7 answers
13k views

`highlight` command

Is there a command which can be used to easily highlight (with colors, bold text or inverted back-/foreground) specific strings in stdin while passing the entire string to stdout? I'm thinking of ...
user avatar
  • 46.9k
309 votes
23 answers
245k views

How to have tail -f show colored output

I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I setup ...
user avatar
  • 6,583
6 votes
1 answer
2k views

Text editor with font-size selection for specific human languages (ie. Unicode Block) eg Devanagari

Pre Linux, I used Windows.. (too many years in the wilderness :) ... however there was a ray of sunshine in amongst all the general virus/re-install flack.. and that was Notepad++, a text Editor I ...
user avatar
  • 31k
4 votes
3 answers
5k views

In SciTE (Scintilla), how can I create Syntax-Highlighting for my own custom language?

I want to create a custom Language, with its own custom Syntax Highlighting. Notepad++, a Windows-only SciTE/Scintilla based text editor, allowed me to create a custom "Language", and now, in Linux,...
user avatar
  • 31k
148 votes
13 answers
66k views

Convince grep to output all lines, not just those with matches

Say I have the following file: $ cat test test line 1 test line 2 line without the search word another line without it test line 3 with two test words test line 4 By default, grep returns each line ...
user avatar