kana / vim-textobj-function

Vim plugin: Text objects for functions
http://www.vim.org/scripts/script.php?script_id=2619
141 stars 34 forks source link

Mapping doesn't work as expected. #12

Open trusktr opened 9 years ago

trusktr commented 9 years ago

I use this in my vimrc:

                noremap i k
                noremap j h
                noremap k j
                noremap h i

etc, so that I can use IJKL for movement instead of HJKL. It's more like arrow keys that way. For text objects, I use h, and in VISUAL mode I can press i to move up. With vim-textobj-function, I was expecting vhF to select a function, but instead I have to use viF, which means I can't move up!

Is there some way you can make this work no matter what key the user maps to i?

Awesome plugin. :)

kana commented 9 years ago

In that case, you should append vmap h i to allow remapping.

trusktr commented 9 years ago

@kana That doesn't work. noremap already maps in Normal, Visual, Select, and Operator-pending. I didn't see any mapping in your source. hmmm...

kana commented 9 years ago

It works for me. Did you really append the mapping to your vimrc?

trusktr commented 9 years ago

@kana It's in my .vimrc, line 613.