Вопрос

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