*textobj-syntax.txt*    Text objects for syntax highlighted items

Version 0.0.0
Script ID: 2716
Copyright (C) 2009 kana <http://whileimautomaton.net/>
License: MIT license  {{{
    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.
}}}

CONTENTS                                        *textobj-syntax-contents*

Introduction            |textobj-syntax-introduction|
Interface               |textobj-syntax-interface|
  Commands                |textobj-syntax-commands|
  Functions               |textobj-syntax-functions|
  Key Mappings            |textobj-syntax-key-mappings|
Customization           |textobj-syntax-customization|
Examples                |textobj-syntax-examples|
Bugs                    |textobj-syntax-bugs|
Changelog               |textobj-syntax-changelog|




==============================================================================
INTRODUCTION                                    *textobj-syntax-introduction*

*textobj-syntax* is a Vim plugin to provide |text-objects| to select one or
more items which are syntax highlighted.

For example, if you edit the following line in your vimrc, characters which
are underlined with "~" are syntax highlighted.
>
        nnoremap <silent> ql  :<C-u>clist<Return>
        ~~~~~~~~ ~~~~~~~~      ~~~~~     ~~~~~~~~
<
So |<Plug>(textobj-syntax-a)| and |<Plug>(textobj-syntax-i)| (which are mapped
from  |ay| and |iy| by default) select one of the underlined items if the
cursor is located at the one of them.


Requirements:
- Vim 7.2 or later
- |textobj-user| 0.3.8 or later (vimscript#2100)

Latest version:
http://github.com/kana/config/commits/vim-textobj-syntax

Document in HTML format:
http://kana.github.com/config/vim/textobj-syntax.html




==============================================================================
INTERFACE                                       *textobj-syntax-interface*

------------------------------------------------------------------------------
COMMANDS                                        *textobj-syntax-commands*

:TextobjSyntaxDefaultKeyMappings[!]         *:TextobjSyntaxDefaultKeyMappings*
                        Define |textobj-syntax-default-key-mappings|.
                        If [!] is given, existing {lhs}s are overriden.


------------------------------------------------------------------------------
FUNCTIONS                                       *textobj-syntax-functions*

Any function is not available.


------------------------------------------------------------------------------
KEY MAPPINGS                                    *textobj-syntax-key-mappings*

NAMED KEY MAPPINGS                         *textobj-syntax-named-key-mappings*

<Plug>(textobj-syntax-a)                        *<Plug>(textobj-syntax-a)*
                        Like |<Plug>(textobj-syntax-i)|, but this text object
                        selects also leading or trailing white spaces.

                        Note that currently this acts the same as
                        |<Plug>(textobj-syntax-i)|.

<Plug>(textobj-syntax-i)                        *<Plug>(textobj-syntax-i)*
                        Select the syntax highlighted item under the cursor.
                        If the character under the cursor is not syntax
                        highlighted, nothing will be happen.


DEFAULT KEY MAPPINGS                     *textobj-syntax-default-key-mappings*

textobj-syntax defines the following key mappings
in Visual mode and Operator-pending mode automatically.
See also |g:textobj_syntax_no_default_key_mappings|.

        {lhs}  {rhs}
        -----  --------------------------            ~
        ay      |<Plug>(textobj-syntax-a)|          *ay* *v_ay*
        iy      |<Plug>(textobj-syntax-i)|          *iy* *v_iy*




==============================================================================
CUSTOMIZATION                                   *textobj-syntax-customization*

                                    *g:textobj_syntax_no_default_key_mappings*
If you don't want the default key mappings
        Put the following line in your vimrc.
>
                let g:textobj_syntax_no_default_key_mappings = 1
<
        Then textobj-syntax doesn't define the default key mappings.

If you want to (re)define the default key mappings
        Use |:TextobjSyntaxDefaultKeyMappings| to (re)define the default key
        mappings.




==============================================================================
EXAMPLES                                        *textobj-syntax-examples*

See |textobj-syntax-introduction|.




==============================================================================
BUGS                                            *textobj-syntax-bugs*

- Because of the definition of the current syntax highlighting,
  |<Plug>(textobj-syntax-a)| and |<Plug>(textobj-syntax-i)| may not select
  a region of text as you expect.

- The current selection is not extended like |aw| nor |ip|
  whenever |<Plug>(textobj-syntax-a)| or |<Plug>(textobj-syntax-i)| is
  repeated in Visual mode.

- So that [count] is just ignored.

- See |textobj-user-bugs| for further information.




==============================================================================
CHANGELOG                                       *textobj-syntax-changelog*

0.0.0   2009-07-18T05:30:23+09:00
        - Initial version.




==============================================================================
vim:tw=78:ts=8:ft=help:norl:fen:fdl=0:fdm=marker: