|
|
|
|
|
by kragen
672 days ago
|
|
i haven't pushed it to github yet, but i have a keybinding for alt-* similar to the alt-` binding at https://github.com/kragen/kragen-.emacs.d/blob/master/init.e... which italicizes the previous word. that way, to italicize a single word, which is the most common case, i only have to press alt-* once. successive presses expand the italicized region leftwards over more words (this happens whenever the cursor is directly to the right of a *; it isn't activated by an invisible bit that remembers whether the previous command was also an alt-*) (it also ought to italicize the selection when there's an active selection, but i haven't implemented that yet) i think this is a superior interaction paradigm to the paradigm where ctrl-i sets an italics mode that doesn't visibly change anything near the cursor, but affects the future text you type. that design not only usually requires more keystrokes but causes mode errors. this is how ctrl-i and ctrl-b should always have worked, and if larry tesler had thought of the idea by 01983, that's how they always would have worked however, the keystroke ctrl-i is easier to type than the keystroke alt-* |
|
I have a tooling issue with your method, perhaps in the same manner as you feel about C-i. To me "italicize $count previous words" makes far more sense than expanding the region on repeated calls. Although to be fair I can wrap over visual mode for that functionality which would feel more comfortable to me; "ge" end of previous word, "v", $navigation, ...
My point - to the extent I have one - is that there is probably a degree of personal comfort that colors our reactions to people using C-i.
¹ Basically "imap <C-S-8> <Esc>bcw*<C-r>-*<C-o>w". I'll give it some more thought, along with adding v:count and non-* support, before it hits my vimrc.