* Bram Moolenaar <[email protected]> [120413 05:42]:
> Christian Brabandt wrote:
> > Here is a patch, that makes :dig! display only user-defined digraphs and
> > :dig! xy remove the digraph, that is defined by the chars xy
> > 
> > This sounds like a useful addition.
> 
> If ":dig! xy" deletes a digraph I would expect ":dig!" to delete all
> user-defined digraphs.  Thus have "!" mean delete.
> 
> Can we use another command to list user-defined digraphs?  Perhaps
> ":dig ?"?
> 
> This patch would also need documentation.  And a test would be good too.

Using :dig! to display and :dig! xy to delete is terribly inconsistent.
To remove a highlight, vim uses :hi clear, to remove a map, :unmap.  I
would suggest :undig {char}{char} or :undig {number} to remove a
digraph.

:dig! {char}{char} or :dig! {number} could be used to list digraphs
matching certain criteria.  I would even go so far as to allow :dig!
{char} to find all digraphs with the specified char in either position.
If char is ambiguous (i.e.  a single digit or two digits) treat is as
both {char} or {char}{char} and {number} (list all matches).

While :dig! without arguments would list user-defined digraphs, :dig!
with an argument would list all matching digraphs, both pre-defined and
user-defined.

...Marvin

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui