Sublime Forum

Edge effects

#1

This is slightly related to this

because maybe I can use the size of the panel as a (bad) work around the ruler min of 70.

Sorry I don’t know the technical term, so asking the question might be a bit tricky.

When the text is larger than the panel size and as the limit is approached the text “jumps around”, how do i turn that off please.

Also how do I turn off the wrap around on that function, so it just stays at the end of the line
I’ve had a look at these

but it just seems ridiculously complicated for such a simple option, with no guarantee of success.

However if I can get the ruler to 60 the above become much less important as they’re only a “work around” for not having a user defined ruler.

Having said that if I can stop the jumpy behaviour (if not the word wrap) that would also be nice.

All the best

0 Likes

#2

It’s not clear what you mean by the text “jumping around”. If you just mean word wrapping, then you can turn that off in your settings or in the command palette (ctrl+shift+p) under Word Wrap: Toggle. Otherwise it would be helpful to have a video or screenshot of what you mean.

0 Likes

#3

Sadly although I found the wordwrap toggle “command” it doesn’t work.

re giggling around: I have two columns open (Alt+2) i think off the top of my head. Some text lines are longer than the width off each panel. As I move the cursor towards the end of the line, the text moves to the left. It is just a function of the word wrap, the problem is it’s really easy to jump off the end of the line and the cursor is sent to the beginning of the next. So it’s just a function of the word wrap.

So just issues with word wrap… phew.

0 Likes

#4

Without screenshots or video it’s difficult to understand exactly what’s being described, but it sounds like you’re describing text that is NOT wrapping. As in, as you move the cursor to the right the view is scrolling horizontally to keep the cursor in view and then jumping to the beginning of the next line when the cursor crosses the end of the line.

It should be noted that the ruler doesn’t have any relationship to text wrapping, it’s merely a guide that’s displayed at a particular column. In the screenshot below you can see a ruler at column 80 with word wrap turned off. If you were to move your cursor to the right, the view will scroll horizontally to the right to keep the cursor in view and then, when it reaches the end of the line, the view will jump back to the beginning of the next line.

In this next screenshot, I have a ruler set to column 80 and the Word Wrap Column set to 100 with word wrap turned on.

I think what you’re asking is for word wrap to happen at column 60, whereas the lowest available setting is currently 70? If that’s correct, I believe you want to set Word Wrap Column to “Automatic” which will force lines to wrap at the edge of the view, no matter what the width the view is.

1 Like

#5

@normally, thanks for your reply.

The ruler has sorted itself. Don’t worry re ruler !
I was looking to change the width of the panel as a crude work around to use as a ruler.
If I set the panel to a width of say 61, and the first / of my comment is visible, I’d know that all my comments were at the right spacing, I could then resize the panel and fill in my comments from those first ‘/’ s.
This would have been a terrible work around, but hey the ruler is now working, I don’t need that work around any more.

What I’d like to happen; Is when the cursor gets to the end of a line it just stays there, and doesn’t go to the beginning of the next line.

The ‘giggling’ about is just a function of the line being longer than the panel width. I guess with the appropriate setting set to get the above behaviour, that will disappear.

Cheers

0 Likes

#6

After a month or so thought, I think I can describe the issue a bit more clearly.
Imagine you’ve got a few thousand line of code open on ST3. A few of those lines of code are longer than the pane width.
When you do a crtl+f or crtl+h looking for a particular set of characters there are many matches, say you’re looking to replace "<<std::endl; with \n";
This particular match occurs at the EOL of a lot of lines including some of those longer much longer lines.

When you press F3 to jump to the next instance, if the next instance is at the EOL of a long line (> pane width) the focus moves so that you can see the highlighted text. This clearly obscures BOL because this line were talking about is longer than the pane width.

So far so good.

However when you select the next instance (F3) and the next instance is on a line shorter than the pane width the highlight moves to the next instance, but because of the previous focus BOL of this line remains out of sight, even though it’d fit in the pane comfortably (because it’s a short line).

This is annoying, because I then have to scroll to the beginning of the line to see the context. In a long line I expect information to be hidden (because it’s longer than the pane is wide) but not with short lines.

So the behaviour I want is: When using F3 (or some other search) if the entire line with fit in my current pane (ie line length < pane width) to show that entire line no matter where the highlighted text is within that line and no matter where the previous highlight was i.e. at a location “outside the current pane view”
Perhaps more simply:
if (line length < pane width) goto BOL then show highlighted text

Hopefully I’ve managed to explain a bit more clearly what I mean.

Cheers

Ps I thought maybe I could press Home in between F3s to move to BOL but that’s not available, so I still have to go to the slide bar at the bottom of the pane to get to BOL

0 Likes

#7

I also thought perhaps I could do this:

{ “keys”: [“f3”],
“command”:“multicommand”,
“args”:{
“commands”:[
{“command”: “move_to”, “args”: {“to”: “bol”, “extend”: false} },
{“command”: “find_next”}
]
}
},

but it would seem no cursor movement other than find_next is allowed during a “find”…

0 Likes

#8

When you start a find operation, the focus is in the find pane. If you click out into the editor, you can then do standard cursor operations like using the HOME key to move to the beginning of the line.

I typically bring up the Find pane (CTRL-f), enter the text I’m looking for, click back into my file so focus is now in the editor, then press F3 to find the text. Now I can do all the standard cursor operations while doing my searches.

0 Likes

#9

@normally. Thanks for your reply, I was hoping I could turn off some flag somewhere…

Ps Doesn’t having to jump between the Find dialog box etc, defeat the object of ctrl+d and then F3 ?

0 Likes

#10

It seems like there should be a way to move focus between Find and the editor with a simple key command, but this is just what I got used to using. If someone can recommend a smoother way to do this, I would love to hear it! :slight_smile:

0 Likes