cxw42 / vimword Goto Github PK
View Code? Open in Web Editor NEWUse a subset of Vim normal-mode editing commands in Word (VBA add-in)
Home Page: https://vi.stackexchange.com/a/16006/1430
Use a subset of Vim normal-mode editing commands in Word (VBA add-in)
Home Page: https://vi.stackexchange.com/a/16006/1430
E.g., a paragraph of word<NBSP><FIELD>^p
: vW at the start of the paragraph selects the field, even though it should have stopped after the NBSP. This is because the line
proczone.MoveEndWhile CSET_WS, wdForward
grabs the field even though it shouldn't. I believe this is a Word bug/quirk --- I've seen similar things before.
E.g.:
e
is a no-op:
, t:
is a no-op (and likewise for any single character)In those cases, move the cursor one space in the correct direction and try the motion again. This is a symptom of the fact that Vi positions the cursor on characters, and Word positions the cursor between characters.
The dialog opens on a hotkey, similar to Esc
entering normal mode. Add support for staying in normal mode where appropriate, i.e., reopening the dialog ready to accept a new command after the previous command has finished. Similarly, consider the dialog-closed state to be a hybrid of insert, replace, and visual modes. That way you will be able to use Word almost as Vim - i
c
r
&c. to close the dialog and insert text, and <hotkey>
to re-enter normal mode.
E.g., currently de
with Tracked Changes on leaves the cursor at the beginning of the word. However, it should move it to the end of the word.
I'm currently using Microsoft Word 2013 (64-bit), and I seem to be getting an error trying to run this using an Add-in shortcut. Since you didn't explicitly mention it, does the Add-in also work on the 64-bit version of Microsoft Word?
()
-delimited text[]
"{}
"Plus:
StoryType = wdCommentsStory
)ao<n>
to select everything between adjacent headers of level <n>
)(Not in Vim ;) )
Currently, tf"
doesn't jump to a smart quote. Expand that and similar definitions.
"
: also include curly open/close double quotes (and maybe other quotation marks, for internationalization?'
: ditto, but single quotes-
: all Unicode dashes and hyphensBecause tommcdo/vim-ninja-feet#3 is very nice, and I would like to have the same.
Currently vas
stops at the first period, which is not the end of the English sentence if that is a period in e.g.
. Keep a table of common abbreviations and expand the as
and is
text objects past those abbreviations to a period that is not in an abbreviation or to the end of the paragraph.
Repro (Word 2013):
VimWord.dotm
).VimWord
and add a comment. Type a few chars in the comment.VimWord
, run VimDoCommand
and enter viw
.Expected: The text VimWord
is selected
Observed: Word locks hard.
Analysis: The vmIWord
case in mVimWord
says:
proczone.Expand wdWord
coll = False
If count > 1 Then proczone.MoveEnd wdWord, count - 1
proczone.MoveEndWhile CSET_WS, wdBackward
When in Print Layout mode, the proczone.Expand
grabs the comment marker but doesn't realize it. Then, the MoveEndWhile
locks. I think Word is trying to move backwards past the comment marker, but can't because the comment marker is invisible.
The same code works fine in Draft (Normal) mode. MoveEnd wdWord
stops before the comment marker, and MoveEndWhile
is a no-op.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.