Questions tagged [keyboard-shortcuts]
Keyboard shortcuts provide quick access to application or system actions via combinatorial key presses.
keyboard-shortcuts
5,573
questions
2033
votes
23
answers
970k
views
How to duplicate a whole line in Vim?
How do I duplicate a whole line in Vim in a similar way to Ctrl+D in IntelliJ IDEA/ Resharper or Ctrl+Alt+↑/↓ in Eclipse?
1879
votes
23
answers
946k
views
Command to collapse all sections of code?
In Visual Studio, is there a command to collapse/expand all the sections of code in a file?
1427
votes
16
answers
1.0m
views
How do I move to end of line in Vim?
I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?
1304
votes
17
answers
453k
views
How can I navigate back to the last cursor position in Visual Studio Code?
What is the keyboard shortcut to navigate back to the last cursor position in Visual Studio Code?
1231
votes
21
answers
874k
views
How do I search for files in Visual Studio Code?
I am used to Resharper where I can search for files, not the content, but the filename, which makes it quick to open new files.
Is this feature implemented in Visual Studio Code and is there a ...
1131
votes
24
answers
774k
views
How do I duplicate a line or selection within Visual Studio Code?
Using Microsoft's Visual Studio Code, how do I duplicate a line of code and then move it up and down? (Similar to Sublime's cmd+shift+d behaviour)
It's a feature that I use constantly, and am ...
1033
votes
12
answers
789k
views
Collapse all methods in Visual Studio Code
In Visual Studio Professional, we have a shortcut key, Ctrl + M Ctrl + O to collapse all methods and properties in a class. How can I do a similar thing in Visual Studio Code?
I know there are ...
1005
votes
34
answers
1.1m
views
Multiline editing in Visual Studio Code
Is it possible to enable multiline editing like in Sublime Text?
For example, press Ctrl to place additional cursor carets and being able to write/delete on multiple places in the document at one ...
928
votes
21
answers
468k
views
How to move the cursor word by word in the OS X Terminal
I know the combination Ctrl+A to jump to the beginning of the current command, and Ctrl+E to jump to the end.
But is there any way to jump word by word, like Alt+←/→ in Cocoa applications ...
836
votes
12
answers
507k
views
What is the shortcut to Auto import all in Android Studio?
Is there any way of auto importing in Android Studio. Something like the auto-import feature that Eclipse has when you use the keybinding: SHIFT + CTRL + O in Android Studio?
Currently I have only ...
796
votes
28
answers
1.3m
views
Copy all the lines to clipboard
Is there any way to copy all lines from open file to clipboard in VI editor. I tried yG but it's not using clipboard to store those lines.
So is it possible?
736
votes
9
answers
853k
views
Shortcut to exit scale mode in VirtualBox [closed]
What is the shortcut to exit scaled mode in Oracle VM VirtualBox, Windows 7/10 host?
688
votes
45
answers
2.1m
views
How to comment multiple lines in Visual Studio Code?
I cannot find a way to comment and uncomment multiple lines of code in Visual Studio Code.
Is it possible to comment and uncomment multiple lines in Visual Studio Code using some shortcut? If yes, ...
642
votes
14
answers
608k
views
Select all occurrences of selected word in VSCode
Are there any tricks/extensions to select all instances of selected word(s) in Visual Studio Code to facilitate editing or deleting those instances without search and replace?
Perhaps something ...
607
votes
28
answers
209k
views
Go to Matching Brace in Visual Studio?
Is there a way in Visual Studio 2008 to go from a closing brace to its opening brace? I've found a fair amount of stuff about highlighting the brace, but nothing about moving the cursor to it.
(VB....
514
votes
32
answers
373k
views
Visual Studio : short cut Key : Duplicate Line
Is there a shortcut for Duplicate Line command in Visual Studio 2008?
Some similar examples:
in Notepad++, I can duplicate the current line with: Ctrl+D
in EditPlus: Ctrl+J
in NetBeans: Ctrl+Shift+&...
476
votes
10
answers
320k
views
IntelliJ shortcut to show a popup of methods in a class that can be searched
I'm switching over from Eclipse to IntelliJ. In Eclipse, Ctrl+O in the editor, shows a hover popup that allows to search for a method in the class you're editing.
What is the equivalent shortcut for ...
464
votes
14
answers
145k
views
Locate current file in IntelliJ
How do I locate the current file in the project structure? (Similar to Visual Studio's Ctrl + Alt + L). What is the name of the operation (so I can define it in the keymap)
459
votes
10
answers
282k
views
How to select all instances of a variable and edit variable name in Sublime
If I select a variable (not just any string) in my code, all other instances of that variable get a stroke (white outline) around them:
Is there a keyboard shortcut that will let me select all of ...
455
votes
15
answers
420k
views
Duplicate line in Visual Studio Code [duplicate]
I am trying to find the shortcut for duplicating a line in Visual Studio Code (I am using 1.3.1) I tried the obvious CTRL + D but that doesn't seem to work.
420
votes
9
answers
114k
views
Eclipse Optimize Imports to Include Static Imports
Is there anyway to get Eclipse to automatically look for static imports? For example, now that I've finally upgraded to Junit 4, I'd like to be able to write:
assertEquals(expectedValue, actualValue);...
404
votes
4
answers
354k
views
How to format code in Xcode? [duplicate]
I wonder how can I format my code to align it neatly? Does it have a feature similar to Eclipse's ctrlshiftf?
400
votes
7
answers
171k
views
Eclipse jump to closing brace
What is the keyboard short cut in Eclipse to jump to the closing brace of a scope?
397
votes
17
answers
243k
views
What is the shortcut in IntelliJ IDEA to find method / functions?
I know that Ctrl + N is to find classes and it is very useful. But what about methods?
390
votes
20
answers
164k
views
Keyboard shortcut for Jump to Previous View Location (Navigate back/forward) in IntelliJ IDEA
I know Ctrl+Shift+Backspace is used to go to the location of the last edit.
But I want to jump to whichever location I was most recently at, not necessarily one where I edited anything.
For example, ...
374
votes
12
answers
117k
views
How to use arguments from previous command?
I know that Esc + . gives you the last argument of the last command.
But I'm interested in first argument of the last command.
Is there a key binding to do so?
On the same lines, is there a generic ...
358
votes
7
answers
91k
views
Is there a [Go to file...]?
In modern IDEs, there is a keyboard shortcut to open a file by typing its name without putting your hand on the mouse. For example:
Eclipse: Cmd|Ctrl + Shift + R -> Open Resource
IntelliJ: Cmd|...
341
votes
9
answers
114k
views
Mac OS X Terminal: Map option+delete to "backward delete word"
Tried to map it from Preferences -> Settings -> Keyboard, but the "key" combo box has only "forward delete" but no "delete". My keyboard on the other hand has only "delete" and no "forward delete"!
...
336
votes
124
answers
131k
views
Favorite Visual Studio keyboard shortcuts [closed]
What is your favorite Visual Studio keyboard shortcut? I'm always up for leaving my hands on the keyboard and away from the mouse!
One per answer please.
336
votes
8
answers
118k
views
Intellij shortcut to convert code to upper or lower case?
What is the Intellij shortcut to convert code to upper or lower case?
332
votes
23
answers
275k
views
How to search for file names in Visual Studio?
In Eclipse you can search for a file in the project by pressing CTRL-SHIFT-R.
Is there a way to do this in Visual Studio?
312
votes
7
answers
174k
views
JetBrains / IntelliJ keyboard shortcut to collapse all methods
I'm working on some legacy code that has a class that is 10,000+ lines of code and has 100s of methods. Is there a shortcut for any JetBrains IDE (since the shortcut would likely be shared across all ...
312
votes
9
answers
258k
views
Best way to implement keyboard shortcuts in a Windows Forms application?
I'm looking for a best way to implement common Windows keyboard shortcuts (for example Ctrl+F, Ctrl+N) in my Windows Forms application in C#.
The application has a main form which hosts many child ...
307
votes
19
answers
81k
views
What is Eclipse's Ctrl+O (Show Outline) shortcut equivalent in IntelliJ IDEA?
I like to use Eclipse's shortcut Ctrl + O which outlines the current source. Is there an equivalent shortcut in IntelliJ IDEA?
It opens a dialog which allows for quick search of methods and fields in ...
305
votes
21
answers
348k
views
Keyboard shortcut to paste clipboard content into command prompt window (Win XP) [closed]
Is there a keyboard shortcut for pasting the content of the clipboard into a command prompt window on Windows XP (instead of using the right mouse button)?
The typical Shift+Insert does not seem to ...
299
votes
11
answers
338k
views
How to restart VScode after editing extension's config?
VScode notifies you when you open a config of an extension:
remember to Restart VScode
But it says nothing about how. They use capital letter for the restart word, so normally it should mean ...
290
votes
19
answers
418k
views
Is there a way to automatically generate getters and setters in Eclipse?
I am working on a new Android project (Java), and created an Object with a large number of variables. Since I am planning to add getters and setters for all of them, I was wondering: is there a ...
290
votes
21
answers
305k
views
What are the most useful Intellij IDEA keyboard shortcuts? [closed]
I did a bit of googling hoping to find a post on IDEA shortcuts similar to Jeff's post on Visual Studio shortcuts (Visual Studio .NET 2003 and 2005 Keyboard Shortcuts), but didn't really spot anything ...
283
votes
18
answers
657k
views
Eclipse comment/uncomment shortcut?
I thought this would be easy to achieve, but so far I haven't found solutions for comment/uncomment shortcut on both Java class editor and jsf faceted webapp XHTML file editor :
to quickly comment/...
272
votes
16
answers
198k
views
Delete word after or around cursor in Vim
I'm now switching to Vim from TextMate. I found ^+W in INSERT mode very useful. However, I'd like to delete not only the word before cursor, but the word after or around cursor as well.
I did some ...
271
votes
8
answers
33k
views
Jump to editor shortcut in Intellij IDEA
I can use F12 to jump to project tree (if it was the last tool that I used), but is there a shortcut for jumping back to editor?
260
votes
6
answers
125k
views
Visual Studio keyboard-shortcut for automatically adding the 'using' statement
What is the keyboard-shortcut that expands the menu, from the little red line, and offers the option to have the necessary using statement appended to the top of the file?
259
votes
26
answers
237k
views
Eclipse copy/paste entire line keyboard shortcut
Anyone know the keyboard shortcut to copy/paste a line into a new line in Eclipse, without having to highlight the entire line?
ctrl-alt-down turns my whole screen upside down (I'm on windows). ...
256
votes
15
answers
82k
views
Is there a standard keyboard shortcut to build the current project in Visual Studio?
I know that Ctrl + Shift + B launches a solution build, but I would like a shortcut that just builds the current project. Is a custom shortcut my only option?
Edit: Looks like a custom shortcut is my ...
238
votes
7
answers
95k
views
Copying the GNU screen scrollback buffer to a file (extended hardcopy)
How do I easily copy the GNU Screen scrollback buffer to a file? I.e., a more powerful version of the 'hardcopy' command?
In GNU screen, I can use "Ctrl + A Esc" to enter the scrollback
buffer. I ...
232
votes
13
answers
111k
views
Is there a way to delete a line in Visual Studio without cutting it?
I want to delete a line just like hitting Ctrl + X without anything selected, but without saving the line to the copy stack. Is this possible?
I'm using Visual Studio 2010.
230
votes
21
answers
113k
views
How to switch between terminals in Visual Studio Code?
I'm looking to switch between terminals open in visual studio code.
With this "Switch focus between editor and integrated terminal in Visual Studio Code" question I correctly setup the focus, but I ...
228
votes
7
answers
54k
views
How do I skip a match when using Ctrl+D for multiple selections in Sublime Text 2?
I have some code like:
testVar = { a: 1 };
testVariable1 = 2;
var c = testVar.a + testVariable2;
var d = testVar;
I want to rename "testVar" variable. When I set multiple cursors with Ctrl+D and ...
226
votes
7
answers
164k
views
Visual Studio Expand/Collapse keyboard shortcuts [duplicate]
In Visual Studio, if I have a code file open, I can press CTRL + M or CTRL + M + O to collapse all code blocks, regions, namespaces, etc.
How to I do the opposite and expand everything?
I have ...
223
votes
27
answers
192k
views
What is the shortcut in Visual Studio Code for console.log
I want to know what is the shortcut for console.log in Visual Studio Code?