I know, I know, I should ask this on the C::B forums, but they're down, so I can't. Right, question: I use Code::Blocks as IDE for C++, but it kind of annoys me how it deletes unneccesary tabs on empty lines every time I save. So, is it possible to turn that of, so those tabs can stay there, and I don't have to add them again every time I save? Thanks in advance.
- bonjorno7
Setting -> Editor -> Uncheck 'Strip trailing blanks' would do it, but also means you might have extra whitespace at the end of lines.
Related
When I type '#' vscode suggests "#pragma region" and "#pragma endregion". I never use those snippets and the suggestions can be quite annoying especially if I intend to navigate using arrow keys after typing '#'. I figured out that the suggestions come from snippets in the built-in extension "C/C++ Language Basics". Disabling that extension is not an option because syntax highlighting goes away with it.
Individual snippets may be disabled by opening the command palette (ctrl+shift+p), typing "insert snippet", pressing enter, and clicking with the mouse on the pictogram of an eye with a line over it thus removing the line.
I don't know how to do the last part without a mouse. If you know please comment.
I want PhpStorm print -> always, when I insert just - (so no need for Shift + .)
Is there any build-in solution? If no, probably someone can suggest a software for Ubuntu, that would do the trick.
Is there any build-in solution
Yes, but it works only after $this.
For other object instances watch https://youtrack.jetbrains.com/issue/WI-28351 ticket (star/vote/comment) to get notified on any progress.
Possible workaround -- record a macro that will type -> and assign a shortcut to it. Then just use that when you need typing ->. No other bright ideas (using IDE functionality only).
Basically, I want ReSharper's intellisense to work a lot like IntelliJ's, where all I have to do is press enter. I hate having to press down when selecting a option that's the first on the list and pressing enter, its slower than actually typing it out.
See this
This is really what I needed but in a different question, more of like a switcherooni :\ really wish this was pointed out better..
I NEED to turn off auto-indent on Eclipse for C/C++ coding. It DRIVES ME NUTS to be fighting with the editor constantly for the position of the text cursor.
This is a common question, but the standard answer does not appear to work on Kepler with C/C++ extentions, so perhaps it got "unfixed"???
The standard answer I saw was to go to preferences->C/C++->editor->typing and uncheck "automatically indent" new lines and braces.
The behavior is that entering new line causes the cursor to be aligned on the new line with the block above. I want newline to end up flush left.
Thanks,
Scott Franco
Try per project settings.
C/C++ General > Formatter > Edit...
Indentation Tab
Uncheck everything.
or
Eclipse wide
Window > Preferences
C/C++ > Code Style > Formatter > Edit...
Indentation Tab
Uncheck everything.
You can't unless you join the dev team http://www.eclipse.org/cdt/developers.php and make the change yourself.
The answer is: its a feature, notgonna fix it. It happens even if you call up a plain text editor. Eclipse has bugs filed against it by others that turned into long arguments. The developers went google on it [1]
[1] "went google": Our way or the highway. We are smart, you don't work at google, so obviously you are not. Next.
VS2013 has added auto-formatting for C++. My personal opinion on auto-formatting is that it's ultimately harmful for developers but I have to accept not everyone agrees. What bugs me is that I can't seem to disable auto-formatting completely. I have unchecked every checkbox under Tools->Text Editor->C/C++->Formatting->General yet when I type:
void f ()
VS2013 replaces this with
void f()
That's not the code-standard in this specific project which means I have to go back and insert a space. There are other examples where I have to fight against VS.
I don't want to change the spacing settings because
I work in multiple projects with different code standards
I don't believe in auto-formatting so I just want it to get out of my way
I just want VS to not modify my code automatically.
PS. I am not against that VS can format code but I want to invoke that manually
You can turn off automatic C / C++ /C# code formatting by going to the Options dialog from the Tools menu, selecting the Text Editor → C / C++ / C# → Formatting → General page, and unchecking all the boxes there. You'll still be able to manually format when all of the auto-formatting settings are turned off.
I know this isn't exactly the answer you're looking for, but you can preserver that void f () formatting if you go to Tools > Options > Text Editor > C/C++ > Formatting > Spacing and under Spacing for function parantheses you check the option Insert space between function names and opening parentheses of argument list.
I also had this problem and unchecking all the checkboxes in the formatting options did not help.
It turned out that this was caused by an option in the plugin “Visual Assist X” from Whole Tomato Software.
In my case this problem could be solved by going to “Visual Assist Options”-->”Corrections” and unchecking the Checkbox “Format after paste”.
It's a bug in VS 2013 beta that it cannot be turned off completely, see issue submitted by FuleSnabel: http://connect.microsoft.com/VisualStudio/feedback/details/797716/turning-off-auto-formatting-for-vs2013-c-only-seems-to-partial-disable-auto-formatting.
Some possible workarounds:
If you just peek into some projects which have different/weird style: if an unwanted auto-formatting happens, then you can perform one undo step, this should undo only the auto formatting part of the operation and not your contribution. Fortunately these two (or sometimes more auto formatting steps) are not grouped together into one command probably for this exact reason: you can go back and override it. It is annoying though if that happens all the time. You can configure the behavior to match your style, but you say you have project with different code styles.
Tools/Import and Export Settings... - you can export the specific settings for a certain project and then import it later. This will save .vssettings XML format file. If it's about just a specific file type, than it can be just a few kilobytes long. Unfortunately this requires manual steps. The best would be if these settings could be overridden from the solution configuration file or even the project configuration file, could be part of them.
Note, that this second point is problematic if you really work parallel in your projects with simultaneously open Visual Studios. In this case that settings will be saved finally what the last closed VS instance had I think.
Having different auto formatting saved for solutions can be a feature request for next release (certainly not make it to VS 2013). What I usually come across is the tab/space indentation behavior differences, it's the most common difference in project styles. Indentation also can be configured individually for most file types, but as as in your case, projects can differ, and then it becomes annoying.
Just remember that resharper can also override the indentation/formatting settings. You can turn that off by doing this
ReSharper -> Options -> Environment -> Editor -> Editor Behaviour -> Auto-format on closing brace (un-check this).
To turn off automatic brace completion, go to:
Tools > Options > Text Editor > All Languages > General > Automatic brace completion
...then uncheck "Automatic brace completion".
Go to:
Tools->Options->Text Editor->C/C++->Formatting->Spacing
Then deselect or select the boxes that pertain to the code type you are writing.