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

  • Thread starter Thread starter heartless
  • Start date Start date
AI Thread Summary
In Emacs, to achieve functionality similar to vi's command ":hi Comment," which highlights comments in a text file, users can utilize built-in highlighting features for specific file types like MATLAB, C++, and LaTeX. Emacs supports global highlighting for these file types through configuration files such as .el (elisp). For plain text files, while there is an option to enable global highlighting, the specific elements highlighted may be limited due to the nature of plain text. Additionally, users can inquire about methods to completely disable background highlighting in Emacs, although specific instructions were not provided in the discussion.
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 waht it would highlight in a standard txt file?
 
This week, I saw a documentary done by the French called Les sacrifiés de l'IA, which was presented by a Canadian show Enquête. If you understand French I recommend it. Very eye-opening. I found a similar documentary in English called The Human Cost of AI: Data workers in the Global South. There is also an interview with Milagros Miceli (appearing in both documentaries) on Youtube: I also found a powerpoint presentation by the economist Uma Rani (appearing in the French documentary), AI...
Back
Top