https://github.com/syngan/vim-operator-furround
an extension of surround.vim
https://github.com/syngan/vim-operator-furround
operator plugin surround vim vim-operator
Last synced: 12 months ago
JSON representation
an extension of surround.vim
- Host: GitHub
- URL: https://github.com/syngan/vim-operator-furround
- Owner: syngan
- License: mit
- Created: 2014-02-26T04:30:27.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-02-24T23:01:13.000Z (over 10 years ago)
- Last Synced: 2024-08-04T09:03:58.320Z (almost 2 years ago)
- Topics: operator, plugin, surround, vim, vim-operator
- Language: VimL
- Homepage:
- Size: 125 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vim-operator-furround
=====================
[](https://travis-ci.org/syngan/vim-operator-furround)
This plugin is a Vim operator to surround a text by register content.
Required:
- [kana/vim-operator-user](https://github.com/kana/vim-operator-user)
Recommended:
- [tpope/vim-repeat](https://github.com/tpope/vim-repeat)
Related:
- [rhysd/vim-operator-surround](https://github.com/rhysd/vim-operator-surround)
- [tpope/vim-surround](https://github.com/tpope/vim-surround)
Mappings:
- `(operator-furround-append-input)` (use input always)
- `(operator-furround-append-reg)` (depend on `use_input` option)
- `(operator-furround-delete)`
- `(operator-furround-replace-input)`
- `(operator-furround-replace-reg)`
# Install
## NeoBundle
```vim
NeoBundleLazy 'syngan/vim-operator-furround', {
\ 'depends' : [ 'kana/vim-operator-user'],
\ 'autoload' : {
\ 'mappings' : ['(operator-furround-']}
\}
```
## `(opeartor-furround-append-input)`
- `map sa (opeartor-furround-append-input)`
- original text is `tako`
- type `saiw` and input xxx
- note: `iw` is an `inner word`. see `:h iw`
| input | result | note |
|:------------:|:------------------------:|:-------------|
| `(` | `(tako)` | |
| `[` | `[tako]` | |
| `"` | `"tako"` | |
| `hoge` | `hoge(tako)` | default |
| `hoge(` | `hoge(tako)` | |
| `hoge<` | `hoge` | |
| `hoge["` | `hoge["tako"]` | |
| `hoge()["` | `hoge()["tako"]` | |
| `hoge(3, ` | `hoge(3, tako)` | |
| `hoge(3, "` | `hoge(3, "tako")` | |
| `{\bf ` | `{\bf tako}` | LaTeX |
| `\begin{ho}` | `\begin{ho}tako\end{ho}` | filetype=tex |
- default block: `[]`, `()`, `{}`, `<>`, `""`, `''`
## `(opeartor-furround-delete)`
- `map D (opeartor-furround-delete)`
| text | type | result | note |
|:---------------------|:---------|:---------------|:-----------|
| `hoge(tako)` | `Df)` | `tako` | |
| `hoge[tako]` | `Df]` | `tako` | |
| `tako(hoge[tako])` | `Df)` | `hoge[tako]` | |
| `{\bf foo}` | `Da}` | `foo` | ft=tex |
## vim-textobj-postexpr
- syngan/vim-textobj-postexpr
- https://github.com/syngan/vim-textobj-postexpr
- `omap iv (textobj-postexpr-i)`
- text is `hoge(tako(foo))` and do `Div` then `tako(foo)`
# Blog in Japanese
- [hoge() で囲みたい症候群](http://d.hatena.ne.jp/syngan/20140301/1393676442)
- [vim-operator-furround で LaTeX/XML 編集](http://d.hatena.ne.jp/syngan/20140304/1393876531)
- [vim-operator-furround の挙動を少し変えた](http://d.hatena.ne.jp/syngan/20140316/1394920671)