diff --git a/plugin/indent-object.vim b/plugin/indent-object.vim index afb8edd..2a31832 100644 --- a/plugin/indent-object.vim +++ b/plugin/indent-object.vim @@ -10,10 +10,10 @@ " 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 @@ -24,17 +24,17 @@ " "-------------------------------------------------------------------------------- -" Mappings excluding line below. -onoremap ai :cal HandleTextObjectMapping(0, 0, 0, [line("."), line("."), col("."), col(".")]) -onoremap ii :cal HandleTextObjectMapping(1, 0, 0, [line("."), line("."), col("."), col(".")]) -vnoremap ai :cal HandleTextObjectMapping(0, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv -vnoremap ii :cal HandleTextObjectMapping(1, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv - " Mappings including line below. -onoremap aI :cal HandleTextObjectMapping(0, 1, 0, [line("."), line("."), col("."), col(".")]) -onoremap iI :cal HandleTextObjectMapping(1, 1, 0, [line("."), line("."), col("."), col(".")]) -vnoremap aI :cal HandleTextObjectMapping(0, 1, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv -vnoremap iI :cal HandleTextObjectMapping(1, 1, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv +onoremap ai :cal HandleTextObjectMapping(0, 1, 0, [line("."), line("."), col("."), col(".")]) +onoremap ii :cal HandleTextObjectMapping(1, 1, 0, [line("."), line("."), col("."), col(".")]) +vnoremap ai :cal HandleTextObjectMapping(0, 1, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv +vnoremap ii :cal HandleTextObjectMapping(1, 1, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv + +" Mappings excluding line below (for specific file types (like Python)) +au FileType python,coffee,haml,yaml,slim onoremap ai :cal HandleTextObjectMapping(0, 0, 0, [line("."), line("."), col("."), col(".")]) +au FileType python,coffee,haml,yaml,slim onoremap ii :cal HandleTextObjectMapping(1, 0, 0, [line("."), line("."), col("."), col(".")]) +au FileType python,coffee,haml,yaml,slim vnoremap ai :cal HandleTextObjectMapping(0, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv +au FileType python,coffee,haml,yaml,slim vnoremap ii :cal HandleTextObjectMapping(1, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])gv let s:l0 = -1 let s:l1 = -1