Skip to content

Commit f900e2e

Browse files
committed
surround.vim 1.1.0
Add symbols: * \ $ - / % + _
1 parent 3c30f88 commit f900e2e

File tree

6 files changed

+423
-115
lines changed

6 files changed

+423
-115
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tags

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# :sunrise_over_mountains: vim-textobj-pipe
1+
# :sunrise_over_mountains: vim-textobj-surround
22

3-
This plugin adds "|" (pipe) as a text-object.
3+
This plugin adds various symbols as surrounding text-objects.
44

55
Table of Contents
66
-----------------
@@ -22,27 +22,27 @@ support:
2222
mkdir ~/.vim/pack/plugin/start/vim-textobj-user
2323
git clone https://github.com/kana/vim-textobj-user.git ~/.vim/pack/plugin/start/vim-textobj-user
2424

25-
mkdir ~/.vim/pack/plugin/start/vim-textobj-pipe
26-
git clone https://github.com/EvanQuan/vim-textobj-pipe.git ~/.vim/pack/plugin/start/vim-textobj-pipe
25+
mkdir ~/.vim/pack/plugin/start/vim-textobj-surround
26+
git clone https://github.com/EvanQuan/vim-textobj-surround.git ~/.vim/pack/plugin/start/vim-textobj-surround
2727
```
2828

2929
#### [Vim-Plug](https://github.com/junegunn/vim-plug)
3030

3131
1. Add `Plug 'kana/vim-textobj-user'` to your `vimrc` file.
32-
2. Add `Plug 'EvanQuan/vim-textobj-pipe'` to your `vimrc` file.
32+
2. Add `Plug 'EvanQuan/vim-textobj-surround'` to your `vimrc` file.
3333
3. Reload your `vimrc` or restart.
3434
4. Run `:PlugInstall`
3535

3636
#### [Vundle](https://github.com/VundleVim/Vundle.vim)
3737

3838
1. Add `Plugin 'kana/vim-textobj-user'` to your `vimrc` file.
39-
2. Add `Plugin 'EvanQuan/vim-textobj-pipe'` to your `vimrc` file.
39+
2. Add `Plugin 'EvanQuan/vim-textobj-surround'` to your `vimrc` file.
4040
3. Reload your `vimrc` or restart.
4141
4. Run `:BundleInstall`
4242

4343
#### [NeoBundle](https://github.com/Shougo/neobundle.vim)
4444

45-
1. Add `NeoBundle 'EvanQuan/vim-textobj-pipe'` to your `vimrc` file.
45+
1. Add `NeoBundle 'EvanQuan/vim-textobj-surround'` to your `vimrc` file.
4646
2. Add `NeoBundle 'kana/vim-textobj-user'` to your `vimrc` file.
4747
3. Reload your `vimrc` or restart.
4848
4. Run `:NeoUpdate`
@@ -52,12 +52,14 @@ git clone https://github.com/EvanQuan/vim-textobj-pipe.git ~/.vim/pack/plugin/st
5252
```bash
5353
git clone https://github.com/kana/vim-textobj-user.git ~/.vim/bundle/vim-textobj-user
5454

55-
git clone https://github.com/EvanQuan/vim-textobj-pipe.git ~/.vim/bundle/vim-textobj-pipe
55+
git clone https://github.com/EvanQuan/vim-textobj-surround.git ~/.vim/bundle/vim-textobj-surround
5656
```
5757

5858
## Usage
5959

60-
The **textobj-pipe** plugin provides two new text-objects which are triggered
60+
**TODO elaborate on other text objects**
61+
62+
The **textobj-surround** plugin provides two new text-objects which are triggered
6163
by `a|` and `i|` respectively.
6264

6365
For example, suppose you have the following markdown table:

doc/textobj-pipe.txt

Lines changed: 0 additions & 62 deletions
This file was deleted.

doc/textobj-surround.txt

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
*textobj-surround.txt* For Vim version 8.1 Last change: 2018 December 24
2+
3+
_____ _ _____ _ _ ~
4+
|_ _| | | | _ | | (_) ~
5+
| | _____ _| |_| | | | |__ _ ~
6+
| |/ _ \ \/ / __| | | | '_ \| | ~
7+
| | __/> <| |_\ \_/ / |_) | | ~
8+
\_/\___/_/\_\\__|\___/|_.__/| | ~
9+
_____ _/ | _ ~
10+
/ ___| |__/ | | ~
11+
\ `--. _ _ _ __ _ __ ___ _ _ _ __ __| | ~
12+
`--. \ | | | '__| '__/ _ \| | | | '_ \ / _` | ~
13+
/\__/ / |_| | | | | | (_) | |_| | | | | (_| | ~
14+
\____/ \__,_|_| |_| \___/ \__,_|_| |_|\__,_| ~
15+
16+
17+
A Vim plugin that adds various symbols as ~
18+
surrounding text objects. ~
19+
20+
21+
Reference Manual ~
22+
23+
24+
==============================================================================
25+
CONTENTS *textobj-surround-contents*
26+
27+
1. Intro....................................|textobj-surround-intro|
28+
2. Symbols..................................|textobj-surround-symbols|
29+
3. Usage....................................|textobj-surround-usage|
30+
4. About....................................|textobj-surround-about|
31+
32+
==============================================================================
33+
1. Intro *textobj-surround-intro*
34+
35+
TODO
36+
==============================================================================
37+
2. Symbols *textobj-surround-symbols*
38+
39+
$
40+
%
41+
*
42+
|
43+
+
44+
-
45+
_
46+
47+
TODO description
48+
49+
50+
==============================================================================
51+
3. Usage *textobj-surround-usage*
52+
53+
TODO elaborate on others
54+
55+
The textobj-surround plugin provides two new |text-objects| which are triggered
56+
by `a|` and `i|` respectively. You can use them when writing Vim help
57+
documentation (Wow, how meta), or markdown tables.
58+
59+
For example, suppose you have the following markdown table: >
60+
61+
| Cats | Dogs |
62+
|:------------:|:--------:|
63+
| Mr. Whiskers | Snuffles |
64+
| Oscar | Bella |
65+
<
66+
If you want to change 'Mr. Whiskers' to 'Tigger', you can do the following
67+
(cursor position marked by *):
68+
69+
`| Mr. Wh*iskers |` and type `ci|` to get `|*|`, where you can make your
70+
replacement `| Tigger |` .
71+
72+
Another example is if you are writing Vim help documentation and have
73+
a hot-link, which is a word surrounded with pipes as such: >
74+
75+
|bad tag|
76+
<
77+
If you want to delete the hot-link, you can do the following (cursor position
78+
marked by *):
79+
80+
`|bad*tag|` and type `da|`, which will delete the hot-link.
81+
82+
==============================================================================
83+
4. About *textobj-surround-about*
84+
85+
You can find the most updated version of the plugin from:
86+
87+
http://github.com/EvanQuan/vim-textobj-surround
88+
89+
vim:tw=78:ts=8:ft=help:norl:

plugin/textobj/pipe.vim

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)