سؤال

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.

هل كانت مفيدة؟

المحلول 2

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.

نصائح أخرى

Ctrl+Shift+K is the default shortcut to delete a line in Sublime Text. However, I'm not sure it will replicate the behavior you are looking for.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top