Well Ben,
On 06/11/2012 11:36 AM, Ben Fritz wrote:
>> Without such an ability, a small feature of my script
>> will give incorrect results. I certainly do not want to
>> have to go through some massive effort to get this to
>> work; I was hoping for some already built-in Vim
>> capability - Vim is really such an open environment.
>>
>
> I'm really curious what this script is that you are making, that you want to make changes which are not part of the undo tree and are not repeatable with '.'. What sort of changes do you think people would want to have these characteristics?
>
I am not really ready for a general announcement, maybe a couple of
weeks away, but for console Vim I've got a general forms capability.
First, some background. While working on a Scala logger I wanted
to use the Scala/Ensime binding https://github.com/jlc/envim
to aid in the develop. I wrote some bugs against the Envim
code and made some contributions, but when I got to implementing
some of the refactoring capabilities of Ensime in Envim I
determined that what was needed was a forms capability.
Some of the refactoring commands required entering a number of
options. Looking at the forms script available currently at vim.org
I found them rather weak. So, I created a general console
Vim forms library which includes widgets:
Labels (horizontal and vertical),
TextArea,
Fixed Length Field Editor,
Variable Length Scrolling Field Editor,
Variable Width/Height Scrolling Text Editor,
RatioButtons,
CheckBoxes,
ToggleButtons,
Buttons,
Select Lists,
MenuBars, and
Menus.
Still have to do a ComboBox with dropdown, but that should not be hard.
A sophisticated layout capability which includes horizontal and
vertical alignment, horizontal and vertical boxes and tables.
Also, I support the unicode extended box drawing characters.
Each widget can specify its highlighting or use its parents.
Tab-based navigation with current active widget "hotspot" highlighting.
As an example of the libraries generalness, I have re-implemented
about 95% or more of the gvim menus (have not done to gvim toolbar yet)
so that Vimers who do not use gvim can still have a menu system
(and context based popup menus).
If you look at the gvim menus, they support underlining a
character in each label which serves as a mnemonic for that
item - I've duplicated that in my system.
It is my expectation that Vim console user might use the
menu and context popup menu just like the gvim users do;
especially, new users unfamiliar with Vim commands.
Second, when initially configuring a new plugin, with the forms
system the user can be presented with forms to help guide such a
configuration task.
Lastly, I will go back to the Envim code and use the forms to help
enter the necessary options for the various Scala refactoring
commands as needed.
So, to my issue with repeat '.' support. The gvim Edit menu has
the Repeat menu item which executes '.'. For my system to do
the Repeat operation, any of the menu drawing commands, etc.
which where used to display the menus must be removed from
the "remembered command" and the previous "remembered command"
re-installed as the last command.
Richard
--
Quis custodiet ipsos custodes
--
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
Monday, June 11, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment