1

Re: map command list +

I have just started using viemu for VS and am having a little trouble finding my way around at times.  Part of the problem, I'm sure is that I am a long-time user of vi but have used vim very little so in some respects I have a two-step translation to make when the documentation refers back to vim.

As I have always made heavy use of the map command, a lot of my difficulties start there.  For one, I can't figure out how to list out my key mappings.  If I enter:

:map<CR>

I just get the response, "Key not recognized"

I was also a bit thrown by the fact that <C-V> still does a Windows paste function as I am used to it being used for quoting non-standard characters like control characters (but not that vim block-mode thing, whatever that is).  I quickly caught on that most, if not all, of the non-standard characters I would use are referenced with the <...> notation (I presume, then, to use the angle brackets for other purposes, one quotes them with a backslash, correct?).

Finally, I would really like to encourage you to implement multi-key mappings in the near future.  I, for one, have an .exrc file with some sixty lines in it, mostly map commands and nearly all multi-key.  Of course, most would be useless here since many rely heavily on shelling out, which isn't possible directly, or on other ex commands which are not implemented here.  Some are obsolete even in their original environment but I've never bothered to clean house.  Even if I were only to use a fraction of that number, however, there are too few single-character commands which are not usurped by viemu without resorting to function keys and modifiers such as control, shift and alt.  Add to that the number of those which are usurped by Visual Studio and it is already a crowded field but function keys and modifiers are a poor answer anyway -- all those arguments about the efficiency of avoiding the mouse apply to a lesser degree to function keys and modifiers -- they don't rest under one's fingers either and the function keys can be a bit of a stretch requiring diversion of both the hand and the eyes.

In discussing the feature you implied that part of the difficulty of implementation is the key-timing for disambiguation, but I don't think you really need that.  My memory may be faulty but I don't believe that approach is the way ambiguous mappings were originally handled in vi (and frankly, I find that approach to be confusing and error prone).  The way most systems I have worked on have handled it (to my memory) was to collect characters without response until an unambiguous string had been entered and then take the appropriate action.  This means, worst-case, that at times the user must enter a possibly-superfluous character to disambiguate things in order to force the macro to take effect, but that rarely happens if a person is careful about map definitions (e.g. use alternatives like ;ab and ;ac but avoid substrings like ;a and ;ab) and even if it does it is usually pretty easy to find an innocuous character to add.  I suspect that this approach would be much easier to implement and unlike the tiimeout approach, it is much more reliable -- one never has to worry about the wrong (and possibly destructive) macro being run because one hesitated a bit too long during typing.

All that said, I want to thank you very much for implementing this -- it is something I have wanted for a long time.  I would love to see more ex functionality, etc. added, but I know that a lot of the vim functionality adds features which will help offset the loss and some aspects of VS can no doubt be accessed to replace some of the missing functionality.  Unfortunately, it all means reinventing my macros and teaching my fingers some new strokes, but in the long run, I know it is going to make using VS a whole lot easier.  It is also nice to see that you are so active at expanding and improving your products.  Great job -- keep up the good work.

- Les

2

Re: map command list +

Hi Les,

Indeed, the functionality of :map listing the current mappings is not implemented. This is planned for some future release, the same as multi-key mappings. I thought that having basic mapping would be more useful than no mapping at all! And improvements can be done in future releases.

You are right that <Ctrl-V> doesn't work as the 'escape' character for control characters. In vim, it allows you to start a 'block-visual' selection mode (Ctrl-Q does the same thing, that's why I leave Ctrl-V bound to Paste by default). As you saw, ViEmu's keypress notation uses special key names in angle brackets for non-ascii keys (and a backslash can be used before to insert a literal '<' or a literal '\' itself).

Thanks for the very detailed explanation on multi-key mappings. I understand their need, and it is indeed planned for ViEmu 3.0, hopefully ready at some point later this year. I'm hiring extra help to develop this version, so hopefully I will be able to provide a compelling new version of ViEmu.

Thanks for the kind comment and putting the effort to explain everything in detail.

Best regards,

  - Jon

3

Re: map command list +

Thanks for the explanation.  No doubt about it -- basic mapping is better than no mapping at all.

Given all you have been able to accomplish on your own, if you find capable help to assist you with 3.0, it should really be something to see.  I will be looking forward to that.

- Les

4

Re: map command list +

Thanks!

- Jon