multi-wrap-guide

Provides multiple draggable wrap guides.

lexicalunit

20,358

40

Bug Reports

1.1.11

MIT

GitHub

Multi Wrap Guide

apm package travis-ci appveyor circle-ci david download mit All Contributors

Fully customizable wrap guides at arbitrary column and row positions.

Wrap guides!

guides

Drag 'em!

drag

Disable draggable guides by using the Multi Wrap Guide: Toggle Lock command. This is useful when draggable guides are interfering with text selection.

Create and remove 'em!

create

πŸ“ Integration with Line Length Break

The line-length-break package allows users to automatically hard break text at their editor's preferred line length. If you have this plugin installed, multi-wrap-guide will add a context sensitive menu item (right click on a wrap guide) that will let you line break at the selected wrap guide. Using the Line Length Break: Break will break at the farthest right wrap guide by default.

βš™οΈ Configuration

By default, Multi Wrap Guide will use your editor.preferredLineLength setting or language specific settings. You can override this by editing your config.cson file to provide custom settings. First open the file using the following command.

Command Palette βž” Application: Open Your Config

Then add something like the following under the root '*' scope.

  'multi-wrap-guide':
    'columns': [
      73
      80
      100
      120
    ]

⚠️ Note that the final column given will act as your editor.preferredLineLength setting. This affects preferences such as soft word wrap if you also have editor.softWrapAtPreferredLineLength enabled.

✨ Styling

Configure styles applied to guides created by this package using your styles.less file. Open it with the following command.

Command Palette βž” Application: Open Your Stylesheet

Then add modifications to the selectors shown below. For example, to make the guide lines purple and the tooltip green:

atom-text-editor.editor {
  .multi-wrap-guide {
    .multi-wrap-guide-line {
      background-color: purple;
      .multi-wrap-guide-tip {
        background-color: green;
      }
    }
  }
}

Or if you want to get super fancy, you can set different colors and widths for each column:

atom-text-editor.editor {
  .multi-wrap-guide:nth-child(1) .multi-wrap-guide-line {
    background-color: fadeout(white, 60%);
    width: 1px;
  }
  .multi-wrap-guide:nth-child(2) .multi-wrap-guide-line {
    background-color: fadeout(green, 60%);
    width: 2px;
  }
  .multi-wrap-guide:nth-child(3) .multi-wrap-guide-line {
    background-color: fadeout(yellow, 60%);
    width: 5px;
  }
  .multi-wrap-guide:nth-child(4) .multi-wrap-guide-line {
    background-color: fadeout(red, 60%);
    width: 10px;
  }
}

colors

πŸ—‘οΈ Uninstallation

Activating this package disables the default Atom wrap-guide package automatically. To go back to using the default wrap guide you'll need to deactivate or uninstall multi-wrap-guide and then manually re-enable the wrap-guide package in your Atom settings.

Also, if you have changed your right-most vertical wrap guide since installing multi-wrap-guide, your editor.preferredLineLength will be different than from before you installed multi-wrap-guide. This is not a permanent change as you are of course free to change your editor.preferredLineLength setting before, during, and after installing this package. Note also that these changes are both global and grammar specific.

πŸ’– Contributors

Thanks goes to these wonderful people (emoji key):


Amy Troschinetz

πŸ› πŸ’» πŸ“–

Chris Tonkinson

πŸ›

Jackson Bailey

πŸ›

Jean Mertz

πŸ›

Sami Kankaristo

πŸ›

Pete Hanson

πŸ›

Ped

πŸ›

Phoenix C. Enero

πŸ›

JesΓΊs LeganΓ©s-Combarro

πŸ›

rugk

πŸ›

Ryan Sawhill Aroha

πŸ›

GU Xiaojun

πŸ›

Mark Kahn

πŸ›

Adam Malcontenti-Wilson

πŸ›

Simon Fridlund

πŸ›

Jeff Sandberg

πŸ›

This project follows the all-contributors specification. Contributions of any kind welcome!


MIT Β© lexicalunit et al