ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been very unsuccessful in getting autocomplete to work in emacs. I can get the M-/ to work (for general variable completion). I would like to get this type of completion to work:
#include <stdio.h>
int main()
{
pri (hit something to autocomplete to get printf. In MS Visual studio,
I would just hit ctrl-spc)
return EXIT_SUCCESS;
}
I don't know if this is possible in emacs. Hopefully it is.
Thanks
-Mike
By the way, I did a bunch of searches in the manuals and on the web and I have not had any luck.
im not a big user of emacs but i think you need to run etags with the option to go into system header files, then load the tags file into emacs and use M-<TAB> to complete the word.
it doesnt look like there is one(i was only guessing), i think the best solution would be to produce a tags file for each major library you use then if you want to use it in your current project pass the -i option to etags.
I tried etags /usr/include/c++/3.2.2/iostream -l c++ -o ~/iostreamTAG for example , then
etags test.cpp -i iostreamTAG where test.cpp is the program above with cout instead of printf. I am not getting autocompletion .
ive had a quick play with it this morning and have discovered the following,
it doesnt work if you specify -l c++ to etags
by passing --member to etags i can get it to put cin/cout in the tags file but emacs wont autocomplete them
emacs will only autocomplete if im in C++ abbrev mode
sorry i couldnt be of more help but i dont use autocomplete(i can type an identifier quicker than i can press M-<TAB>) Dark_Helmet might know this but i havnt seen him around for a while.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.