Emacs c ++ reference document

I use emacs as C, C ++ ide.

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

Please let them know how to do this.

BT

+7
source share
6 answers

I use the following line in the .emacs file to automatically show the help page for function c under the cursor when I press F1 (of course, it is assumed that you have the developer pages installed):

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

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

+3
source

Mx man must work on Linux systems to read the manual pages installed in standard places.

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

Information pages explain in detail. Mx info , m emacs , m man page .

+2
source

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

After installation, you can use: man std :: string or something else and directly view the cpp link.

Other stand-alone reference formats are also available here: http://en.cppreference.com/w/Cppreference:Archives

Hope this helps.

+2
source

CClookup will do exactly what you want.

+1
source

I also ran into the same problem as you and I find the emacs extension for functions that help me check the cpp document. its extension name is cppref, this is the github address for this package: https://github.com/realfirst/cppref

you can bind a key (e.g. F1) to a function or call it via M + cppref. I wish you a pleasant experience.

0
source

Add this code to the emacs configuration file. this code will add the [Ch d] key binding to c-mode and C ++ - mode.

 (dolist (hook '(c-mode-hook c++-mode-hook)) (add-hook hook (lambda () (local-set-key (kbd "Ch d") (lambda () (interactive) (manual-entry (current-word)))) ) ) ) 
0
source

All Articles