Sublime Forum

Select line or paste a long string without scrolling to the end of that line

#1

there’s two situations I’m talking about that happened to me right now

  1. Pasting a long string such that to see the end of the line, you need to horizontally scroll
  2. Pressing the key to move the cursor to the end of a line

In either case, Sublime text will move the cursor to the end of the line and also move the focus of the screen, which can be quite annoying as I then need to scroll backwards. I don’t want things to move around when I’m typing and just want the buffer to trust me that I know what I’m doing.

I don’t want to turn on word wrap at this time.

Just hoping there’s a way to turn off automatic scrolling to the cursor

Possibly a duplicate of https://forum.sublimetext.com/t/how-do-i-stop-automatic-horizontal-scrolling-when-selecting-to-a-shorter-line/69516/2

0 Likes

#2

While linked topic is about accidentally horizontal scrolling triggered by selecting text via mouse, I’d generally expect caret to always stay within visible viewport.

Hence both mensioned use cases (pasting long text, navigating to eol) are valid triggers to scroll the viewport horizontally, if they would otherwise cause the caret to be no longer visible. How would you otherwise check/see what you are typing? Would be annoying to need to scroll to caret manually all the time.

0 Likes

#3

for 1. I suggest to make a custom plugin to store the current viewport, execute paste and restore the viewport.
for 2., like 1, but just replace paste with go to EOL.

0 Likes