Skip to content

Commit

Permalink
Improve documentation for the "quick selection" functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Comitti committed Nov 16, 2014
1 parent 0f8e398 commit b9c796e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,27 @@ cal wildfire#triggers#Add("<ENTER>", {

### Quick selection

A visual explanation often works far better than plain old words.

![Preview](_assets/quickselect.gif "Quick selection.")

Wildfire does not set a default mapping for *quick selection*. Be sure to put something like the following line in your `.vimrc`:

```vim
nmap <leader>s <Plug>(wildfire-quick-select)
```

![Preview](_assets/quickselect.gif "Quick select.")
By default, *quick selection* use text objects in `g:wildfire_objects` to set jump marks. Have a look at the example below if you want to use different text object without having to change `g:wildfire_objects`.

```vim
cal wildfire#triggers#AddQs("<leader>s", {
\ "*" : ["i)", "i]"],
\ })
```

### Similar plugins

Wildfire is not the only plugin who can smartly select text object. Be sure to have a look at the following plugins if Wildfire doesn't suit your needs:

- [vim-expand-region](https://github.com/terryma/vim-expand-region)
- [vim-textobj-anyblock](https://github.com/rhysd/vim-textobj-anyblock)

33 changes: 29 additions & 4 deletions doc/wildfire.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ CONTENTS *wildfire-contents*

1. Intro ................................. |wildfire-intro|
2. Usage ................................. |wildfire-usage|
3. Advanced usage ........................ |wildfire-advanced-usage|
3. Advanced Usage ........................ |wildfire-advanced-usage|
4. Quick Selection ....................... |wildfire-quick-selection|
4. About ................................. |wildfire-about|
5. License ............................... |wildfire-license|

Expand Down Expand Up @@ -55,7 +56,7 @@ option:
<

==============================================================================
3. Advanced usage *wildfire-advanced-usage*
3. Advanced Usage *wildfire-advanced-usage*

Sometimes considering certain kinds of text objects can be quite annoying. This
is the case of Html, where, for example, you may want to select just tag objects.
Expand Down Expand Up @@ -83,16 +84,40 @@ for different text object candidates:
\ })
<


==============================================================================
4. Quick Selection *wildfire-quick-selection*

This feature allows you to quickly select text object by setting special marks
(not vim marks) in the current buffer that represent growing selections
(similarly to vim-easymotion).

Wildfire does not set a default mapping for *quick selection*. Be sure to put
something like the following line in your `.vimrc`:
>
nmap <leader>s <Plug>(wildfire-quick-select)
<

By default, *quick selection* use text objects in `g:wildfire_objects` to set
jump marks. Have a look at the example below if you want to use different text
object without having to change `g:wildfire_objects`.
>
cal wildfire#triggers#AddQs("<leader>s", {
\ "*" : ["i)", "i]"],
\ })
<


==============================================================================
4. About *wildfire-about*
5. About *wildfire-about*

Author: Giacomo Comitti
Contributors: https://github.com/gcmt/wildfire.vim/contributors
Git repository: https://github.com/gcmt/wildfire.vim


==============================================================================
5. License *wildfire-license*
6. License *wildfire-license*

Copyright (c) 2014 Giacomo Comitti

Expand Down

0 comments on commit b9c796e

Please sign in to comment.