They can clean this up and make it uniform either all tabs or all spaces. People like to be consistent so there's a tool I'll show you later called Tabify and Untabify. Nobody likes these mixed tabs and spaces. I've got two tabs at the beginning of the line and spaces at the end of the line. You scroll down and look here on line 43. It indented it another four units but it changed what I had in spaces to tabs. Let's see what happens when I move up this line of code and press the Tab key. It looks like eight or ten space bars were pressed. On line 11, it's a little bit harder to tell. Those three arrows represent tabs so I can see that I pressed Tab three times on line 20 to indent that text. On my settings, it's Control r, Control w Look at line 11 now. If you prefer keyboard shortcuts, you can use the keyboard shortcut listed here. To visualize the whitespace, I'll open the Edit menu, choose Advanced and then select the View White Space item. There's also some whitespace at the beginning of line 20 but I can't tell whether I use the Tab character or the Space bar to indent the text or whether Visual Studio did it automatically. You see there's some whitespace at the beginning of that line. Being able to see that whitespace can help you solve funky alignment problems. These characters are often used by developers to indent and align their code. If you haven't heard the term whitespace in regard to text editors, it refers to key characters like Tab and Space.
How to insert line visual studio 2017 shortcut how to#
In this video, I'll start by showing you how to visualize the whitespace characters in your text editor. Visual Studio assists you in writing readable code by automatically indenting and aligning your text.