How to configure emacs? Thank!


 
Thread Tools Search this Thread
Top Forums Programming How to configure emacs? Thank!
# 1  
Old 06-15-2007
How to configure emacs? Thank!

I am using emacs to write c++ code. How to configure it to let the system highlight C++ keywords, variables, etc; and let it automatically indent, just like a common C++ IDE does?

Any suggestions? Thanks!
# 2  
Old 06-16-2007
emacs

thereis on need to programm emacs. normaly it detects c-code while loading a file.
You can also choose C-mode manual using meta-x.

Syntax-highlightning is normaly enable but can add several level. (read docs).

If you are not handy with emacs you may try xemacs, that is a bit simpler for beginners.
You can alway use your prefered indent level. like here:

(defun linux-c-mode ()
"C mode with adjusted defaults for use with the Linux kernel."
(interactive)
(c-mode)
(c-set-style "K&R")
(setq tab-width 8)
(setq indent-tabs-mode t)
(setq c-basic-offset 8))
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to use emacs? Also how to open existing emacs files with .cgi format?

Hi All, I am new to this forum and a beginner in unix. Please correct me if I put the question in a wrong way.. How to use emacs editor? Also how to open existing emacs files with .cgi format? I have the following link :- http link i.e. url and path : /abc/xyz.dev/xyz/documents What... (7 Replies)
Discussion started by: swathi123
7 Replies

2. UNIX for Dummies Questions & Answers

Trying to compile in Emacs

I'm trying to compile two files in Emacs (guess.cpp and yesno.cpp). So I open up Emacs (the text version) and give the command M-x and then I try to type in "g++ -o asst guess.cpp yesno.cpp". But everytime after I type "g++" and try to do a space after that, it says and wont let me type a space? ... (1 Reply)
Discussion started by: blackvelvet
1 Replies

3. UNIX and Linux Applications

Help configuring emacs

Hi, I am using emacs now after some months with vim (nothing agains vim, in fact I love it, but everyone around me is using emacs and xemacs) and I need some configuration help. How may I configure emacs to look like code examples in this page which is good for my eye. Thanks in advance, ... (0 Replies)
Discussion started by: faizlo
0 Replies

4. UNIX for Dummies Questions & Answers

characters in emacs

How do you change characters in emacs? for example, I would like my files to appear written in "Arial" or "Thaoma".. (1 Reply)
Discussion started by: vero_81
1 Replies

5. UNIX for Dummies Questions & Answers

Emacs

could someone please tell me how do I work emacs on unix?? how do you input the command and open up files and edit stuff. I know M-x info will lauch the info viewer, C-x u is undo, M-x spell-region run a spell check but when i use some of these command on emacs in Unix, I'm getting no results or... (1 Reply)
Discussion started by: starwind4
1 Replies

6. UNIX for Dummies Questions & Answers

accent in emacs

Hello, I try to insert charcheters with accent with emacs. It doesn't work. How can I do ? Thank you in advance (2 Replies)
Discussion started by: annemar
2 Replies

7. UNIX for Dummies Questions & Answers

Help on EMACS

Any one has a good documentation on How To Use EMACs editor?? Thanks Ven :eek: (4 Replies)
Discussion started by: VENC22
4 Replies

8. UNIX for Dummies Questions & Answers

Xemacs and emacs

Hi guys What is the difference between Xemacs and emacs. I assumed Xemacs runs only in X11. What about in Linux on KDE? Am I running Xemacs or emacs. Well it says emacs though. What is the advantage of one over other? What can I run on OS X ? SS (5 Replies)
Discussion started by: saurya_s
5 Replies

9. UNIX for Advanced & Expert Users

ftp in Emacs

Hi How can I do ftp using emacs. I strart the function by M-x ftp. It connects to the server where I can see the list of files. how can I do put or get there? Thanks SS (1 Reply)
Discussion started by: saurya_s
1 Replies

10. UNIX for Dummies Questions & Answers

eMacs FontFace

Hi, I am working with xEmacs 21.1 patch 14. I see I can configure it to be very User Friendly. I can highlight variables, color them, and actually make it look like a Visual IDE. How do I configure it? How do I color Variables in one color, and make them bold, and how do I change the... (1 Reply)
Discussion started by: sierra_aar
1 Replies
Login or Register to Ask a Question