Fix spelling
notebook: cleanup
vim: Fix typos
vim: Support count before modifier

For commands with a modifier, the optional count may precede either
the command or the modifier. The latter is slightly more intuitive
in many cases ("delete two words" vs. "two delete words"), so add
support for it.

https://bugzilla.gnome.org/show_bug.cgi?id=737909
vim: Keep cursor on changed word for ctrl-a/x

Vim's ctrl-a/x commands keep the cursor at the end of the modified
word, which allows for repeated increments/decrements. Match that
behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=737910
vim: Take count into account when deleting/yanking whole lines

Currently we only delete/yank a single line when using dd/yy,
fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=737911
vim: Handle count in delete_to_end

'D' is documented to "Delete the characters under the cursor until the
end of the line and [count]-1 more lines". Do that.

https://bugzilla.gnome.org/show_bug.cgi?id=737911
vim: Factor out apply_motion() method

This saves a couple of lines and fixes count being ignored in yank.

https://bugzilla.gnome.org/show_bug.cgi?id=737912
vim: Change 'requires_modifier' bool to a flag type

Whether a command requires a modifier or not is not the only way
vim commands may differ. To avoid parameter creep as support for
those is added, make the parameter a flag.

https://bugzilla.gnome.org/show_bug.cgi?id=737912
vim: Generalize support for {visual}commands

Replace the current workaround for yank with a VISUAL flag to mark
commands that can be used with an existing selection. This is still
quite different from the handling in vim, where selections constitute
a separate mode with its own command set - so 'y' in normal mode is
a different command than '{visual}y' (a.k.a. 'v_y') in visual mode.
Usually {visual} commands correspond closely to a normal mode command
using the same key though, so this approach should work just fine
for the most common cases.

https://bugzilla.gnome.org/show_bug.cgi?id=737912
vim: Add support for change and substitute commands

The c-commands are handy shortcuts for delete-and-start-insert,
's' is a (surprisingly handy) shorthand for 'cl' ...

https://bugzilla.gnome.org/show_bug.cgi?id=737961
vim: Fix selection-bound off-by-one error in forward-word

'w' should move to the start (e.g. first character) of the next word.
The iter we move around indeed corresponds to this position, so the
movements without a selection turns out right - however when using
the iter as selection-bound, the selections extents up to - but not
including - the iter's position. Moving the iter one character further
fixes this, though we temporarily break its use as modifier ('dw') due
to another off-by-one error in the opposite direction.

https://bugzilla.gnome.org/show_bug.cgi?id=737959
vim: Differentiate between inclusive/exclusive motions

Motions are either inclusive or exclusive. While there is no difference
when used standalone, when the motion is used as modifier to a command,
the range of characters the command applies to differs - in case of an
exclusive motion, the command does not apply to the left-most character
described by the motions.
An example probably illustrates it best - with a buffer of 'foo bar baz',
and the cursor at the beginning of the 2nd word:

 - 'de' deletes 'bar' (as 'e' is an inclusive motion)
 - 'dl' deletes 'b' (as 'l' is exclusive)
 - 'dh' deletes the space before 'bar' (as 'h' is exclusive as well)

The current behavior implements the one for inclusive motions, this
patch flags exclusive motions as such and corrects their behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=737959
vim: Support linewise motions

Motions can be either character- or linewise when used as modifiers
to a command. The commands will operate on entire lines when the
motion is linewise, e.g. 'dj' deletes two lines (rather than from
the cursor position to to the same column on the following line).
Add another flag to support this.

https://bugzilla.gnome.org/show_bug.cgi?id=737959
vim: Add additional parenthesis to make compilers happy

Gah, I updated the patch for MOTION_EXCLUSIVE and forgot to update
the LINEWISE one ...
vim: use private search context/settings for VIM-style search.

This also implements the :nohl command to turn off search highlighting.
It needs additional work, to wrap the search around to the end of the
file when no match was found.

Additionally, this helps reduce the reliance on Builder for search
features.
vim: remove dependence on Builder for initiating search.

This allows the consuming code to hook to begin_search and show their
own search dialog. Useful for consumers outside of Builder.
vim: add support for `:set filetype=` command.
vim: add support for `:syntax on` and `:syntax off`.
vim: add support for `set nu` and `set nonu`

This allows enabling/disabling line numbers on a GtkSourceView.