Search code examples
macospycharm

PyCharm Delete Whole Line with cursor moving up


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?


Solution

  • 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).