A very specific question, for use on Mac OS:
In VSCode, it's very easy to simply hold ⌘ Command and hit ⌫ Delete for however many whole lines I want to delete and the cursor will keep deleting upward.
However, running PyCharm, it's not available, and I'm having trouble mapping the exact feature.
Going to Preferences -> Keymap -> Editor Actions allows you to map "Delete Line," but using this will just delete downward. Is there a way to mimic the feature of being able to hold down ⌘ Command and just ⌫ Delete lines upward?
To find the shortcut on your setup open up the "Search Everywhere" box with one of the following:
Double ⇧ Shift
⌘ Command+P
⌘ Command+⇧ Shift+P (opens directly on Actions tab)
Then go to the "Actions" tab and search for the shortcut you are looking for, in this case "Delete Line":
Then it shows the shortcut (in my case ⌃ Control+⇧ Shift+K)
In the Jetbrains documentation it does not show up anything to remove a whole line (or at least, I am missing it out).
I know it is not the same, as what you do in VScode is much faster, but you can always shift+home(gets you the whole line if you are at the end of the line)+delete.
I do not think there is another way from jetbrain's doc.
EDIT:
I think I found it by cassualty: R shift+ del.
EDIT2: Just found out that R shift+ del actually cuts (like ctrl+ x).
I know that the post is a bit old but I think it worths to post the 'actual' solution to this issue.
Basically, when you try to delete line in PyCharm for Mac, the IDE is deleting the caret (according to the documentation). Although, IdeaVim plug-in is making your life even more difficult if you don't know how to use it. I don't have experience either.
Disabling IdeaVim plug-in will solve the problem. The IDE will ask you to restart it in order to apply the new settings. After that you can select whatever you want in your code and just hit the backspace button on your Mac to delete. And, yes, all these issues with the key shortcuts are caused by the IdeaVim.
The IdeaVim extension can be disabled from the PyCharm Preferences.
Related
I've been dying to get this working on the default terminal on the mac, this feature is really useful when you write something wrong, and can just cmd + backspace to delete all the lines.
I googled online several times but I couldn't find anything related to this.
Well, the functionality is already there: ⌃+U will delete everything left to your cursor to the beginning of the line. You cannot, however, change this keyboard shortcut.
You can change application-specific keybindings by installing additional tools like, for example, Karabiner.
Alternatively, you can install iTerm2 as a Terminal replacement. That will allow you to enable this - and many other text editing keybindings - with one click in the settings.
When I Ctrl+Shift+F in VS2010, it puts whatever is near my cursor in the "Find what:" box - this is very irritating and never what I want.
Is there any way to make it default instead to the last thing I searched for?
Tools -> Options -> Environment -> Find and Replace -> Automatically populate Find What with text from the editor
If you uncheck this option it will default to the last thing you searched for.
an nice. Glad i found this...
two work arounds i figured out... if you do want to search in selected text only sometimes but not all the time...
Mouse: Click back on the page and ctrl+A (its faster than having to grab the mouse and clicking the tiny drop down.)
Keyboard only: Well you cant technically do this, with any one command from http://visualstudioshortcuts.com/14/ but you can do this.
while find is active, hit
alt+F6
to get out of find and then hit
esc
to activate the document then
ctrl+A
to search the whole document
I am glad to find how to turn this off, but i am used to this keyboard commands now. So maybe i will leave it on.
if you don't learn to use the escape key in VS, especially for intellisense you are going to seriously drive yourself crazy.
I would like to have ctrl-tab behavior in Xcode (4.6, if that's relevant)-- is that available?
I do NOT mean behavior described as in the answer to this question:
Xcode - cycle through open windows
That is, cmd-` is not what I want to do, because I don't want to use multiple windows.
I mean, I want the editor to behave like Visual Studio or Netbeans, and be able to cycle through the files that I've opened in the same real estate. I don't like having a cloud of windows to navigate through. Is this possible, or is this idiom just not something in Xcode at all?
You can use control-2 to bring up the history menu, then up and down to select the file you want. Then control-3 to move forward.
Try ctrl + cmd + left Arrow/right Arrow
One approach is to use more tabs. In the General tab of Xcode's Preferences (as of Xcode 4.6.3), set “Double Click Navigation” to “Use Separate Tab”:
Then, when you open files by double-clicking them, they will open in new tabs. You can navigate between tabs by typing ⌘ { and ⌘ } (command-shift-left bracket and command-shift-right bracket). You can rebind the “Select Next Tab” and “Select Previous Tab” commands in the Key Bindings preferences if you want to use other keys.
I think what you want is the following:
Sorry for using Xcode 5 here, but I think that might be more future-proof and it's the same in Xcode 4.X.
As far as I know there is no shortcut for that behavior but - as in any web view - you can swipe with your finger (1 finger on the Magic Mouse, 2 finger on the Trackpad).
This has always bugged me and this morning I decided to try and find out if there is a key command to open the resharper suggestion menu and quickly up/down select the appropriate option. It's annoying to have to grab the mouse every time.
I checked the Resharper key commands list but couldn't spot anything that sounded like it would be it (although I found a few cool key commands I never knew about, particularly the encapsulate field command!)
Anyone know it if it exists?
Alt + Enter
This is unless you chose to keep the Visual Studio shortcuts instead of ReSharper ones.
I type fast. Often times when programming I will select a line with Shift+End and then press the delete key, but I do this so quickly that my finger hasn't come off of the shift key. This results in replacing clipboard item with what was selected.
This is bad because many times I am deleting code before pasting some other code.
Apparently shift+del is an old school way of cutting.
I am aware of ctrl+shift+v for cycling through clipboard history in visual studio, but this is still terribly annoying.
Is there a way to disable this shortcut in visual studio or windows in general?
Good answer. Although I assume some people will still like to perform the delete operation.
To still perform the wipe of the entire line with SHIFT+DEL but don't add it to the clipboard:
remove (as explained above) the binding of SHIFT+DEL to the Edit.Cut command
AND
bind the SHIFT+DEL combination to the Edit.LineDelete command.
The keyboard shortcuts are pretty thoroughly customizable in Visual Studio.
Go to Tools > Options then in the left select Environment > Keyboard
Select the command, select the shortcut you want to remove, click "Remove" and click "OK"
If you wanted to circumvent this across Windows, you can use a one-line AutoHotkey script to convert Shift+Delete to just plain Delete:
+DELETE::SendInput,{DELETE}
There is an easier way.
The shortcut CTRL+SHIFT+L simply deletes the line you're on. Without having to select it first and without copying it to the clipboard.
This autohotkey script solve this globally:
+Delete::
KeyWait Shift
Send {Delete}
shift+insert is okay, but shift+delete is just plain EVIL
I actually often lost code entirely, while being utterly confused where'd it go! :-)