Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Auto-align a text section in Redcar (Ctrl+Q)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 plugin.rb
README.md

Redcar Align Plugin

Adds smart aligning to Redcar. When you hit Ctrl+Q without a selection, the current paragraph is aligned to fit into the margin. If you have text selected, all paragraph in that selection will be aligned. Keeps paragraph indentation and is able to handle lists.

Example

foo bar
blah blubb lorem ipsom okay okay

* this is some very nice listing you've got here
* oh god,
        my indentation is wrong

As I said:

    it keeps the initial indentation level
    for each paragraph.

Becomes:

foo bar blah blubb lorem ipsom okay
okay

* this is some very nice listing
  you've got here
* oh god, my indentation is wrong

As I said:

    it keeps the initial indentation
    level for each paragraph.

Stand-alone usage

It can be used without Redcar:

require 'aligner'
Aligner.align File.read("README"), 80
Something went wrong with that request. Please try again.