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
- Host: GitHub
- URL: https://github.com/kyohsuke/sinplu.vim
- Owner: kyohsuke
- License: mit
- Created: 2016-07-15T01:04:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T11:40:14.000Z (over 2 years ago)
- Last Synced: 2023-12-03T12:39:42.436Z (over 2 years ago)
- Topics: pluralize, singularize, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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)

## 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