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

https://github.com/bzf/vim-concentric-sort-motion


https://github.com/bzf/vim-concentric-sort-motion

Last synced: over 1 year ago
JSON representation

Awesome Lists containing this project

README

          

concentric-sort-motion.vim
==========================

Adds a motion for sorting CSS attributes using the [concentric style guide][1].

## Installation

Using [vim-plug][2]:

```vim
Plug 'bzf/vim-concentric-sort-motion'
```

then run `:PlugInstall` from inside `vim`.

> _NOTE: This plugin requires that vim has been compiled with the +ruby feature
enabled. For neovim it requires the Ruby gem `neovim` to be installed._

## Usage

This plugin adds the motion to `gsc` in normal mode.

Examples:

- `gscj` => Sorts the current line and the one below it concentricly.
- `gscip` => Sorts the current paragraph concentricly.
- `gscii` => Sorts the current indentation level concentricly (requires [text-obj-indent plugin][])

[text-obj-indent plugin]: https://github.com/kana/vim-textobj-indent

## Testing

The tests are written using RSpec. First install the dependencies for running
the tests:

```sh
bundle install
```

To run the tests execute:

```sh
bundle exec rspec
```

[1]: http://rhodesmill.org/brandon/2011/concentric-css/
[2]: https://github.com/junegunn/vim-plug