After Ctrl+O combination in insert or replace mode enter command mode
and after a single command (can consist of entering Ex command or can be
switch to other buffer) or escape key return to previous insert or
replace mode. One exception is that if entering insert mode is part of
the command after <C-O> pressing escape key will exit to command mode
(Vim behavior).
Change-Id: I37d684b691157001e2cab156687d6771afdec7b9
Reviewed-by: hjk <qthjk@ovi.com>
Match same text on same regex in forward and backward search modes.
E.g. with '\w\{2}' Vim regex and 'abc' text always match '<ab>c'
(should never match 'a<bc>' as with QTextDocument::find()).
Change-Id: Ie920c76540f3be426fc7b842d38137e95c1a65b2
Reviewed-by: hjk <qthjk@ovi.com>
Stop processing dot command or user mapping after it's no longer valid.
For example do not process the "text" part of command "ci)text" if
cursor is not in parenthesis block or "ctXtext" if character 'X' was not
found on current line after cursor. In these cases insert mode is not
set.
Change-Id: I54588f3beeb803e42a566f6381352aff7bb602c7
Reviewed-by: hjk <qthjk@ovi.com>
Commands ciw and diw should work on a single character.
Commands ci), di" and similar should work on in an empty block.
Change-Id: Id166a3fb80fc5ba2672231638ce126bd88b4f3ff
Reviewed-by: hjk <qthjk@ovi.com>
Workaround for crash when setting text cursor position while in edit
block (after QTextCursor::beginEditBlock() call and before
QTextCursor::endEditBlock() call).
Task-number: QTCREATORBUG-8148
Change-Id: I7faab2e878efea4106e375b32526ecd5984feac2
Reviewed-by: hjk <qthjk@ovi.com>
This moves the stand-alone tests into the plugin.
Change-Id: Ic6da45236b080b6c905849898729b19df54a1527
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <qthjk@ovi.com>
Added change and join Ex commands.
Ex command range and address with /.../, ?...?, \/, \? and \&.
Change-Id: I23f16d3e454f28bcfcf87aeab500830136546345
Reviewed-by: hjk <qthjk@ovi.com>
Automatic indentation, change letter case, correct position after
command.
Change-Id: I3e9659fca82fbc3fa443d593f915931bf7f17e93
Reviewed-by: hjk <qthjk@ovi.com>
Use internal editor with highlighting and folding support for tests to
be able to check folding commands.
Change-Id: Iaab3bc9edb65c8e2a5a7efc4456e021c8a178d7f
Reviewed-by: hjk <qthjk@ovi.com>
Allow increasing/decreasing the first number after cursor position
(cursor doesn't have to be on the number).
Increase/decrease number by [count].
Change-Id: I5f4d41fed43556a46c3b63bea4efcdd6a66a81a4
Reviewed-by: hjk <qthjk@ovi.com>
Fixed indentation commands with movement and correct behavior in tests.
Change-Id: Idb77427c556f54c75658f806bb6c94402cab52ea
Reviewed-by: hjk <qthjk@ovi.com>
Multi-line commands (lines starting with backslash).
Subcommands separated by bar character (|).
Task-number: QTCREATORBUG-7376
Change-Id: I947b10ee5043824278c6ba71e8ebb19dc5787328
Reviewed-by: hjk <qthjk@ovi.com>
While searching for expression that is not found keep text cursor on
position before search.
Make search work with visual mode.
Clear message on escape from search mode.
Change-Id: I44e843a5a16bcc45a1bdc573ecc409654c4eb910
Reviewed-by: hjk <qthjk@ovi.com>
Reset cursor position if search is canceled and always search from
initial cursor position if search expression changes.
Implemented Vim's wrapscan (ws) option.
Task-number: QTCREATORBUG-7251
Change-Id: Ic709cc4fb9dacdb94fbd17f85ac9b75738d5578c
Reviewed-by: hjk <qthjk@ovi.com>
This is a workaround. The real problem is a source incompatibility
from Qt4 -> Qt5 (beta). QSKIP wants 2 arguments in the first, and
1 in the latter case.
Change-Id: I11e914f378baf492cce62333a8284ba2a11bf61d
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>