*clever-f.txt*                                      Make |f|, |F|, |t| and |T| cleverer.

Author : rhysd <lin90162@yahoo.co.jp>
Version : 1.5

CONTENTS          *clever-f.vim-contents*

Introduction      |clever-f.vim-introduction|
Usage             |clever-f.vim-usage|
Mappings          |clever-f.vim-mappings|
Variables         |clever-f.vim-variables|
Special Thanks    |clever-f.vim-special-thanks|
Repository Page   |clever-f.vim-repository-page|
License           |clever-f.vim-license|


==============================================================================
INTRODUCTION                                         *clever-f.vim-introduction*

*clever-f.vim* or *clever-f* extends |f|, |F|, |t| and |T| key mappings for more
convenience.
Instead of |;|, |f| is available to repeat after you type |f|{char} or |F|{char}.  |F|
after |f|{char} and |F|{char} is also available to undo a jump. |t|{char} and
|T|{char} are ditto. This extension makes a repeat easier and makes you forget
the existence of |;|. You can use |;| for other key mapping.
In addition, many handy features (target highlighting, smartcase matching, and
so on) are provided and you can customize behavior of the mappings.
Please check |clever-f.vim-variables|.


==============================================================================
USAGE                                                       *clever-f.vim-usage*

I'll show an example of usage. _ is the place of cursor, -> is a move of
cursor, alphabets above -> is input by keyboard.

>
    input:       fh         f         f      e         fo         f
    move :  _---------->_------>_---------->_->_---------------->_->_
    input:                            F                            F
    move :                        _<-----------------------------_<-_
    text :  hoge        huga    hoo         hugu                ponyo
<

>
    input:        f        Fh       b     f                         Fo
    move :  _<----------_<------_<-_<-----------------------------_<-_
    input:        F        F          F
    move :  _---------->_------>_----------->_
    text :  hoge        huga    huyo         hugu                ponyo
<

>
    input:       th         t         t      e         to         t
    move :  _--------->_------>_---------->_-->_--------------->_->_
    input:                            T                            T
    move :                         _<-----------------------------__
    text :  hoge        huga    hoo         hugu                ponyo
<

==============================================================================
MAPPINGS                                                 *clever-f.vim-mappings*
                                   *g:clever_f_not_overwrites_standard_mappings*

If you don't set |g:clever_f_not_overwrites_standard_mappings|, |clever-f|
replaces |f|, |F|, |t|, and |T| with |<Plug>(clever-f-f)|, |<Plug>(clever-f-F)|,
|<Plug>(clever-f-t)| and |<Plug>(clever-f-T)| as default mappings.

<Plug>(clever-f-f)                    *<Plug>(clever-f-f)*
<Plug>(clever-f-F)                    *<Plug>(clever-f-F)*
<Plug>(clever-f-t)                    *<Plug>(clever-f-t)*
<Plug>(clever-f-T)                    *<Plug>(clever-f-T)*
<Plug>(clever-f-reset)                *<Plug>(clever-f-reset)*
<Plug>(clever-f-repeat-forward)       *<Plug>(clever-f-repeat-forward)*
<Plug>(clever-f-repeat-back)          *<Plug>(clever-f-repeat-back)*


==============================================================================
VARIABLES                                               *clever-f.vim-variables*

g:clever_f_across_no_line                            *g:clever_f_across_no_line*

    If the value is equivalent to 1, |clever-f| mappings search target
    character only in the cursor line. The default value is 0.

g:clever_f_ignore_case                                  *g:clever_f_ignore_case*

    If the value is equivalent to 1, it makes |clever-f| mappings' search case-
    insensitive. For example, if you input "fa", it matches both "a" and "A".
    The default value is 0.

g:clever_f_smart_case                                    *g:clever_f_smart_case*

    If the value is equivalent to 1, it makes |clever-f| mappings' search
    smart case. For example, if you input "fa", it matches both "a" and "A",
    but if you input "fA", it matches only "A".
    The default value is 0.

g:clever_f_use_migemo                                    *g:clever_f_use_migemo*

    If the value is equivalent to 1, migemo support is enabled. This feature
    is useful in Japanese environment. |clever-f| can match multibyte Japanese
    character with a alphabet input. For example, "fa" can search "あ".
    This feature doesn't require |cmigemo| because |clever-f| includes regex
    patterns generated by cmigemo.
    Please see http://0xcc.net/migemo/ if you want to know more about migemo.
    The default value of this variable is 0.
>
    input:      fm    f                     f
    move :    _---->_---->_----------------------------------------->_
    input:       F     F                    F
    move :    _<----_<----_<-----------------------------------------_
    text :  ビム！ビム！ビムゥぅうわぁああん！！！ あぁあっあっー！ビムゥ！！
<
g:clever_f_fix_key_direction                      *g:clever_f_fix_key_direction*

    If the value is equivalent to 1, the directions of keys are fixed. For
    example, |F| is backward search and repeating of |F| after |F| makes the
    same direction search.  Below is the behavior. Please compare examples of
    |clever-f.vim-usage|.
    The default value is 0.
>
    input:        F        Fh     b     F                         Fo
    move :  _<----------_<------_<-_<-----------------------------_<-_
    input:        f        f          f
    move :  _---------->_------>_----------->_
    text :  hoge        huga    huyo         hugu                ponyo
<
g:clever_f_show_prompt                                  *g:clever_f_show_prompt*

    If the value is equivalent to 1, a prompt is shown when a character is
    input to search. The prompt is disposed after the input.
    The default value is 0.

g:clever_f_chars_match_any_signs              *g:clever_f_chars_match_any_signs*

    The value must be string. If this variable is not empty, characters in the
    value matches any signs. For example, when the value is ";:", f; and f:
    matches all signs. You can jump signs whose keys are hard to press.
    The default value is "".
>
    input:   f;   f       f      f f       f       f
    move :  _-->_--->_--------->_>_>_------------>_>_
    text :  hoge.huga( autoloads: %w{ aaa bbb ccc } )
<
g:clever_f_mark_cursor                                  *g:clever_f_mark_cursor*

    If the value is equivalent to 1, current cursor position will be
    highlighted when waiting for {char}. This way you won't lose your focus
    from the place your cursor was.
    The default value is 1.

g:clever_f_mark_cursor_color                      *g:clever_f_mark_cursor_color*

    Only used when |g:clever_f_mark_cursor| is enabled. Change highlight group
    used to mark cursor position.
    The default value is "Cursor".

    Note:
    |g:clever_f_mark_cursor_color| must be set before |clever-f| is loaded.
    (e.g. in your |vimrc|)

g:clever_f_hide_cursor_on_cmdline            *g:clever_f_hide_cursor_on_cmdline*

    If the value is equivalent to 1, a cursor is hidden on inputting {char}.
    This feature prevents cursor from moving to command line.
    The default value is 1.

g:clever_f_timeout_ms                                    *g:clever_f_timeout_ms*

    If the value is greater than 0, |clever-f| check the interval of previous
    search and next search.  If the interval is longer than the value,
    |clever-f| resets its state to make you input a character. The unit of the
    value is millisecond.
    The default value is 0 (it means no timeout).

g:clever_f_mark_char                                      *g:clever_f_mark_char*

    If the value is equivalent to 1, the characters in line which you input
    in |f|, |F|, |t| and |T| are highlighted until the search ends.  The
    highlighted characters means candidates the cursor can move to by |f|, |F|, |t|
    and |T|.  Highlighting is enabled in normal and visual mode.
    The default value is 1.

g:clever_f_mark_char_color                          *g:clever_f_mark_char_color*

    If |g:clever_f_mark_char| is enabled, |clever-f| highlights the target
    characters using the highlight group which |g:clever_f_mark_char_color|
    specifies.  If you want to change the highlight group |clever-f| uses, set
    your favorite highlight group to this variable.
    The default value is "CleverFDefaultLabel", which makes characters red and
    bold.  If you want to make an original label highlight, define your own
    highlight group.(See |:highlight|)

    Note:
    |g:clever_f_mark_char_color| must be set before |clever-f| is loaded.
    (e.g. in your |vimrc|)

g:clever_f_repeat_last_char_inputs          *g:clever_f_repeat_last_char_inputs*

    This is a list of string value.  If one of the elements are input,
    |clever-f| use the previous input instead of the input.
    The default value is ["\<CR>"].  It means that previous input is used when
    you input <CR>.  For example, when you previously input "fa" and then
    input "f<CR>", "a" will be used instead of "<CR>".
    If you want to add <Tab> to the element, please write below in your vimrc.
>
    let g:clever_f_repeat_last_char_inputs = ["\<CR>", "\<Tab>"]
<
g:clever_f_mark_direct                                  *g:clever_f_mark_direct*

    If the value is equivalent to 1, characters to which the cursor can be
    moved directly are highlighted until you input a character.  Highlighting
    is enabled in normal and visual mode.
    The default value is 0.

g:clever_f_mark_direct_color                      *g:clever_f_mark_direct_color*

    If |g:clever_f_mark_direct| is enabled, |clever-f| highlights characters
    using the highlight group which |g:clever_f_mark_direct_color| specifies.
    If you want to change the highlight group |clever-f| uses, set
    your favorite highlight group to this variable.
    The default value is "CleverFDefaultLabel", which makes characters red and
    bold.  If you want to make an original label highlight, define your own
    highlight group.(See |:highlight|)

    Note:
    |g:clever_f_mark_direct_color| must be set before |clever-f| is loaded.
    (e.g. in your |vimrc|)


==============================================================================
SPECIAL THANKS                                     *clever-f.vim-special-thanks*

|<Plug>(clever-f-t)|, |<Plug>(clever-f-T)|, repeatability with |.|,
availability of |[count]| are the works by @thinca. Thanks!
(http://d.hatena.ne.jp/thinca/20130227/1361891993)


==============================================================================
REPOSITORY PAGE                                   *clever-f.vim-repository-page*

The latest version of |clever-f| is available at
https://github.com/rhysd/clever-f.vim


==============================================================================
LICENSE                                                   *clever-f.vim-license*

|clever-f.vim| is distributed under MIT license.

  Copyright (c) 2013 rhysd

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
  "Software"), to deal in the Software without restriction, including
  without limitation the rights to use, copy, modify, merge, publish,
  distribute, sublicense, and/or sell copies of the Software, and to
  permit persons to whom the Software is furnished to do so, subject to
  the following conditions:
  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


==============================================================================
vim:tw=78:colorcolumn=78:ts=8:ft=help:norl:et:fen:fdl=0:
