Emacs as a C/C++ Editor/IDE (Part I): auto-complete, yasnippet, and auto-complete-c-headers

Emacs as a C/C++ Editor/IDE (Part I): auto-complete, yasnippet, and auto-complete-c-headers. Installation and all the tricks.

.emacs file is available at: http://barisyuksel.com/cppmode/.emacs
package versions are available at: http://barisyuksel.com/cppmode/package_versions.png

or you can pull/clone it from github:


ömer ekmekci says:

It is not defined in the .emacs file you uploaded. How can i define package-list-packages method in .emacs file?

林野 says:

I am a new guy in emacs and gcc, may I ask the meaning of last bar “-” in command “gcc -xc++ -E -v -“? Thank you very much

Joris Vial says:

It looks like so easy when you see that kind of video.
Many thanks ! :D. Let’s see the other parts !

Nikhil says:

It is showing me 2 yasnippet one by gnu and other by melpa.

Gilbert Wong says:

Thanks ! It’s really helpful.

Arjun Muthukrishnan says:

Instead of restarting emacs, eval-buffer could be used. It is much simpler IMHO. And a great tutorial BTW. Thanks

Legend says:

Reis fenerli misin ? 😀

Anes Lihovac says:

Nicely done!

Ayush Rastogi says:

thanks for sharing mate ,

Nathan Moreau says:

If I can make a suggestion: add (install-package XXX) for every package you install, in the .emacs file. This way, most things set up nicely when you change the machine you work on.

Polikarpov Mosca says:

Where it fails to me is to locate the header files. Dammit: Seems like every tutorial for Emacs is done in bloody Mac! I added /usr/include as I though it was the default for Linux, but no luck. Tried every directory I could think and nothing….

Carlos Linares Lopez says:

This is awesome! Thanks a lot for these videos … I followed them all but I wanted to show my gratitude in the first one! Awesome!!

Karthik Ramakrishnan says:

Hi yuksel.

Great video. I am using emacs 24.3.1. However, when I add the add-hook ‘c++-mode-hook, this disables the auto-complete. Any ideas?


Othmane Qadiri says:

where did you type the gcc -xc++ -E -v command???

najeh mchirgui says:

Thanks you so much

marc5278 says:

how can I install the where the header are in windows to make auto-complete-c-header work?

Bruce Ree says:

This initially took me hours to do but could now do it in minutes. Emacs requires some much patience

孙航 says:


sniperscout91 says:

Thank you very much! 🙂

Matthy says:

you made my day !

Sagres d'Amor says:

Good. No unnecessary “errs” and “basically ” which drive be nuts… 🙂 not sure you need to add the require statements for packages you install using the awesome package manager though. Just (package-initialise).

Husain Alshehhi says:

Very helpful! I am not sure of the difference between flymake and flycheck though.

Rich san says:

Thank you very much.

Meshuggah Meshuggah says:

eline ağzına sağlık ne zaman emacs hakkında sıkışsam senin videolarına bakıyorum

xF22Raptorx says:

YEAH!!! Thank you!!!!

Damien Cassou says:

Great video thanks! Pay attention when you speed up video because it becomes less clear if autocomplete is used to go fast or if this is just a video trick. Other than that: awesome work

tibener says:

Ellerine saglik hocam.

Ali GOREN says:

İşime yaradı 🙂 Teşekkürler 🙂

ibouvousaime says:

the link on the description to the .emacs file doesnt seem to work, if youre looking for that file you can get it here https://github.com/byuksel/Emacs-as-a-C-Cplusplus-Editor-IDE-settings/blob/master/.emacs

Karthikeyan Sivaraj says:

This has helped me a lot. Thank you so much.

Anıl Hakan Yarıcı says:

“Oğlum bu ne lan adam Türk gibi konuşuyor” dedim, kanalın adına bakınca gördüm Türk’müş. 😀 Hocam güzel anlatmışsın. Ağzına sağlık. <3

Don Ramanayake says:

A truly great video — many thanks and much appreciated!

brucetopher columbus says:

you’re going too fast man

Srikanta Chaitanya says:

great videos thank you……..

HolyReality says:

Can this be considered as an IDE for C/C++? Is it better than VS? Does it have compiler and output screen built in it?Can I use Emacs like Visual Studio as in  write code-compile-see the result on output screen?

najeh mchirgui says:

Thanks you so much

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!