Skip to content
This repository was archived by the owner on Nov 19, 2017. It is now read-only.

Commit 6f880c5

Browse files
committed
Add documentation
1 parent ba95be2 commit 6f880c5

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

doc/blockle.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
*blockle.txt* Plugin for toggling ruby block styles
2+
3+
Author: Joshua Davey <josh@joshuadavey.com> *blockle-author*
4+
License: Same terms as Vim itself (see |license|)
5+
6+
This plugin is only available if 'compatible' is not set, and will only work
7+
correctly if matchit.vim is available.
8+
9+
INTRODUCTION *blockle*
10+
11+
This plugin allows rapid toggling between the two different styles of ruby
12+
blocks, namely do/end and brackets {}. To use, simply move the cursor to the
13+
beginning or end of a block, and type <Leader>b. As a mnemonic, remember 'b'
14+
for 'block'.
15+
16+
Note: You must have your cursor on the do, end, {, or } for the plugin to work
17+
correctly.
18+
19+
When moving from a do/end to a bracket-style block, the plugin with attempt to
20+
move to a one-liner if appropriate:
21+
22+
For example, if have the following ruby code (* indicates cursor position):
23+
>
24+
['one', 'two'].each d*o |number\
25+
puts number + "!"
26+
end
27+
28+
After invoking <Leader>b, the resulting code would be:
29+
>
30+
['one', 'two'].each *{ |number\ puts number + "!" }
31+
>
32+
33+
MAPPINGS *blockle-mappings*
34+
35+
<Leader>b or <Plug>BlockToggle
36+
Toggle ruby block style
37+
38+
*blockle-settings*
39+
This plugin has no settings.
40+
41+
vim:tw=78:et:ft=help:norl:

0 commit comments

Comments
 (0)