https://github.com/bzf/vim-concentric-sort-motion
https://github.com/bzf/vim-concentric-sort-motion
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bzf/vim-concentric-sort-motion
- Owner: bzf
- Created: 2018-02-25T10:20:28.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-07-05T07:54:40.000Z (about 5 years ago)
- Last Synced: 2025-03-14T19:58:01.931Z (over 1 year ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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