Search code examples
sublimetext2

sublime text, how to delete a line nicely ?


How to delete a line in sublime text the same way it is deleted in intellij ?

Which is : line is deleted, and cursor is back to previous position on the newly displayed line.


Solution

  • No, Ctrl+Shift+K sent the cursor back to the beginning of the line, which is most of the time not the required behaviour. I want the cursor not to move back but to stay as close as possible to where it was before (horizontally speaking).

    The solution was to record a macro, where you toggle a bookmark, delete line above, go back to bookmark, and delete bookmark. Then bind the macro to a shortcut.