• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Emacs Syntax Highlighting

htmlmasterdave

Golden Member
What's the best way to get syntax highlighting for C/C++ under emacs? I'd mostly be using it through ssh without X... is that possible? I can use X forwarding too, but it might be slow at times.

Thanks!
 
Emacs Syntax Highlighting

If you use Emacs for programming, one very useful feature is syntax highlighting. To get Emacs to highlight properly, you may first need to tell it what language you are programming in; however, if you opened a file with the appropriate extension (i.e.: .c, .pl, etc...), Emacs should automatically go into the correct mode. To tell emacs to go into C mode you would type M-x c-mode. For perl, try M-x cperl-mode. There are many more modes as well. If you're unsure how to get into yours, try typing M-x followed by the beginning of the language name (i.e. ja for java) and pressing tab. Emacs will present you with a list of possible completions. Once you're in the appropriate mode, type M-x font-lock-mode, and it should display the text you're editing with all keywords and expressions highlighted nicely. I have found this to make programming much easier in general, and it also helps in quickly locating syntax errors.

From: here

HTH!
 
Hey thanks! Seems to work nicely using X forwarding 🙂 Is there any way to use it without x forwarding? Doesn't seem to work right now with colour. Thanks again.
 
Beside the GNU Emacs FAQ For Windows 95/98/ME/NT/XP and 2000 at Gnu.org., suggest the ORA's book [Learning GNU Emacs, 3rd Edition] .
 
Back
Top