How can I enable automatic code suggestions in eclipse for c++? - c++

I've decided to use eclipse as my primary IDE for c++ coding but I can't seem to figure out the automatic autocomplete. When I press ctrl + space it shows them just fine but not when I'm typing normally. I tried browsing through the settings but in content assist setting under auto-activation it only has checkboxes for ., ::, and -> triggers and not for letters, numbers and parentheses. I tried browsing around the web and all the solutions were for the java version of the eclipse IDE, not the c++ one.

I do not think it is possible with the C++ editor. As you described, automatic trigger for content assist only works after typing ., -> or :: (if enabled) and there is no way to make it work for other combinations. See the dialog below:
As you mentioned, Ctrl + Space can always be used to manually launch the tool, but I understand it can become annoying.
So to answer your question: No, it is not possible (for C++).

Related

How to ignore django expression errors in VS Code js file?

Is there any way to ignore these kind of errors (django expressions)? The code works perfectly, but VS Code is triggering those errors, which I find visually distracting.
You just need to install an extension that provides language support for Django templates. Go search for one that works for you on the Visual Studio Marketplace or in the extensions view of VS Code.
I'd list some extensions on the marketplace, but in the interest of being non-biased and not having to come and maintain a list when new ones come out in the future, I won't. (There's also the fact that Stack Overflow is not a platform for software recommendations (see #3 of /help/on-topic)).
Now, if you really just want to disable problem highlighting, see How can I easily toggle display of problem underlining in VS Code editor panels?

How to override semantic highlighting in C++ Visual Studio Code

I've been trying to create a vscode theme for a couple of weeks, and everything is working out pretty well, except that something called "Semantic Highlighting" keeps overriding my theme's configurations.
Now there are a lot of questions and solutions regarding this already, but none seem to make a difference. I like semantic highlighting, but there ARE some colors I would like to modify.
I couldn't find a way to "override" the semantic highlighting with my theme configurations, so I tried disabling it by:
theme.json: "semanticHighlighting": false"
and
settings.json: "editor.semanticHighlighting.enabled": false"
But none of them make a difference.
To keep it simple, I would like to keep semantic highlighting turned on (if possible) and just override some of its coloring with my theme's configurations. I don't want to mess with "semanticTokenColors": {} since my target scopes are really specific and semanticTokenColors only offer to modify a wide range of scopes such as type, string, class, etc...
Is there any way I can achieve this? Thanks in advance.
OS: Windows 11
Vscode Version: 1.73.1 Stable Build
Installed C++ Extensions:
C/C++
C/C++ Advanced Lint
Code Runner
Better C++ Syntax (I've tried disabling this too.)
clangd

Minimum Profit Editor Autocomplete

because of the fact that I am working a lot via SSH I am using an text editor named Minimum Profit (link) its a terminal editor similar to vim, nano or emacs but it uses a lot of modern shortcuts like ctrl-s to save etc.
I am also programming a lot in c++ via terminal.
I have seen some ways so make emacs or vim enable autocomplete for some programming languages such as c++, perl, python etc.
Examples: 1. Emacs, 2. Vim
Heres my question:
Does anyone know a way to achieve this goal in the terminal version of the Minimum Profit Editor?
Other then changing its source code of course.
I am looking for plugins, scripts or fancy configurations to get it working.
My main goal it to have a c++ code completion for commands and object members.
(A linter would also be nice.)
Alternative if there is no easy way, I would also agree to use a similar editor as long as it features all the benefits of Minimum Profit, such as "normal" keyboard-shortcuts, mouse usage, being able to open multiple files at once, selection, copy/paste, git and build support, find and replace and syntax highlighting.
And no switching to emacs or vim is no option.

Source Insight type editor with tabbed windows and dividers?

I really like the set up of Source Insight, it has a context window for one click understanding of function calls and variables, and a relations window for where functions are called in a project and where variables are used in the project.
It is very good for jumping around in a project and understanding the use of variables, but one thing that's missing is tabbed windows and dividers. It is stuck in the one source file, one window phase of IDE development, before tabs and vertical/horizontal dividers got popular.
It is also very good at finding references for variables and functions, much better than code blocks, codewright, and eclipse (really tried all of them).
Does anyone know or have a set up similar to Source Insight but with Tabs and dividers?
Check out this very nice CodeProject: http://www.codeproject.com/Articles/32209/a-File-Switch-Tabbar-for-Source-Insight. Doesn't require any effort, just run the executable, and let it do it's magic.
Keep in mind, it's a very immature project and it might even crash SI if you annoy it (i.e. it might crash if you double click a tab to close it). On the other hand it does the job. I've been using it for over 6 months now, and I've learned how to avoid its touchy parts, and am very happy with it.
Source Insight 4 contains the capabilities you mentioned

Namespace refactoring tool for Eclipse?

I'm doing some housekeeping on some files, and I need to move some classes to a new namespace. Currently I have to manually edit the files, but I was wondering if there's a more efficient way of doing this?
I heard about ReSharper for Visual Studio does what I need, but is there a similar tool for Eclipse?
is there a similar tool for Eclipse?
Nope.
The is no such capability in eclipse until today MARS 8.1 . However, what on can do is to manually search for occurrences of the classes.
Select the class name that you want to refactor and to a File Search within the enclosing project.
From the tabs select "File Search" and then press "Replace ..." , it will find all occurences and let you fill in the replacement text.
Click "Preview" to see what is going to be applied and remove those actions that you do not wish that they be applied by unchecking them.
This should be sufficient. If you are using git you can always do git checkout -b _refactorme to feel safe and then merge your changes. In that manner if something went wrong you can always track the problem e.g. using git blame.
I'm not really sure if Eclipse does that but IntelliJ IDEA (from the same vendor as ReSharper) does have a refactoring to move classes between packages. It is available from Refactor > Migrate menu if I remember correctly.