viWord 0.3

I am sticking to the “Release early, release often” mantra!

Well, the truth is, I’ve been using it and have been find lots of fault with it so I had to fix it for myself.

1. New commands – :q :q! :wq (this one’s for Dean)
2. Goto line using count-G (23G brings you to line 23, as would :23)
3. Delete word in both directions – dw db
4. Delete to end-of-line without getting into insert mode: D
5. Binds all other symbols ([{}]\|;'"?,<.>) so that hitting one of these in normal mode won’t suddenly insert it into the document.
6. Search backwards: ?
7. Fixed some glitches.

Grab it here!

Leave me a comment if you like it, hate it, or doesn’t work for you…

7 Responses to “viWord 0.3”

  1. Charlie Stross Says:

    It doesn’t work. I installed it okay, and ran the “emulate” macro. Word gave an error: “Runtime error ‘5346’: Word cannot change the function of the specified key.” The “Debug” button is greyed out, so at that point I’m stuck (I last tried Word macro programming about a decade ago, so I’m totally out of it at this point).

    Any suggestions?

  2. Mike Says:

    I note the "e" command (move to the end of the line) is missing. That is a useful one — could it be added to your viWord todo list?

    Thanks — I've been looking for vi emulation for Word for a very long time!

  3. wil Says:

    You mean end-of-word… yeah I'm very irritated that I can't use it too. It shall be in the next release.

  4. Alex Harford Says:

    The offending line for RT error 5346:

    KeyBindings.Add wdKeyCategoryMacro, “key_c_R”, BuildKeyCode(wdKeyControl, wdKeyR)

    This is in WinXP.

  5. wil Says:

    I suspect that it is due to Ctrl-R, which I tried to bind to Redo. You could enable the "Debug" button if you first open in Word before running the emulate macro. This way, it will bring you to the code editor and highlight the offending line.

    Please let us know if you get it to work, since there are a few other OS/X users who wanted to try it out.

  6. wil Says:

    Thanks Alex. Ctrl-R is already bound to "Align paragraph at right indent" by default. In VIM, it is used for the Redo operation.

    I guess we could either unbind the original function first then rebind to Redo. Or we could use the Ctrl-Y binding for Redo (default in Word).

    What do you think?

  7. Anonymous Says: