I use emacs as my main IDE for programming in C. I am exploring ways of configuring emacs to function more as an IDE rather than as a simple text editor. Of course I want syntax highlighting and preferably some code completion. I also want separate buffers to allow shell commands and to Mx compile. I want it to open into this multi-buffer form automatically when visiting a C source file, rather than having to launch each buffer separately. I will be using this mainly for Linux/BSD Unix development, though I also code on Mac OS X (again Unix) and Windows (Windows 7 64bit).
I explored the Emacs starter kit posted by Phil Hagelberg (technomancy), but it seems very oriented towards dynamic languages and use of git. I use emacs mainly for developing in C and use mercurial for VC. I am also a relative newbie making configuration of emacs relatively daunting for me.
I am now playing with CEDET and the Emacs Code Browser (ECB) package which is more along the lines of what I want, but is still not perfect.
Any suggestions on customizing emacs as a C programming IDE welcome.
It's been a while since I've done C but here are a few pointers.
Mx compile is geared towards make so if you have a Makefile in your setup, it should work fine (the defauly flymake rules use this as well). A rule like this
check-syntax:
gcc -Wall -o nul -S ${CHK_SOURCES}
would take care of flymake. This is useful when you edit in subdirectories but want to compile fromt he top.
git
and so I use magit instead. There should be similar issues with mercurial. Good luck.
Read this excellent guide on how to configure CEDET. I'd also advise you to use cscope and ECB alongside it. As Noufal already mentioned autocomplete and flymake are very helpful. I'd also recommend you autopair mode .
i didn't try out Emacs-IDE but it seems useful and may help you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.