I don't like having 'private' placed before my access modifiers. They're all private by default anyways and it's just visual clutter.
How do I turn off resharper constantly tagging everything with 'private'?
ReSharper 9.1
ReSharper -> Options -> Code Editing -> C# -> Code Style -> Modifiers -> Use explicit private modifier (Un-Check)
**ReSharper 2016.1
ReSharper -> Options -> Code Editing -> C# -> Code Style -> Modifiers ->
In the ReSharper Options menu, go to Code Editing -> C# -> Formatting Style -> Other and disable explicit private modifier.
Related
I've already followed the advice here, but that still leaves all the # symbols and the #code{} blocks highlighted, which I find annoying and ugly.
I assume there's a setting in Tools -> Options -> Environment -> Fonts and Colors, but I can't find it.
That is the HTML Server-Side Script display item in Tools -> Options -> Environment -> Fonts and Colors
I'm trying to edit C code in TextMate, and the auto-indent feature is inconvenient for the style of the code.
I tried, from the menu bar,
Bundles -> Edit Bundles -> C -> Settings -> Indentation Rules
and unchecked "Enable this item", and restarted the editor, but that
didn't seem to have any effect. I was able to disable the auto-pairing of braces, using the suggestions in
Disable auto-pairing of characters in Textmate 2?
but so far haven't found a way to turn off auto-tabbing, other than
just using the plain text mode.
Thanks for any suggestions!
You were so close!
The missing piece was
disableIndentCorrections = :true;
Which you insert under Bundles -> Edit Bundles -> C -> Settings -> Indentation Rules
{
disableIndentCorrections = :true;
[rest of file...]
This disables the indentation for the C bundle.
You can disable it for all scopes by adding the same line to Bundles -> Edit Bundles -> Source -> Settings -> Miscellaneous
Only just noticed it. The 'heading' that showed how many references a method has had gone missing. I assume after the last update that I installed. I didn't even know it was called Codelens but now I am wiser.
As per other answer in S.O. It is an option under Tool-> Options -> Text Editor -> All Languages -> CodeLens. The update (I assume) had disabled it)
HTH someone else.
Go to the option Tool-> Options -> Text Editor -> All Languages -> CodeLens and enable it.
I started playing around with javascript on Visual Studio 2013 and I couldn't figure out why it is not automatically positioning the cursor to the correct indentation level, instead always resetting back to the head. For example:
function foo(y) {
var f = function bar(x) {
|<-- cursor should be here, but ends up
|<-- over here
}
Does anyone else see this and how do you change it?
I have the typescript, nodejs plugin installed and that's about it.
With a bit of research, things started working for me. First check that, Tools -> Options -> Text Editor -> Javascript -> Tabs -> Indenting is set to 'Smart'. Next restart VS. For me restarting was important since, apparently, my file had some mixed line-endings and that was throwing off the indentation engine. Hope this helps someone.
In my case, the whole javascript formatting stopped working for every file, I could play with language options and restart VS, nothing helped, until I unchecked:
Tools -> Options -> Text Editor -> JavaScript/TypeScript -> Language Service -> Enable the new JavaScript language service
The editor returned to old school javascript formatting, which is sufficient for me.
I'm not sure if this applies to Visual Studio 2013 (the original question), but in 2015 at least, you can select the text in your JavaScript file you want to format, right-click, and then choose "Format Selection". There's a keyboard short-cut as well (Ctrl-K, Ctrl-F).
If you already have Tools -> Options -> Text Editor -> Javascript -> Tabs -> Indenting set to 'Smart', then try setting this option (the Indenting setting) to 'None' and click OK.
Open the Options back up and, set Tools -> Options -> Text Editor -> Javascript -> Tabs -> Indenting back to 'Smart', click OK.
Close and reopen the file you were working on.
Trying to get my css / C# functions to look like this:
body {
color:#222;
}
instead of this:
body
{
color:#222;
}
when I auto-format the code.
C#
In the Tools Menu click Options
Click Show all Parameters (checkbox at the bottom left) (Show all settings in VS 2010)
Text Editor
C#
Formatting
New lines
And there check when you want new lines with brackets
Css:
almost the same, but fewer options
In the Tools Menu click Options
Click Show all Parameters (checkbox at the bottom left) (Show all settings in VS 2010)
Text Editor
CSS
Format
And than you select the formatting you want (in your case second radio button)
For Visual Studio 2015:
Tools → Options
In the sidebar, go to Text Editor → C# → Formatting → New Lines
and uncheck every checkbox in the section "New line options for braces"
For Mac OS users:
Preferences → Source Code → Code Formatting → choose what ever you want to change (like C# source code) → C# Format → Edit -→ New Lines
Tools -> Options -> Text Editor -> C# -> Formatting -> New Lines -> New Line Options for braces -> Uncheck all boxes.
The official MS guidelines (at the time in 2008) tells you to have the curly brace on the same line as the method/property/class and many other things which are not enforced in Visual Studio.
You can change all these auto-text settings under:
Tools -> Options -> Text Editor -> [The language you want to change]
UPDATE: This was based on the book "Framework Design Guidelines" written by some of the core-people from the .NET-team. If you look at the source-code for the likes of ASP.NET MVC, this is no longer accurate.
Go to Tools -> Options -> Text Editor -> CSS -> Formatting. Click "Semi-expanded," which matches the style you defined.
For CSS you'll need the 'Semi Expanded' option.
For Visual Studio Mac OS (Community edition) version 8.3 you need to do the following:
Preferences -> Source Code (in left menu) -> Code Formatting -> C# source code -> C# Format -> Press Edit
Select New Lines from the Category dropdown menu:
Deselect each option in the New line options for braces:
There is a specific formatting setting in VS 2008/2010 to keep the open brace on the same line:
Click Tools->Options Select 'CSS' within 'Text Editor' tree node Select 'Formatting' under 'CSS' node Click 'Semi-expanded' radio button
You will see a preview what the various radio buttons avail will do to the formatting
If you're looking for this option within Visual Studio 2014, then it's under advanced and is now a 'Brace positions' drop down box: