Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rkh/redcar-align

Auto-align a text section in Redcar (Ctrl+Q)
https://github.com/rkh/redcar-align

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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