Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [highlighting]

The tag has no usage guidance.

1
vote
1answer
24 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 ...
1
vote
1answer
43 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 ...
1
vote
0answers
299 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 ...
0
votes
1answer
24 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.
0
votes
1answer
826 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 ...
4
votes
1answer
625 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 ...
0
votes
1answer
351 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
0answers
102 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 ...
0
votes
1answer
1k views

How to highlight certain word? [duplicate]

How do I highlight certain word using the cat command on the terminal?
0
votes
1answer
3k 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 ...
-3
votes
1answer
2k 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
3
votes
2answers
360 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 ...
1
vote
2answers
447 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.
0
votes
3answers
548 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 ...
1
vote
0answers
54 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 (...
1
vote
1answer
241 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: ...
3
votes
1answer
177 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 ...
0
votes
1answer
240 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 ...
1
vote
0answers
211 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. ...
5
votes
2answers
2k 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' \ ...
3
votes
2answers
1k 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 ...
5
votes
1answer
2k 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 ...
3
votes
4answers
158 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 ...
2
votes
1answer
959 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. ...
2
votes
1answer
1k 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 ...
0
votes
1answer
526 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 ...
2
votes
2answers
773 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 ...
10
votes
2answers
26k 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 ...
2
votes
1answer
4k 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 ...
0
votes
1answer
71 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 ...
2
votes
2answers
465 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?
1
vote
4answers
3k 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/...
14
votes
4answers
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. ...
10
votes
3answers
1k 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 ...
42
votes
4answers
12k 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 ...
2
votes
1answer
505 views

Vim Highlight only the characters, which produce comments

I am trying to achieve the following. If I have a file, e.g. a tex document and I want to have the following with commenting characters (% symbols) highlighted: % Some text and end of the ...
6
votes
6answers
5k 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 ...
11
votes
7answers
9k 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 ...
252
votes
19answers
174k 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 ...
6
votes
1answer
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 ...
4
votes
3answers
4k 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 SciTe/Scintilla based Text-editor), allowed me to create a custom "Language", and now, in Linux, I ...
120
votes
11answers
38k 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 ...