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?
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top