Skip to main content

Questions tagged [highlighting]

The tag has no usage guidance.

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

Highlight the cursor of current directory in different color with respect to cursors higher and lower in the file system tree

I am using ranger for a few days now which I find a great piece of software and I was wondering if it possible to set the highlighting of the cursor to a different color for the one poiting to the ...
ecjb's user avatar
  • 445
0 votes
1 answer
149 views

How to identify PDF pages that contain highlighted text via command-line

Assume a pdf document that contains text highlights on pages 1, 3 and 14. Is there a Linux command-line tool (or a set of tools whose output can be piped to each other) that can report the page ...
Michael Gruenstaeudl's user avatar
1 vote
2 answers
382 views

Random freezes, pointer moves, no response to clicks

Why is my laptop freezing? Screen randomly freezes, I can move pointer but no response to clicking. Cannot alt-tab through windows. This happens in firefox and chromium. Ran memtester, all ok. Set FF ...
QRP's user avatar
  • 31
2 votes
1 answer
530 views

Tmux vi copy mode selection - character under cursor is not highlighted

If I switch to copy mode in tmux (vi mode), and begin selecting text using v, the character that is directly under the cursor is never highlighted properly even though it is selected (i.e. if I copy ...
WalksB's user avatar
  • 145
-1 votes
2 answers
222 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 ...
Fajela Tajkiya's user avatar
1 vote
1 answer
956 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 ...
Doc999tor's user avatar
  • 111
18 votes
3 answers
3k 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 ...
xpt's user avatar
  • 1,644
5 votes
1 answer
2k 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 ...
Ranel Padon's user avatar
1 vote
1 answer
230 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 ...
jos's user avatar
  • 111
1 vote
1 answer
128 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 ...
Quasímodo's user avatar
1 vote
1 answer
240 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 ...
Elie's user avatar
  • 23
-1 votes
1 answer
47 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" ...
Just a learner's user avatar
1 vote
1 answer
498 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 ...
DGKang's user avatar
  • 121
1 vote
1 answer
402 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 ...
JammingThebBits's user avatar
1 vote
0 answers
2k 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 ...
hk56740's user avatar
  • 11
0 votes
1 answer
67 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.
Mil's 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 ...
user261502's user avatar
4 votes
1 answer
3k 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 ...
Juicy's user avatar
  • 3,945
4 votes
1 answer
1k 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 ...
vfclists's user avatar
  • 7,619
1 vote
0 answers
466 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 ...
user208145's user avatar
  • 2,525
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?
John's user avatar
  • 1
7 votes
1 answer
6k 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 ...
k0pernikus's user avatar
  • 15.7k
-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
Tom Scott's user avatar
  • 475
6 votes
2 answers
838 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 ...
deltaray's user avatar
  • 1,397
2 votes
2 answers
2k 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.
Philip Kirkbride's 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 ...
sidd's user avatar
  • 1
1 vote
0 answers
67 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 (...
pseyfert's user avatar
  • 888
2 votes
1 answer
697 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: ...
Kira's user avatar
  • 4,835
4 votes
1 answer
430 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 ...
Seratio's 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
243 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. ...
grish's user avatar
  • 219
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' \ ...
bongbang's user avatar
  • 541
4 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 ...
ybaylav's user avatar
  • 131
8 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 ...
Leonardo's user avatar
  • 183
3 votes
4 answers
339 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) [email protected]: user ...
rubo77's user avatar
  • 29.4k
2 votes
1 answer
2k 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. ...
blarg's user avatar
  • 1,605
2 votes
1 answer
3k 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 ...
eephyne's user avatar
  • 203
0 votes
1 answer
733 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 ...
Loom's user avatar
  • 3,963
3 votes
2 answers
2k 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 ...
Question Overflow's user avatar
20 votes
2 answers
36k 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 ...
B Faley's user avatar
  • 4,353
3 votes
1 answer
7k 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 ...
g4ur4v's user avatar
  • 1,764
0 votes
1 answer
96 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 ...
MD. Mohiuddin Ahmed's user avatar
2 votes
2 answers
582 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?
Forethinker's user avatar
  • 1,399
4 votes
4 answers
6k 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/...
ben's user avatar
  • 151
14 votes
4 answers
11k 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. ...
Frank's user avatar
  • 2,791
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 ...
kjo's user avatar
  • 15.6k
52 votes
5 answers
16k 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 ...
Paolo's user avatar
  • 1,535
9 votes
7 answers
10k 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 ...
dogbane's user avatar
  • 30k
14 votes
7 answers
16k 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 ...
l0b0's user avatar
  • 51.8k
323 votes
24 answers
274k 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 ...
Amir Afghani's user avatar
  • 7,283