With one of this month’s meeting topics being improving productivity with Visual Studio 2010, I wanted to share some productivity tips that work in any IDE on Linux and Windows.
One of my basic productivityÂ premisesÂ is to keep my hands on the keyboard as much as possible. Â This allows you to keep from having to grab the mouse to do something and come back to the keyboard. Â Doing this hundreds of times a day adds up.
We all know about Ctrl+X, Ctrl+C, Ctrl+V for cutting, copying and pasting textÂ respectively. Â Combining these commands with other keyboard commands is really powerful.
To select text from the keyboard, hold down the select key. Â With the select key held down, use the cursor keys to start selecting the text. Â Now you can do whatever you want to do with it. Â You could delete it with the “Del” key or cut to the clipboard with Ctrl+X. Â You can also select larger portions of text by holding down the select key and use “Page Up” and “Page Down” then use the cursor to finely tune the selection. Â To select an individual line of code, use the “Home” and “End” keys. Â I use these a lot, even without trying to select text, to go to the beginning and end of a line of code.
Moving around or scrolling can be done from the keyboard too. Â As I mentioned, the “Page Up” and “Page Down” keys will scroll a window’s worth of lines. Â To scroll without moving your cursor, press Ctrl and up or down arrows. Â This allows you to move one line of code up or down per press and you can see code that is just out of sight without moving your cursor.
With most IDEs you can select code and press the “Tab” key. Â This will indent the code over. Â To remove a tab or indentation, press “Shift” and “Tab”.
Debugging can be pain due to having to switch between windows. Â Press “Alt” and “Tab” will cycle to the previous window. Â If you want to continue going back to previous windows, keep holding the “Alt” key and press “Tab”. Â This will allow youÂ switchÂ between your IDE and program much quicker.
Code completion is one of the most important parts of an IDE. Â The majority of them use “Ctrl” and “Space” to bring up the window.
Your favorite IDE has a lot keyboard mnemonics. Â I highly recommend you learn them.