Visual Studio 2013: How do I setup a better work enviroment?

I have started the UE4 programing tutorials and within the first few moments I’m starting to get annoyed with certain aspects of Visual Studio 2013.

How do you disable the auto indent? It often adds tabs to the beginning of the line when I finish typing the line and making a mess of the indenting. How do I stop it from doing this?

How do you make it auto-correct capitalization? IE: IF I type in BOOL it will through an error, but if I type in bool it wont. How do you make it auto-change BOOL to bool? Or if I have a variable called FunTimesToday and I type in funtimestoday, how do you make it auto-correct to FunTimesToday?

How do you make properties and flags visible in the autocomplete drop-down? IE: The flags for UPROPERTY() are not generating an auto complete drop-down box.

Tools>Options>Text Editor>C/C++>Tabs and set Indenting to none.

I can’t help you with the others :(.

I dont believe this can be done, as BOOL and bool are both valid types in C++. And FunTimesToday and funtimestoday are two different variables, even FuntimesToday is not the same as the first.

This I believe cannot be done either, as UPROPERTY is a macro, that has no defined types, so auto complete has no way of knowing the types to show.

But BOOL and bool are the exact same type. It is just that one is C++ and the other is C. Yet, if I’m working in a C++ environment then BOOL should auto-correct to bool.

And I don’t see how FunTimesToday and funtimestoday are two different variables as they are spelled the exact same way. (Note: I’m learning c++ after learning Visual Basic 5. Yes, I know, ewww.)

How would you define types for macros?

In C++ variable names are case sensitive.

MyHappyvar != Myhappyvar

So that’s why having systematic method of using capital letters is important

In UE4 it is every distinct word, so MyHappyVar is the most common capitialization you will see :slight_smile:



No, BOOL is a typedef of windows.h, it has nothing to do with C++ as such. bool is C++ nothing else.

Ctrl+Space should show you the correct version (as it shows you the autocomplete “box”).

You can’t exactly show you the corrrect one because the correct one may not be know before linking stuff together (after compiling of the modules).

So glad I read this post… This has been driving me nuts too.

So there is no way of getting VS autocomplete to try to make a guess at something like UFUNCTION(BlueprintImplementableEvent), it is so easy to misspell, and luckily for me in my editor it will turn purple once it is spelled correctly. As common as this is used, I am hoping this could be rectified somehow.

I am using Visual Assist, maybe there is something built in where I can create acronyms that get auto expanded into these much longer names and save on some typing.

You could always #define shorter macros for the macros in a project specific header file…
It might wake up cthulu. But then again, it might not…

I bet it will. So if you are waiting for world to end or you are keen worshipper, you want Cthullu back… go ahead ;>

I don’t believe there’s a preprocessor pass before the header tool pass, so that wouldn’t work. But I might be wrong, I’ve never bothered with that kind of thing.

Since you already have it, the best compromise here is to use Visual Assist X snippets. You could easily create a “Surround With” macro for blueprint events:

UFUNCTION( BlueprintImplementableEvent )

Then you can just select the line or place the cursor at the start, then insert the snippet using either the contextual menu or a keyboard shortcut, if you assign one to VAssistX.VaSnippetInsert (I use CTRL+W, CTRL+W). The contextual menu uses mnemonic shortcuts, so you can just use that key to choose the shortcut without ever touching the mouse. Naming the above snippet to “Blueprint Event”, using it becomes “Home, SHIFT+End, CTRL+W, CTRL+W, B”. There’s sadly no way to assign a keyboard shortcut to a non-built-in VAX snippet. (I did map one to RefactorCreateImplementation, however, it is a godsend.)

Alternatively, you can create a shortcut snippet, where you match a shortcut to a snippet. For instance, I created this Slate Stylesheet Property (ssprop) shortcut snippet:

/** @todo document */
UPROPERTY( Category=Appearance, EditAnywhere )
$propertytype$ $propertyname$;
$ClassName$& Set$propertyname$( const $propertytype$& In$propertyname$ ){ $propertyname$ = In$propertyname$; return *this; }

By the same logic, you could create a really simple shortcut for BlueprintImplementableEvent like “bie” or something and have that insert the full keyword. If you just want it to show up in the contextual menu, don’t type in a shortcut and just use the “BlueprintImplementableEvent” keyword as the snippet name. Then as you’re typing in your UFUNCTION declaration, you can just write “Blue”, hit CTRL+Space and that brings up whatever snippets start with Blue:

It’s an amazing tool, really, and I can’t stand programming without it.


(And now I feel like a shill. I wasn’t paid for this, I swear! ;))

> Get Visual Assist X.
> Profit

Can confirm. VAX made things so much easier. Even in my non-Unreal projects.

They are right

99$ for a personnal license of Visual Assist for some might be a bit expensive, but its worth every penny :slight_smile:

BOOL is 4 bytes long and bool is 1 byte long. plus there are other differences between the two regarding alignment and padding. have a look at how they are stored in memory.