On 13-Apr-09 9:18, Andy Spencer wrote:
> This adds a text object ('aa' or 'ii') for the entire buffer. I don't
> know if this is worthy of being included by default, but I find it
> convenient for things such as gqaa and =aa.
I've given this some more thought, and I would like to propose different keys
for this feature. First off, 'aa' and 'ii' look like suitable keys, but all
other Vim text objects use the same second key to describe the object, and
prepend 'a' / 'i' to mean "a" or "inner" scope, respectively. (E.g. 'ap' / 'ip'
: a / inner paragraph. )
Secondly, I have a script (posted long ago as a vimtip) that defines 'ai' /
'ii'
text objects for selection of outer / inner indent. I think that something like
"inner indent" is a better fit for the 'ii' mnemonic than "entire buffer,
excluding leading / trailing empty lines".
How about using 'b' for buffer, resulting in 'ab' and 'ib' keys? 'b' already
stands for "buffer" in commands like :bnext, the resulting mnemonics would fit
into the existing naming scheme for text object, they're still free, and only
slightly more awkward to type.
As always, users who want 'aa' / 'ii' or any other keys can define a simple
mapping to remap 'ab' / 'ib'; but IMO the default keys should be consistent
with
the other text objects.
-- regards, ingo
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---