What are the alternatives to vi's command :hi Comment in Emacs?

  • Thread starter Thread starter heartless
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around finding alternatives in Emacs to the vi command :hi Comment, which highlights comments in a text. Participants also touch on the possibility of turning off background highlighting completely in Emacs.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification

Main Points Raised

  • One participant seeks an alternative to the vi command :hi Comment in Emacs.
  • Another participant asks for clarification on what the vi command does, specifically noting it highlights comments in a text.
  • A different participant explains that in Emacs, .el (elisp) files can be used to enable highlighting, mentioning specific examples like matlab.el for MATLAB commands and built-in support for languages like C++ and LaTeX.
  • This participant also notes uncertainty regarding highlighting in plain text files, suggesting the use of the Options button for global highlighting but questioning what would be highlighted in a standard .txt file.

Areas of Agreement / Disagreement

The discussion does not appear to reach a consensus on a specific alternative to the vi command, and multiple viewpoints regarding highlighting in Emacs are presented.

Contextual Notes

There is uncertainty regarding the capabilities of Emacs for highlighting in plain text files, and the discussion does not resolve whether the proposed methods would achieve the desired effect.

heartless
Messages
220
Reaction score
2
Hello,
I'm looking for an alternative of vi's command: :hi Comment... in Emacs,
anyone knows?

p.s Is there a method to turn off background complitely in Emacs?

Thanks,
 
Computer science news on Phys.org
What does the vi command do?
 
oh, sorry for not mentioning. It highlights all the comments in a text.
 
In emacs you generally have .el (elisp) files which, as one option - stuff will appear as buttons at the top of your window, allow you to highlight...

eg. If you have the matlab.el file, you can highlight all the MATLAB commands...

Also lots of these will be built in (with the emacs compilation), eg. global highlighting for c++ (.cc) files and .tex files + executables .sh

Plain text though, I'm not sure...

Assuming it's .txt, hit the Options button at the top of the window and switch on the global highlighting - though I can't think what it would highlight in a standard txt file?
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
6K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
4K