1

Re: Shell commands

Firstly let me say this seems to be a superb product, and unless I find any show stoppers I will be buying it at the end of my trial period.
There are a couple of things that my collegues and I have noticed however.
First, and probably most important is shell commands.
The two forms we use all the time in vim are the filter form (selecting a block and doing something like ":!sort") and the read output of form (for doing things like ":r !uuidgen -s"). Is there any chance of support for this arriving in the near future?
Next is that none of us have been able to get the F10 key to do anything other than activate the menu (like a press of the alt key would do). We were trying to bind it to the normal dev studio debugging commands (StepOver and RunToCursor), have tried both in studio key mappings and :map forms, neither worked.
Another thing is could you support :source for reading vimrc files? Sometimes when doing specific tasks I use this in vim to load a new keymapping.
And finally <C-A-S-V> crashes dev studio (7.1 2003) for us. Mosly I just want this to work so when some poor misguided fool that does not use vim comes to my machine I can swich to a mode they understand smile
Thanks
    Ian

2

Re: Shell commands

Hi Ian,

Thanks for the kind comment. Support for the ! command is indeed planned for a future release, and the other requests are also something that will be added at some time (:source). I would be grateful for a description of what :r does, as I'm not familiar with it myself - I will look at vim's documentation, but very often a description from the point of view of someone who uses it is much more useful.

With regards to the F10 binding and the C-A-S-V crash, can you send me the contents of the two lists that are shown in Tools|Options|ViEmu->Keyboard? You can copy and paste the contents easily. That should be helpful.

It will take a bit of time for me to research the issue, as I'm moving to a new town, but I'll be able to look at it in detail during the week.

Thanks and best regards,

  Jon

3

Re: Shell commands

:r is short for :read, :r {filename} inserts the contents of {filename} after the cursor
I rarely use it to read a file though.
The :r !{command} form reads the standard output of {command} and inserts it after the cursor, a very useful command.
The example I gave runs uuidgen and inserts it's output (a c formated struct initialiser of a uuid) into the file, something I do all the time.
The two lists in the keyboard dialog both say
(None)
Thanks again.
    Ian

4

Re: Shell commands

I realised there is some stuff I forgot to mention, that may have a bearing on the F10 thing.
The return and backspace keys both did not work when I first tried, I added these mappings
  imap <BS>       <S-BS>
  imap <CR>       <S-CR>
to my .vmurc to get round the problem
Also, the tab key does not work.
    Ian

5

Re: Shell commands

Ian,

Thanks for the detailed description of the :r command and its uses.

You need to restore VS's default keybindings. ViEmu has caused them to not be available - there is a problem in the initial keybinding scan that sometimes causes this. Here is a more detailed explanation and the steps to fix this with VS.NET 2003, from an answer to another user:

-----------------------------------------------------------------------------------------------------------------------------

With those details, I think I know what happened. Most probably, although it's not completely necessary in order to result in this behavior, you installed ViEmu before VS.NET was ever run. The first time VS.NET is run it sets up all sorts of configuration tables from scratch. Also, the first time ViEmu is run it scans the active keybiding scheme for clashing keybindings and removes them, creating a new "ViEmu" keyboard scheme. Unfortunately, if both happen at the same time, it is possible that ViEmu will run before VS.NET's startup process (not because of multithreading issues, but because the startup sequence ordering is not well documented nor accessible). And, in this first scan, ViEmu will create the "ViEmu" keyboard scheme based on an empty list, thus resulting in a complete lack of keybindings (such as the assignments for the RETURN and BACKSPACE keys). This is only noticeable for these keys and in insert mode, because the behavior of most keys is implemented directly by ViEmu (RETURN in normal mode, etc...) or hardcoded in VS's editor (regular alphabetic keys in insert mode).

The reason I haven't fixed this is that it only happens in some cases (although a few people have already experienced this), it's not easy to fix (it's not easy to control the startup sequence), and I have developed a better method for "keybinding overriding" in ViEmu/Word+Outlook, which I plan to include in a future release of ViEmu/VS. This new method does not rely in modifying VS's keybindings at all, so it will be much simpler and will cause fewer hassles.

In any case, the steps to fix it in your configuration are the following:

1) Go to Tools|Options|Environment|Keyboard
2) Select the "ViEmu" keyboard scheme from the drop down
3) Click in the "Delete" button (answer yes to the msgbox)
4) Select the keybinding scheme you prefer (VC++ 2, VC++ 6, Visual Studio, etc...)
5) Select the ViEmu options page (Tools|ViEmu)
6) *Close* the options dialog (this will "flush" and apply all the changes behind the scenes)
7) Reopen Tools|Options, it should be in ViEmu as that's were you left it
8) Click in "Keyboard"
9) Click in "Forget" below the left list (answer yes to the confirmation msgbox)
10) Click in "Save & remove" under the right list (answer yes to the confirmation msgbox)

And close the Options dialog. It's a bit of a hassle, but that should leave you with a proper list of non-clashing keybindings, proper restoring of the original ones when Ctrl-Shift-Alt-V is used to toggle ViEmu on and off, etc... as I described above, I have plans (and code) for a much simpler system in the future, so this problem will disappear in future versions of ViEmu/VS.

Thanks for being so understanding and let me please apologize for the hassles again.

Best regards,

  Jon

-----------------------------------------------------------------------------------------------------------------------------

After this, you should be all set, you can remove the mappings for BS and CR in .viemurc, and C-S-A-V should work fine.

I apologize for the problems, this will be properly addressed in one of the next releases of ViEmu.

Let me know if I can help with anything else!

6

Re: Shell commands

Fantastic, that fixed it.
I noticed that post when searching the forums, but because of the implication that it only happened when you had not run VS.NET before installing ViEmu I did not try it (I have been running this copy of VS.NET for a couple of years now).
    Ian

7

Re: Shell commands

Cool, I'm glad it helped. Yes, this is a "dark area" of ViEmu behavior, and I'm hoping I can get it to work pretty soon, as it's quite annoying and it's also becoming the most common support incident! At least it means other areas are pretty stable smile

Best regards,

  Jon