evil:ergo-evil.git
7 years agoAdd tests for `evil-move-paragraph'
Frank Fischer [Mon, 14 Mar 2011 09:32:27 +0000 (10:32 +0100)]
Add tests for `evil-move-paragraph'

7 years agoMake `evil-move-paragraph' to move exactly to paragraph boundaries
Frank Fischer [Mon, 14 Mar 2011 08:36:47 +0000 (09:36 +0100)]
Make `evil-move-paragraph' to move exactly to paragraph boundaries

This is required for all object motion functions in evil. A paragraph
is defined as starting on the first non-whitespace character after an
empty line or bob and ends at the last non-whitespace character before
an empty line or eob. In particular, a paragraph does not start at bob
unless there is a non-whitespace character and similar at eob.

7 years agoMerge with master, use new test macros
Frank Fischer [Mon, 14 Mar 2011 07:57:39 +0000 (08:57 +0100)]
Merge with master, use new test macros

7 years agoRedefine helper functions
Vegard Øye [Sun, 13 Mar 2011 22:12:50 +0000 (23:12 +0100)]
Redefine helper functions

Replace `evil-verify-around-point' with `evil-test-text', which splits
the EXPECTED argument in two: BEFORE for text preceding point and
AFTER for text succeeding point. These strings are not regular
expressions; use the optional BEFORE-PREDICATE and AFTER-PREDICATE
arguments to check for buffer boundaries.

Also replace `evil-test-editing' with `evil-test-macro' and
`evil-test-editing-clean' with `evil-test-buffer-edit'. Finally,
define `evil-test-code-buffer' in terms of `evil-test-buffer'
to avoid duplication.

7 years agoCleanup `evil-move-chars' and `evil-define-union-move'
Frank Fischer [Sun, 13 Mar 2011 19:36:55 +0000 (20:36 +0100)]
Cleanup `evil-move-chars' and `evil-define-union-move'

7 years agoObject motions extend to buffer boundaries
Frank Fischer [Sun, 13 Mar 2011 19:31:48 +0000 (20:31 +0100)]
Object motions extend to buffer boundaries

All object motions based on `evil-move-forward-end' and similar
functions extend to buffer boundaries. An error is raised if and only
if point is already at the appropriate buffer boundary before the
motion. The end-of-line problematic (newline at the end of non-empty
lines) is also respected.

7 years agoRemove `evil-negate-chars'
Frank Fischer [Sun, 13 Mar 2011 11:14:22 +0000 (12:14 +0100)]
Remove `evil-negate-chars'

7 years agoRename *-select-* functions to *-move-*
Frank Fischer [Sun, 13 Mar 2011 11:13:51 +0000 (12:13 +0100)]
Rename *-select-* functions to *-move-*

Because all those functions essentially work like typical Emacs motion
functions move is a better name.

7 years agoCorrect return value of paragraph selector `evil-select-paragraph'
Frank Fischer [Sun, 13 Mar 2011 11:00:14 +0000 (12:00 +0100)]
Correct return value of paragraph selector `evil-select-paragraph'

7 years agoSimplify sentence movements based on paragraphs.el
Frank Fischer [Sun, 13 Mar 2011 10:58:44 +0000 (11:58 +0100)]
Simplify sentence movements based on paragraphs.el

7 years agoModify sentence movements to behave more like ViM
Frank Fischer [Sat, 12 Mar 2011 20:47:20 +0000 (21:47 +0100)]
Modify sentence movements to behave more like ViM

Those functions essentially try sentence and paragraph movements and
use the better result.

7 years agoMake motion selectors more Emacsish, basic implementation for sentences and paragraphs
Frank Fischer [Sat, 12 Mar 2011 19:42:07 +0000 (20:42 +0100)]
Make motion selectors more Emacsish, basic implementation for sentences and paragraphs

Selector functions now work in the spirit of `forward-word' and
friends. If given a positive count they move point to the first
character after the count-th word, if given a positive count they move
point to the first character of the count-th previous word. The return
value is always the number of objects that could not be moved.

Unfortunately, most Emacs functions do not follow these interface
strictly, especially the return value. The implementations for paragraphs and sentences do currently not follow ViM specifications.

7 years agoRemove `evil-state-func'
Vegard Øye [Fri, 11 Mar 2011 21:21:27 +0000 (22:21 +0100)]
Remove `evil-state-func'

It's cleaner to use `evil-change-state' for disabling the current state.

7 years agoFix `evil-select-backward-end' and add tests for word movements
Frank Fischer [Fri, 11 Mar 2011 18:58:03 +0000 (19:58 +0100)]
Fix `evil-select-backward-end' and add tests for word movements

7 years agoAdd tests for `evil-negate-chars' and `evil-select-chars'
Frank Fischer [Fri, 11 Mar 2011 18:03:49 +0000 (19:03 +0100)]
Add tests for `evil-negate-chars' and `evil-select-chars'

7 years agoRemove `evil-truncate-vector'
Vegard Øye [Fri, 11 Mar 2011 16:28:30 +0000 (17:28 +0100)]
Remove `evil-truncate-vector'

`substring' works with vectors too.

7 years agoFix suppression tests
Vegard Øye [Fri, 11 Mar 2011 16:26:20 +0000 (17:26 +0100)]
Fix suppression tests

Ensure that the state's own bindings for "y", "u" and "e" are disabled.

7 years agoSimplify `evil-truncate-vector'
Vegard Øye [Fri, 11 Mar 2011 14:49:43 +0000 (15:49 +0100)]
Simplify `evil-truncate-vector'

This is pretty much the vector equivalent of `nbutlast'.

7 years agoAdd tests for `evil-delete'
Vegard Øye [Fri, 11 Mar 2011 14:46:45 +0000 (15:46 +0100)]
Add tests for `evil-delete'

Delete characters and lines, multiply counts together, and recognize
the "dd" shortcut.

7 years agoAdd tests for `evil-keypress-parser'
Vegard Øye [Fri, 11 Mar 2011 14:44:59 +0000 (15:44 +0100)]
Add tests for `evil-keypress-parser'

Also add an INPUT argument to `evil-keypress-parser' to make it
easier to test.

7 years agoEnsure `evil-extract-count' signals an error for unbound keys
Vegard Øye [Fri, 11 Mar 2011 14:40:55 +0000 (15:40 +0100)]
Ensure `evil-extract-count' signals an error for unbound keys

It calls `key-binding', which may return `undefined' for unbound keys.
To confuse matters more, `undefined' isn't undefined, but is a command
from subr.el whose sole purpose is to call `ding'.

7 years agoAdd basic text-motion and object framework
Frank Fischer [Fri, 11 Mar 2011 13:42:29 +0000 (14:42 +0100)]
Add basic text-motion and object framework

Basic helper functions and implementation for word and WORD motions.

7 years agoAdd tests for `evil-first-non-blank-beg' and `evil-first-non-blank-end'
Frank Fischer [Thu, 10 Mar 2011 17:13:33 +0000 (18:13 +0100)]
Add tests for `evil-first-non-blank-beg' and `evil-first-non-blank-end'

7 years agoAdd further tests and fix `evil-first-non-blank'
Frank Fischer [Thu, 10 Mar 2011 16:29:28 +0000 (17:29 +0100)]
Add further tests and fix `evil-first-non-blank'

Add tests for `evil-first-non-blank' and `evil-last-non-blank' and
narrow `evil-first-non-bank' to current line, which is important for
lines without non-whitespace characters.

7 years agoAdd `evil-extract-count'
Frank Fischer [Thu, 10 Mar 2011 15:09:49 +0000 (16:09 +0100)]
Add `evil-extract-count'

This function can be used to extract the prefix-argument part of a
key-sequence w.r.t. the currently active keymaps.

7 years agoAdd special handling of "0" command
Frank Fischer [Thu, 10 Mar 2011 13:47:50 +0000 (14:47 +0100)]
Add special handling of "0" command

"0" has two meanings in ViM. First it is the motion
'beginning-of-line, second it is a prefix-argument but only if it is
not the first number. The macro `evil-redirect-digit-argument' calls
either `digit-argument' or another command depending on whether "0" is
the first number typed.

Furthermore we have to bind all numbers to `digit-argument' in
evil-motion-state-map and remove those bindings from
`evil-suppress-map because otherwise the binding of the latter
function would overwrite the bindings to "0" in the motion map.

7 years agoAdd Operator-Pending shortcuts like "dd"
Vegard Øye [Thu, 10 Mar 2011 13:20:37 +0000 (14:20 +0100)]
Add Operator-Pending shortcuts like "dd"

The current code is very simple, allowing sequences like "dd" and "gUU",
but not "gUgU". The latter can be implemented by iterating over
`this-command-keys', although it would be necessary to strip off any
prefix keys first.

7 years agoMove `evil-operator-shortcut-map' to the top
Vegard Øye [Thu, 10 Mar 2011 13:18:14 +0000 (14:18 +0100)]
Move `evil-operator-shortcut-map' to the top

A state can now give its own keymaps lower presedence by listing
itself in :enable.

7 years agoAdd `evil-concat-alists' for association lists
Vegard Øye [Thu, 10 Mar 2011 13:11:22 +0000 (14:11 +0100)]
Add `evil-concat-alists' for association lists

`evil-concat-lists' concatenates any list using `eq',
`evil-concat-alists' concatenates association lists using `assq'.

7 years agoPreserve current column in `evil-next-line' and `evil-previous-line'
Frank Fischer [Thu, 10 Mar 2011 10:42:48 +0000 (11:42 +0100)]
Preserve current column in `evil-next-line' and `evil-previous-line'

This behavior is exactly what Emacs does -- but only if the last
command is one of `next-line' or `previous-line'. Furthermore Emacs
moves the cursor to the end/beginning of the last line reached if no
further movement is possible. In contrast ViM does never leave the
column at the buffer boundaries.

7 years agoClean up keyword reading
Vegard Øye [Thu, 10 Mar 2011 08:57:44 +0000 (09:57 +0100)]
Clean up keyword reading

A call to `pop' is more readable.

7 years agoAllow zero-argument motions
Vegard Øye [Thu, 10 Mar 2011 08:33:46 +0000 (09:33 +0100)]
Allow zero-argument motions

Motions can have no arguments or one or more optional arguments.
All motions can therefore be called with zero arguments. If the
motion accepts arguments, it expects the count as the first argument.
(Thus, the count is either a number or nil.)

7 years agoEnsure `forward-char' and `backward-char' receive numerical argument
Vegard Øye [Thu, 10 Mar 2011 06:55:24 +0000 (07:55 +0100)]
Ensure `forward-char' and `backward-char' receive numerical argument

This prevents a (wrong-type-argument number-or-marker-p nil) error.

7 years agoRemove default motion count
Vegard Øye [Thu, 10 Mar 2011 06:43:58 +0000 (07:43 +0100)]
Remove default motion count

If a prefix argument is given, then the count is the numerical value
of that argument. Otherwise, the count is nil.

7 years agoRefill documentation strings
Vegard Øye [Wed, 9 Mar 2011 20:53:56 +0000 (21:53 +0100)]
Refill documentation strings

The first line of the docstring should stand on its own, because
`M-x apropos' displays just that line.

7 years agoMake COUNT argument optional
Vegard Øye [Wed, 9 Mar 2011 20:52:27 +0000 (21:52 +0100)]
Make COUNT argument optional

It defaults to 1.

7 years agoSuppress compiler warnings regarding `next-line' and `previous-line'
Vegard Øye [Wed, 9 Mar 2011 20:37:44 +0000 (21:37 +0100)]
Suppress compiler warnings regarding `next-line' and `previous-line'

Alternatively, we can use `forward-line', but then we will have to
handle screen lines ourselves.

7 years agoMerge remote branch 'origin/lyro'
Vegard Øye [Wed, 9 Mar 2011 19:18:37 +0000 (20:18 +0100)]
Merge remote branch 'origin/lyro'

7 years agoRename `evil-save-transient-mark' to `evil-save-region'
Vegard Øye [Wed, 9 Mar 2011 19:12:06 +0000 (20:12 +0100)]
Rename `evil-save-transient-mark' to `evil-save-region'

Also, let `evil-motion-range' store the type in the global variable
`evil-this-type'. A motion can use this variable to change its type
during execution.

7 years agoAdd `evil-delete' operator
Vegard Øye [Wed, 9 Mar 2011 18:35:17 +0000 (19:35 +0100)]
Add `evil-delete' operator

Currently, this is just a wrapper for `kill-region'.

7 years agoAdd test for `evil-backward-char'
Frank Fischer [Wed, 9 Mar 2011 18:14:53 +0000 (19:14 +0100)]
Add test for `evil-backward-char'

7 years agoSplit `evil-verify-around-point' off from `evil-test-editing-clean'
Frank Fischer [Wed, 9 Mar 2011 16:27:54 +0000 (17:27 +0100)]
Split `evil-verify-around-point' off from `evil-test-editing-clean'

We split this function so we can use the buffer-test without executing
a certain keyboard macro.

7 years agoAdd simple motions
Frank Fischer [Wed, 9 Mar 2011 13:50:14 +0000 (14:50 +0100)]
Add simple motions

First implementation of few simple motions. Note the special case of
"0" which can be both, a motion or a digit-argument. Many tests are
still missing.

7 years agoBind `evil-forward-char' to "l"
Vegard Øye [Wed, 9 Mar 2011 11:52:30 +0000 (12:52 +0100)]
Bind `evil-forward-char' to "l"

It's bound in `evil-motion-state-map'; the other states enable Motion state.

7 years agoAdd `evil-define-motion' macro and define `evil-forward-char'
Vegard Øye [Wed, 9 Mar 2011 11:51:49 +0000 (12:51 +0100)]
Add `evil-define-motion' macro and define `evil-forward-char'

All defined motions are listed in `evil-motions'.

7 years agoAdd motion state
Vegard Øye [Wed, 9 Mar 2011 09:10:18 +0000 (10:10 +0100)]
Add motion state

All motions are bound in the same keymap (`evil-motion-state-map'),
which is reused by other states.

7 years agoRemove :keys from `evil-define-operator'
Vegard Øye [Tue, 8 Mar 2011 20:31:51 +0000 (21:31 +0100)]
Remove :keys from `evil-define-operator'

All key-bindings should go in one place.

7 years agoUse state predicate in Insert state's definition
Vegard Øye [Tue, 8 Mar 2011 20:30:21 +0000 (21:30 +0100)]
Use state predicate in Insert state's definition

This is a clean way to separate activation from deactivation.

7 years agoFix `region-active-p'
Vegard Øye [Tue, 8 Mar 2011 20:29:26 +0000 (21:29 +0100)]
Fix `region-active-p'

There are no active regions without Transient Mark mode.

7 years agoAdd test for exceeding the buffer boundaries
Vegard Øye [Tue, 8 Mar 2011 10:36:20 +0000 (11:36 +0100)]
Add test for exceeding the buffer boundaries

7 years agoEcho motion errors without nonlocal exit
Vegard Øye [Tue, 8 Mar 2011 10:12:36 +0000 (11:12 +0100)]
Echo motion errors without nonlocal exit

This allows for warnings like "End of buffer" without inhibiting
the operator.

7 years agoLet `evil-expand' accept a nil TYPE
Vegard Øye [Tue, 8 Mar 2011 10:01:08 +0000 (11:01 +0100)]
Let `evil-expand' accept a nil TYPE

Then it returns the positions unchanged.

7 years agoUse t as test selector in "make emacs" and "make terminal"
Vegard Øye [Tue, 8 Mar 2011 09:56:48 +0000 (10:56 +0100)]
Use t as test selector in "make emacs" and "make terminal"

Since these rules load a clean Emacs into memory, all defined tests
will be Evil tests.

7 years agoMove insert-state to evil-insert.el and key definitions to evil-maps.el
Frank Fischer [Tue, 8 Mar 2011 08:12:28 +0000 (09:12 +0100)]
Move insert-state to evil-insert.el and key definitions to evil-maps.el

7 years agoMerge compatibility patches from master
Frank Fischer [Tue, 8 Mar 2011 08:09:34 +0000 (09:09 +0100)]
Merge compatibility patches from master

7 years agoAdd compatibility functions for Emacs 22
Frank Fischer [Tue, 8 Mar 2011 08:04:55 +0000 (09:04 +0100)]
Add compatibility functions for Emacs 22

7 years agoSupport repeat-count for repeating operators
Frank Fischer [Mon, 7 Mar 2011 20:46:09 +0000 (21:46 +0100)]
Support repeat-count for repeating operators

The variable `evil-repeat-count' is set to non-nil when `evil-repeat'
is called with a count. `evil-operator-range' uses the value of this
variable as count and afterwards resets `evil-repeat-count' to nil so
that count is used for the first operator only.

--HG--
extra : rebase_source : b12e0a59b2a17f6e1b66f281dba133de386b5b6b

7 years agoMove the reset code for the shortcut keymap into its definition
Vegard Øye [Mon, 7 Mar 2011 20:27:03 +0000 (21:27 +0100)]
Move the reset code for the shortcut keymap into its definition

This is more logical, but requires some slight adjustments to
`evil-normalize-keymaps' for it to recognize that the keymap has
changed at short notice.

7 years agoAdd simple operator tests
Frank Fischer [Mon, 7 Mar 2011 20:24:07 +0000 (21:24 +0100)]
Add simple operator tests

--HG--
extra : rebase_source : 45f23fbd7c16045096bd0868ed059a2efd9bfe69

7 years agoMerge with master
Frank Fischer [Mon, 7 Mar 2011 20:04:22 +0000 (21:04 +0100)]
Merge with master

--HG--
extra : rebase_source : 2fad4873dec62dd0db1342f1f1baa4c3557cc69f

7 years agoAdd `evil-define-operator' macro
Vegard Øye [Mon, 7 Mar 2011 15:23:33 +0000 (16:23 +0100)]
Add `evil-define-operator' macro

This implements basic motion reading and type awareness. Keyword
arguments such as :repeat, :whole-lines and :keep-visual are currently
unimplemented, as are operator shortcuts and type modifiers.

7 years agoAdd type system
Vegard Øye [Mon, 7 Mar 2011 14:31:56 +0000 (15:31 +0100)]
Add type system

This will be used by Operator-Pending state and Visual state.

7 years agoSkip compilation in "make emacs" and "make terminal"
Vegard Øye [Mon, 7 Mar 2011 14:20:27 +0000 (15:20 +0100)]
Skip compilation in "make emacs" and "make terminal"

Make aborts the rest of the rule when compilation fails. When the errors are
subtle, though, we may want to start up Emacs to inspect what's going on.

7 years agoForbid exiting emacs or killing buffers during repeation
Frank Fischer [Mon, 7 Mar 2011 14:16:57 +0000 (15:16 +0100)]
Forbid exiting emacs or killing buffers during repeation

7 years agoParse key-sequence when repeating with count
Frank Fischer [Mon, 7 Mar 2011 13:58:19 +0000 (14:58 +0100)]
Parse key-sequence when repeating with count

When a command is repeated with explicit count argument using
`evil-repeat-info-with-count' the key-sequence is parsed. When parsing
we ignore all calls do `digit-argument' or `negative-argument' and
strip the calling events from the key-sequence. Afterwards we prepend
some new events before the key-sequence which represent the correct
new count.

7 years agoCleanup whitespaces
Frank Fischer [Mon, 7 Mar 2011 07:58:30 +0000 (08:58 +0100)]
Cleanup whitespaces

Obviously the Emacs on my laptop is mis-configured and does not
cleanup whitespaces automatically.

7 years agoMake certain insert-state variables buffer local
Frank Fischer [Sun, 6 Mar 2011 19:48:26 +0000 (20:48 +0100)]
Make certain insert-state variables buffer local

Variables which describe the currently active insert-state need to be
buffer-local, because more than one buffer can be in insert-state at
the same time: `evil-insert-repeat-type', `evil-insert-repeat-point', `evil-insert-count' and `evil-insert-lines'.

7 years agoUse evil-insert-state-exit-hook to cleanup insert-state
Frank Fischer [Sun, 6 Mar 2011 19:42:23 +0000 (20:42 +0100)]
Use evil-insert-state-exit-hook to cleanup insert-state

When insert-state is about being exited certain cleanup tasks have to
be done, especially handling the repeat-count used to start
insert-mode. There is no need for the special `evil-exit-insert-state'
function anymore.

7 years agoMerge with master
Frank Fischer [Sun, 6 Mar 2011 19:33:42 +0000 (20:33 +0100)]
Merge with master

7 years agoRun exit hook before exiting state
Vegard Øye [Sun, 6 Mar 2011 12:06:08 +0000 (13:06 +0100)]
Run exit hook before exiting state

To execute code before the state's keymaps are disabled, use its exit
hook. To execute code afterwards (as part of disabling the state), put
the code in the body of its `evil-define-state' form.

7 years agoEnable Evil when testing
Vegard Øye [Sun, 6 Mar 2011 11:58:48 +0000 (12:58 +0100)]
Enable Evil when testing

"make emacs" and "make terminal" enables Evil.
"make test" and "make tests" do not.

7 years agoMerge with master
Frank Fischer [Sat, 5 Mar 2011 18:43:11 +0000 (19:43 +0100)]
Merge with master

7 years agoAdd change-based repeation
Frank Fischer [Sat, 5 Mar 2011 18:38:52 +0000 (19:38 +0100)]
Add change-based repeation

If via `evil-set-insert-repeat-type' the repeat-type of command can be
set to 'change. In this case instead of key-sequences the changes the
command made are recorded (in after-change-function hook
`evil-insert-change-repeat'. `evil-execute-repeat-info' can replay the
corresponding information.

7 years agoAdd "make terminal"
Vegard Øye [Sat, 5 Mar 2011 15:57:54 +0000 (16:57 +0100)]
Add "make terminal"

This is like "make emacs", but runs Emacs in the terminal.

7 years agoAdd "make emacs" target
Vegard Øye [Sat, 5 Mar 2011 13:00:29 +0000 (14:00 +0100)]
Add "make emacs" target

This fires up a fresh instance of Emacs and loads Evil and its tests
into memory. The tests are run interactively, that is, in their own
*ert* buffer. From there they can be re-run with "r", inspected with
".", etc.

7 years agoRemove whitespace padding from `global-mode-string'
Vegard Øye [Sat, 5 Mar 2011 12:59:35 +0000 (13:59 +0100)]
Remove whitespace padding from `global-mode-string'

Since `global-mode-string' is, well, global, the whitespace is also
shown in buffers where Evil is inactive. Therefore it is better to
include the padding in the state tags themselves.

7 years agoRename `evil-define-mode' to `evil-define-keymap'
Vegard Øye [Sat, 5 Mar 2011 12:48:13 +0000 (13:48 +0100)]
Rename `evil-define-mode' to `evil-define-keymap'

This makes better sense since state modes are never toggled on their own --
they are always enabled or disabled as part of a state.

7 years agoAdd helper function for testing :enable
Vegard Øye [Sat, 5 Mar 2011 09:40:06 +0000 (10:40 +0100)]
Add helper function for testing :enable

Also fix a typo in `evil-state-keymaps'.

7 years agoMerge with master
Frank Fischer [Fri, 4 Mar 2011 22:23:33 +0000 (23:23 +0100)]
Merge with master

7 years agoAdd `evil-insert-above' and `evil-insert-below'
Frank Fischer [Fri, 4 Mar 2011 22:13:07 +0000 (23:13 +0100)]
Add `evil-insert-above' and `evil-insert-below'

7 years agoFix verification for unmatched cursor regexp
Frank Fischer [Fri, 4 Mar 2011 21:26:22 +0000 (22:26 +0100)]
Fix verification for unmatched cursor regexp

If no cursor could be found we have to check the return type of
`string-match'.

7 years agoMake compilation a prerequisite for "make test"
Vegard Øye [Fri, 4 Mar 2011 21:23:48 +0000 (22:23 +0100)]
Make compilation a prerequisite for "make test"

This prevents outdated .elc files from sabotaging the tests. Testing
without compiling is achieved with the plural, "make tests".

7 years agoAdd `evil-insert-after'
Frank Fischer [Fri, 4 Mar 2011 21:01:57 +0000 (22:01 +0100)]
Add `evil-insert-after'

7 years agoAdd highlighting
Vegard Øye [Fri, 4 Mar 2011 20:58:39 +0000 (21:58 +0100)]
Add highlighting

Highlight `evil-define-' forms like `defun' and `defmacro'.

7 years agoAdd buffer-local keymap for Operator-Pending shortcuts
Vegard Øye [Fri, 4 Mar 2011 20:49:35 +0000 (21:49 +0100)]
Add buffer-local keymap for Operator-Pending shortcuts

Shortcuts like "dd" and "gqq" can be temporarily stored in
`evil-operator-shortcut-map', which is active whenever
Operator-Pending state is enabled.

Modes used by states are now defined with `evil-define-mode', which
generalizes the concept of buffer-local keymaps. The :enable keyword
of `evil-define-state' accepts modes as well as states.

7 years agoImplement `count' argument of insert command
Frank Fischer [Fri, 4 Mar 2011 20:47:56 +0000 (21:47 +0100)]
Implement `count' argument of insert command

7 years agoImplement generalized repeat-info
Frank Fischer [Fri, 4 Mar 2011 18:55:27 +0000 (19:55 +0100)]
Implement generalized repeat-info

A repeat-information is now a list of arrays (string or vectors, i.e.,
events) and other elements. Currently the only other possible element
is a function. This should be the basis for very general approaches
for repeating commands.

7 years agoAdd support for count argument in `evil-repeat'
Frank Fischer [Fri, 4 Mar 2011 17:16:52 +0000 (18:16 +0100)]
Add support for count argument in `evil-repeat'

An explicit count for evil-repeat replaces the count of the command to
be repeated. We do this with a special pre-command-hook which works
for simple commands but an operator has to be handled differently. In
that case the interactive handler for operators has to use
`evil-repeat-count' (if non-nil) as count for the following motion.

7 years agoFix compilation errors
Frank Fischer [Fri, 4 Mar 2011 16:16:53 +0000 (17:16 +0100)]
Fix compilation errors

require evil-vars.el in evil-states.el and define several variable

7 years agoMerge with master
Frank Fischer [Fri, 4 Mar 2011 14:16:34 +0000 (15:16 +0100)]
Merge with master

7 years agoFix compilation errors
Vegard Øye [Fri, 4 Mar 2011 13:32:04 +0000 (14:32 +0100)]
Fix compilation errors

Make evil-states.el require evil-vars.el. Ensure variables are defined
in toplevel (not inside `let').

7 years agoAdd compile target
Vegard Øye [Fri, 4 Mar 2011 13:29:15 +0000 (14:29 +0100)]
Add compile target

"make compile" byte-compiles Evil.

7 years agoRemove superfluous escape event in tests
Frank Fischer [Fri, 4 Mar 2011 13:07:28 +0000 (14:07 +0100)]
Remove superfluous escape event in tests

7 years agoUpdate ERT
Vegard Øye [Fri, 4 Mar 2011 12:03:03 +0000 (13:03 +0100)]
Update ERT

This fixes the `equal' bug mentioned in 26f6252.

7 years agoAdd makefile and test target
Vegard Øye [Fri, 4 Mar 2011 10:45:02 +0000 (11:45 +0100)]
Add makefile and test target

The tests can now be run from the command line with "make test".

7 years agoAdd basic `evil-repeat' command
Frank Fischer [Fri, 4 Mar 2011 08:19:03 +0000 (09:19 +0100)]
Add basic `evil-repeat' command

The current implementation works only for key-sequences and cannot
deal with a `count' argument. Nevertheless it should be sufficient
for almost all situations.

7 years agoAdd `evil-test-editing' function for testing ordinary editing commands
Frank Fischer [Fri, 4 Mar 2011 08:18:44 +0000 (09:18 +0100)]
Add `evil-test-editing' function for testing ordinary editing commands

7 years agoClean up repeat-info tests
Frank Fischer [Thu, 3 Mar 2011 15:53:18 +0000 (16:53 +0100)]
Clean up repeat-info tests

7 years agoHandle activating command of insert-state in insert-state itself
Frank Fischer [Thu, 3 Mar 2011 13:59:34 +0000 (14:59 +0100)]
Handle activating command of insert-state in insert-state itself

7 years agoAdd basic repeat framework
Frank Fischer [Thu, 3 Mar 2011 13:41:56 +0000 (14:41 +0100)]
Add basic repeat framework

This is very preliminary implementation of a key-sequence bases
framework and should only be considered as a starting point.