Disable horizontal auto-scroll when pasting text 关注 Waleedov 创建于 2020年03月31日 14:47 When I paste text, the window scrolls to the end of the text. How can I disable this behavior? I don't like pressing home every time to go back to the beginning. Please check attached.
I don't think it's possible, otherwise you would end up with a cursor not visible.
You can instead just press up or down.
I am pasting text from multiple text files for translations, and I am not sure what is the quickest way to do it, pasting text scrolls the page and that takes time.
Pressing up and down will move the cursor to the end of the previous line not to the beginning. Thx anyway.
As some kind of a dirty workaround, you may want to record a macro with a sequential Paste and Home actions. Afterwards, the macro can be assigned to a specific key combo.
A little bit more about it:
The other option is to create a new "paste" concept using groovy code to do an "insert" at cursor of the past buffer.
It keeps the cursor where it is at. I used this toolkit for goovy plugins:
There HELLO WORLD example (assuming you can grab the clipboard content)
I ended up calling this code like this action:
Effectively, if you hit LineStart, it moves you to the first character of CODE, not column 1. Hitting it again, takes you to Column 1.
But, sometimes you are already it the front of the line, in which case, you need to call it ONE more time to be furthest left.
And I have to do this, because once the scroll to the right is done, the viewport shifts. And the horizontal scrollbar will NOT easily go to zero.
FINALLY, I realize this is a 2yr old post. But I found it before I found my ultimate solution, and maybe it helps someone else!