TruePERSPECTIVES_logo.png

Editor power: 130 useful keyboard shortcuts [plus the only one you need to know!]

Posted by Magnus Unemyr on Oct 24, 2016 1:55:33 PM

The C/C++ editor in Atollic TrueSTUDIO (and most other Eclipse IDE’s as well) is incredibly powerful. In addition to the docking views and toolbar icons, the C/C++ editor contains a large number of useful keyboard shortcuts that give you instant access to powerful editing commands as you work with your code.

In this blog post, I will list 130 useful editor keyboard shortcuts. But you will only need to remember one of them. Read this blog post to learn the secrets of a very special shortcut – and all the others too!

editor_keyboard_shortcuts.png

Knowing many keyboard shortcuts by heart is a great way to improve your editing efficiency. But let’s be frank here – most developers will not remember 130 editor keyboard shortcuts – not to mention all the other ones used in the debugger, version control system client, etc.

But I can reveal a secret trick. It even has a name: CTRL-Shift-L

You only need to know this keyboard shortcut – because this shortcut remembers all the other ones for you! Simply click CTRL-Shift-L in the editor, and a cheat sheet with all the other keyboard shortcuts pop up:

 

shortcuts.png

This is incredibly useful! If you open the keyboard shortcuts cheat sheet, you will learn all the other keyboard shortcuts. Are you curious? These are the editor shortcuts you may want to use:

C/C++ source code shortcuts

Ctrl+= Explore Macro Expansion C/C++ Editor
Ctrl+Shift+T Open Element In C/C++ Views
F3 Open Declaration C/C++ Editor
Ctrl+Shift+Up Go to Previous Member C/C++ Editor
Ctrl+Shift+G References C/C++ Editor
Alt+Left Back In Macro Expansion Hover
Alt+Right Forward In Macro Expansion Hover
F3 Open Declaration In Macro Expansion Hover
Ctrl+Shift+P Go to Matching Bracket C/C++ Editor
Ctrl+Shift+/ Add Block Comment C/C++ Editor
Alt+Shift+O Toggle Mark Occurrences C/C++ Editor
Ctrl+Shift+T Open Element C/C++ Editor
Ctrl+Alt+S Sort Lines C/C++ Editor
Ctrl+G Declaration In C/C++ Views
Ctrl+Shift+Down Go to Next Member C/C++ Editor
Ctrl+Shift+\ Remove Block Comment C/C++ Editor
Alt+Shift+Z Surround With Quick Menu C/C++ Editor
Ctrl+Shift+G References In C/C++ Views
Ctrl+Shift+N Add Include C/C++ Editor
Ctrl+Tab Toggle Source/Header C/C++ Editor
Ctrl+O Show outline C/C++ Editor
F3 Open Declaration In C/C++ Views
Ctrl+Shift+F Format C/C++ Editor
Ctrl+G Declaration C/C++ Editor
Ctrl+T Quick Type Hierarchy C/C++ Editor
Ctrl+Shift+O Organize Includes C/C++ Editor
Ctrl+/ Comment/Uncomment C/C++ Editor
Ctrl+I Indent Line C/C++ Editor
Alt+Shift+S Show Source Quick Menu C/C++ Editor
Ctrl+# Explore Macro Expansion C/C++ Editor

 

C/C++ refactoring shortcuts

Alt+C Extract Constant - Refactoring  C/C++ Editor
Alt+Shift+T Toggle Function - Refactoring  C/C++ Editor
Alt+Shift+R Rename - Refactoring  C/C++ Editor
Alt+Shift+L Extract Local Variable - Refactoring  C/C++ Editor
Alt+Shift+M Extract Function - Refactoring  C/C++ Editor
Alt+Shift+R Rename - Refactoring  In C/C++ Views

 

Navigation shortcuts

Ctrl+Shift+H Open Type in Hierarchy In C/C++ Views
F4 Open Type Hierarchy C/C++ Editor
Ctrl+Alt+I Open Include Browser C/C++ Editor
Ctrl+Shift+Numpad_Divide Collapse All In Windows
Ctrl+Alt+H Open Call Hierarchy In C/C++ Views
Ctrl+Shift+Numpad_Multiply Expand All In Windows
Ctrl+Shift+F12 Search Repository for Task In Windows
Alt+Shift+F7 Previous Page In Windows
Ctrl+Shift+O Quick Outline Task Markup Editor Source Context
Alt+Up Go To Previous Unread Task In Tasks View
Ctrl+Alt+Shift+F12 Open Remote Task In Windows
Ctrl+O Quick Outline WikiText Markup Source Context
Ctrl+, Previous In Windows
Alt+Down Go To Next Unread Task In Tasks View
Ctrl+Alt+H Open Call Hierarchy C/C++ Editor
Ctrl+L Go to Line Editing Text
Ctrl+Shift+R Open Resource In Windows
Alt+Shift+W Show In... In Windows
Alt+PageUp Previous Sub-Tab In Dialogs and Windows
F4 Open Type Hierarchy In C/C++ Views
Ctrl+Shift+H Open Type in Hierarchy C/C++ Editor
Ctrl+F12 Open Task In Windows
Ctrl+. Next In Windows
Ctrl+Alt+I Open Include Browser In C/C++ Views
Alt+PageDown Next Sub-Tab In Dialogs and Windows
Ctrl+Shift+F9 Deactivate Task In Windows
Ctrl+F9 Activate Task In Windows
Alt+Right Forward History In Windows
Ctrl+Q Last Edit Location In Windows
Alt+Left Backward History In Windows
Alt+F7 Next Page In Windows

 

General text editing shortcuts

Ctrl+Right Next Word Editing Text
Ctrl+Shift+Right Select Next Word Editing Text
Ctrl+Alt+J Join Lines Editing Text
Ctrl+Backspace Delete Previous Word Editing Text
Ctrl+Shift+Numpad_Multiply Reset Structure Editing Text
Ctrl+Shift+X To Upper Case Editing Text
Ctrl+Left Previous Word Editing Text
Ctrl+Shift+Y To Lower Case Editing Text
F2 Show Tooltip Description Editing Text
Ctrl+Numpad_Add Expand Editing Text
Ctrl+Shift+Enter Insert Line Above Current Line Editing Text
Insert Toggle Overwrite Editing Text
End Line End Editing Text
Shift+Home Select Line Start Editing Text
Shift+End Select Line End Editing Text
Ctrl+Down Scroll Line Down Editing Text
Ctrl+End Text End Editing Text
Ctrl+Delete Delete Next Word Editing Text
Ctrl+Shift+Numpad_Divide Collapse All Editing Text
Ctrl+Alt+Down Copy Lines Editing Text
Ctrl+Shift+Left Select Previous Word Editing Text
Ctrl+Numpad_Subtract Collapse Editing Text
Shift+Enter Insert Line Below Current Line Editing Text
Ctrl+Alt+Up Duplicate Lines Editing Text
Alt+Down Move Lines Down Editing Text
Ctrl+D Delete Line Editing Text
Ctrl+Up Scroll Line Up Editing Text
Ctrl+Numpad_Multiply Expand All Editing Text
Ctrl+Shift+Delete Delete to End of Line Editing Text
Ctrl+Numpad_Divide Toggle Folding Editing Text
Alt+Up Move Lines Up Editing Text
Ctrl+Home Text Start Editing Text
Home Line Start Editing Text
Ctrl+_ Toggle Split Editor (Horizontal) In Windows
Esc Exit Full Screen In Windows
Ctrl+{ Toggle Split Editor (Vertical) In Windows
Alt+Shift+Down Restore Last C/C++ Selection C/C++ Editor
Ctrl+Shift+Q Quick Diff Toggle Editing Text
Ctrl+X Cut In Dialogs and Windows
Ctrl+V Paste In Dialogs and Windows
Ctrl+Z Undo In Dialogs and Windows
Ctrl+J Incremental Find Editing Text
Shift+Insert Paste In Dialogs and Windows
Ctrl+1 Quick Fix In Dialogs and Windows
Ctrl+Shift+Space Context Information In Dialogs and Windows
Ctrl+Insert Copy In Dialogs and Windows
Ctrl+Y Redo In Dialogs and Windows
Ctrl+Shift+K Find Previous Editing Text
Ctrl+Shift+J Incremental Find Reverse Editing Text
Shift+Tab Shift Left C/C++ Editor
Ctrl+Shift+Insert Toggle Insert Mode Editing Text
Alt+Shift+Right Select Next C/C++ Element C/C++ Editor
Alt+Shift+Up Select Enclosing C/C++ Element C/C++ Editor
Alt+Shift+A Toggle Block Selection Editing Text
Ctrl+F Find and Replace In Windows
Shift+Delete Cut In Dialogs and Windows
Ctrl+Space Content Assist In Dialogs and Windows
Alt+Shift+Left Select Previous C/C++ Element C/C++ Editor
Ctrl+C Copy In Dialogs and Windows
Ctrl+K Find Next Editing Text
Ctrl+A Select All In Dialogs and Windows
Delete Delete In Windows
Alt+/ Word Completion Editing Text

 

And so, while I don't suggest you should learn all these 130 keyboard shortcuts by heart, at least remember CTRL-Shift-L, as it is a quick way of remembering also all the others!

Do you want to know more about ARM Cortex development tools? Read this whitepaper:

 

ARM Development White Paper - TrueSTUDIO

 

 

 

Topics: editing, Atollic TrueSTUDIO, ECLIPSE