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

https://github.com/kyohsuke/sinplu.vim

Singularize <-> Pluralize
https://github.com/kyohsuke/sinplu.vim

pluralize singularize vim-plugin

Last synced: 4 months ago
JSON representation

Singularize <-> Pluralize

Awesome Lists containing this project

README

          

[![CI](https://github.com/kyohsuke/sinplu.vim/actions/workflows/test.yml/badge.svg)](https://github.com/kyohsuke/sinplu.vim/actions/workflows/test.yml)

## sinplu.vim - Singularize <-> Pluralize

Based on [Active Support](https://github.com/rails/rails/blob/92f567ab30f240a1de152061a6eee76ca6c4da86/activesupport/lib/active_support/inflections.rb)

![](https://cloud.githubusercontent.com/assets/573880/17268236/50690df4-5660-11e6-98ac-746d2ae953e5.gif)

## Installation
```vim
NeoBundle 'kyohsuke/sinplu.vim'
```
of course you can use Vundle, pathogen or any plug-in manager.

## Configuration

### keymap

```vim
" if you need mapping as you like, you can do like this.
let g:sinplu_no_mappings = 1
nmap s SingularizeWord
nmap p PluralizeWord
nmap t ToggleWord
```

### Singularize and/or Pluralize
```vim
" you can add Singularize/Pluralize rule.
" syntax is same as substitute(, , , )
let g:sinplu_singular_override_wards = [
\ ['from', 'to', 'flag']
\ ]

" for example, here is override the 'index -> indices' rule to 'index -> indexes'
let g:sinplu_plural_override_wards = [
\ ['(ind)ex$', '\1exes', 'i']
\ ]

```

## LICENSE

MIT