Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lambdalisue/vim-reword
🧬 Vim plugin to provide case-preserving substitutuion
https://github.com/lambdalisue/vim-reword
case substitution vim
Last synced: 16 days ago
JSON representation
🧬 Vim plugin to provide case-preserving substitutuion
- Host: GitHub
- URL: https://github.com/lambdalisue/vim-reword
- Owner: lambdalisue
- License: mit
- Created: 2020-06-17T09:47:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-06T00:39:14.000Z (over 2 years ago)
- Last Synced: 2024-10-03T12:23:18.136Z (about 1 month ago)
- Topics: case, substitution, vim
- Language: Vim script
- Homepage:
- Size: 44.9 KB
- Stars: 44
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧬 reword.vim
![vim](https://github.com/lambdalisue/reword.vim/workflows/vim/badge.svg)
![neovim](https://github.com/lambdalisue/reword.vim/workflows/neovim/badge.svg)
![reviewdog](https://github.com/lambdalisue/reword.vim/workflows/reviewdog/badge.svg)![Support Vim 8.1 or above](https://img.shields.io/badge/support-Vim%208.1%20or%20above-yellowgreen.svg)
![Support Neovim 0.4 or above](https://img.shields.io/badge/support-Neovim%200.4%20or%20above-yellowgreen.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20reword-orange.svg)](doc/reword.txt)Replace words in a buffer in case preserving manner, with live preview feature for Vim and Neovim.
![Reword preview](https://user-images.githubusercontent.com/546312/85490727-3fd56080-b60d-11ea-9a8b-4571c3279dcd.gif)
## Usage
Use `Reword` command to replace the first word in a current line like:
```
:Reword/HelloWorld/FooBarHoge
```And use `/g` flags to replace all words in a current line like:
```
:Reword/HelloWorld/FooBarHoge/g
```Prepend `%` to replace all words in a buffer like:
```
:%Reword/HelloWorld/FooBarHoge/g
```Note that the following substitutions will be applied as well with `:Reword` command
| Name | From | To | Disable flag |
| ---------------- | ------------- | -------------- | ------------ |
| `lowerCamelCase` | `helloWorld` | `fooBarHoge` | `l` |
| `snake_case` | `hello_world` | `foo_bar_hoge` | `s` |
| `kebab-case` | `hello-world` | `foo-bar-hoge` | `k` |
| `lower` | `helloworld` | `foobarhoge` | `i` |
| `UPPER` | `HELLOWORLD` | `FOOBARHOGE` | `i` |Use above disable flags to disable each cases.