On Jun 21, 3:41 pm, Benjamin Fritz <[email protected]> wrote: > I have remapped f, F, t, T, ',', and ; to also highlight the character > they match, using <expr> mappings so that they work well in not only > normal mode, but also visual and operator-pending modes. > > These mappings use getchar() to get the character to jump to, inspired > by the example given in :help getchar(). >
The <expr> mappings were used initially, because for whatever reason, :normal! f... and friends acts as an exclusive motion, when my mappings need to be inclusive just like normal-mode f, F, t, and T. I have just discovered :help o_v which should allow me to dispense with the <expr> mapping for normal and operator-pending mode, by using "normal! v..." instead of "return ..." in operator-pending mode (normal mode works fine without the <expr> mapping). However, I'm still stumped on how to do this with visual mode. I'd rather not get into a complicated solution of dropping out of visual mode, finding the character, going back to the *same* visual mode, and jumping to the beginning with `<. Can anyone think of a good visual-mode solution? I suppose I might be able to make something work by appending l/h to the end of the command in visual mode...but that's another ugly hack I'd rather avoid. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
