How to stop lines of code from automatically shifting to the next line whenever I resize the window of the editor?

Look in the default Preferences.sublime-settings file for the setting below:

// Disables horizontal scrolling if enabled.
// May be set to true, false, or "auto", where it will be disabled for
// source code, and otherwise enabled.
"word_wrap": "auto",

If you want the default for word wrap to be off for all syntax types:

Copy "word_wrap": "auto", into your user Preferences.sublime-settings file

If you want the default for word wrap to be off for code and off for HTML but on for other syntax types:

Copy "word_wrap": "auto", into the HTML.sublime-settings file


Set it to "word_wrap": "false",.

Now your default for HTML will be word wrap is off.

You can change this anytime by toggling the Word Wrap item in the View menu or by launching the Control Panel and typing enough of word wrap until the Word Wrap: Toggle item is selected and hitting Return.


Just uncheck "Word wrap" in the "view" menu.


  1. Open an HTML file with sublime
  2. Choose Preferences > Settings-More > Syntax Specific - User
  3. A file named HTML.sublime-settings will open
  4. Insert the following:

{
    "word_wrap": "false"
}

  1. save the file