Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs c c++ reference document

Tags:

c++

emacs

I am using emacs as C , C++ ide.

I want to configure emacs so I can read C and C++ APIs (reference library) inside emacs.

Please let em know how to do it.

BT

like image 416
BT.in Avatar asked Feb 13 '11 09:02

BT.in


4 Answers

I use the following line in my .emacs file to automatically show a man page for the c function under the cursor when I push F1 (of course it assumes you have the development man pages installed):

(global-set-key  [f1] (lambda () (interactive) (manual-entry (current-word))))

For example on an Ubuntu linux system, the manpages-dev and libstdc++6-4.4-doc packages contain manpages for the C and C++ standard libraries, respectively. Similar packages exist for other systems, including MacOSX

like image 185
kosack Avatar answered Nov 12 '22 07:11

kosack


Check out the following link, it contains man-pages based on the www.cppreference.com offline archive: https://github.com/jeaye/stdman

After installing, you could use: man std::string or whatever and view the cpp reference directly.

There are also other offline reference formats available here: http://en.cppreference.com/w/Cppreference:Archives

Hope this helps.

like image 29
nenchev Avatar answered Nov 12 '22 09:11

nenchev


M-x man should work on Linux systems for reading the man pages that are installed in standard locations.

If you install the stl-manual for C++, they come in HTML. You could use M-x w3m-browse-url and pass it the file:///path/to/index.html if you want to read the stl-manuals from inside Emacs.

The info pages explain in detail. M-x info, m emacs, m man page.

like image 31
vpit3833 Avatar answered Nov 12 '22 09:11

vpit3833


CClookup will do precisely what you want.

like image 1
Antoine Pelisse Avatar answered Nov 12 '22 09:11

Antoine Pelisse