Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text Plugin: Disable horizontal scrolling and also don't word wrap

I like to have as many Sublime Text windows side by side as possible, so I disable the gutter and line numbers and all that so the windows are exactly 80 characters wide. But then Sublime Text insists on scrolling horizontally a bit, past column 80. That's especially annoying when using two-finger scroll with a trackpad as I'm constantly having to nudge the view back to the left.

I can enable word_wrap and that disables the horizontal scroll, which would be great except, even with wrap_width, I can't make wrapping happen only after column 80. If wrap_width is greater than or equal to the window width it insists on wrapping at slightly less than the window width, which is exactly 80 characters.

Assuming I'm correct that the standard settings don't let me simultaneously disable horizontal scrolling and word wrap, is this possible via the plugin API?

like image 610
dreeves Avatar asked Feb 13 '13 23:02

dreeves


People also ask

How do I turn off word wrap in sublime?

To disable Word Wrap in Sublime Text 3, you need to click on “View” in the top bar, then untick “Word Wrap”. This will completely disable the Word Wrapping feature.

How do I stop horizontal scrolling in web design?

You can also set the overflow-x CSS property to hidden, which prevents child content from wrapping within its container but turns off sideways scrolling. Another solution is to set the width of child elements to 100%.


2 Answers

In this page http://www.sublimetext.com/docs/file-type-preferences

It seemed wordWrap and horizontal scrolling is binded(?).

wordWrap: Set to false for horizontal scrolling. Defaults to true.

So

wantVerticalScrollBar: Set to false to hide the vertical and horizontal scroll bars. Defaults to true. wantHorizontalScrollBar true

I'm not sure if it works modify on console (commands in page).

Hope helpful to you.

like image 25
staticor Avatar answered Nov 16 '22 04:11

staticor


I had the same problem and the only solution I could find is to manually focus each window then View > Word Wrap Column > Automatic. This will fix the issue but it must be done for each window you're using individually. Taking the extra 30 seconds to do this manually saves me much more time over the course of the day. I wish we could fix it through preferences/settings but it doesn't appear so in ST2.

like image 161
Jinn Avatar answered Nov 16 '22 02:11

Jinn