michaeljsmith / vim-indent-object

Vim plugin that defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts, etc.
http://www.vim.org/scripts/script.php?script_id=3037
MIT License
735 stars 61 forks source link

way to remap ? #31

Closed ArbitRandomUser closed 3 months ago

ArbitRandomUser commented 4 months ago

i would prefer to interchange what vaI and vai. for example in julia which has end statements and the standard acceptable formatting is

function something (...)
   code
   more code
   even more code
end

vai is quicker than vaI i would like to use the quicker vai to select the end along with the indented block

michaeljsmith commented 3 months ago

Hi, thanks for the feedback. The current bindings are chosen to maintain consistency with the existing text objects (word, sentence, etc). Breaking that consistency would make it harder for people to learn to use and remember the keybindings.

However it should be straightforward for you to rebind the keys locally using :noremap etc?

ArbitRandomUser commented 3 months ago

now that i think about it , indeed consistency would be better.

however just curious how would one go about noremaping to interchange two plugin keybindings ?

vnoremap ai aI
vnoremap aI ai

this wouldn't work.