Action like "Switch Header/Source" need to be performed in correct
context, in this case "CppEditor.C++Editor". But while command line is
focused the context is global.
Task-number: QTCREATORBUG-9217
Change-Id: I8680e7d9612e72d23e1ef6515904941505f410d8
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Mostly 3 leading spaces converted to 4
A few other indentation issues
Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863
Reviewed-by: hjk <hjk121@nokiamail.com>
Allow movement with <C-W> and h, j, k, l, plus capital alternatives to
focus furthest split.
Command <C-W>o or :only closes all splits except the current one.
Change-Id: I14ed57cff5d639c22d3eb325560922c10d0c92bf
Reviewed-by: hjk <hjk121@nokiamail.com>
Set new text cursor and scroll in editor widget only if it's only
needed. Sometimes these action can have side-effects.
Set new cursor and scroll especially after no pending input and commands
are available to process for FakeVim.
Change-Id: I47df4d0328ac990e2e5c6981955ea7d1bd608c71
Reviewed-by: hjk <hjk121@nokiamail.com>
Option to pass some key presses in insert mode to editor widget
(replaces 'passnewline'). This allows to rename symbols in insert mode,
complete parenthesis blocks, expand comments etc.
Macro expansion and code-completion works with dot command.
Task-number:QTCREATORBUG-4828
Change-Id: I5ff43818d4f7f183cd6f4ed8cc3a4586469ab65d
Reviewed-by: hjk <hjk121@nokiamail.com>
Record macro with 'q{0-9a-zA-Z"}' command and replay it with
'@{0-9a-z".*+}'. Replaying with prompt ('=' instead of register) not
supported.
Change-Id: I49965a99d10910e8df09e62020ed496542e3b249
Reviewed-by: hjk <hjk121@nokiamail.com>
It's possible to use FakeVim as standalone plugin for a QTextEdit or
QPlainTextEdit widget, so there should be minimum dependencies on
Qt Creator code.
Change-Id: I415ed87f5e4d97ea78d9d25a8f0c82701ef1f70d
Reviewed-by: hjk <hjk121@nokiamail.com>
Path to .vimrc configuration file can be set in options if "Read .vimrc"
option is enabled.
Default path for .vimrc is %USERPROFILE%/_vimrc on Windows, ~/.vimrc
otherwise.
Task-number: QTCREATORBUG-8748
Change-Id: I61ff8484e7635ce7a9361e2ad5cd3943e15613c1
Reviewed-by: hjk <hjk121@nokiamail.com>
Command <c-w><right> focuses the window to the right from the right edge
of the current window (not on the right side of the text cursor).
Similar behavior applies on the other directions.
For example, with layout (* is current window/split):
| 1* |
| 2 | 3 |
on <c-w><right> the window number 3 should never be current.
Change-Id: I658011ef597bcadf4a77065ed0b31133ab72aa06
Reviewed-by: hjk <hjk121@nokiamail.com>
There were a couple of sign error and mis-measurements in the functions
used to elect the target view when doing a ctrl-w + arrow movement.
This commit fixes the sign errors, and changes the choice algorithm so
that the elected view is the one with its center closest to the
cursor.
Change-Id: I7890c4816b6625d062262ee939150b5391ea6245
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk121@nokiamail.com>
Commands '[z' and ']z' to move [count] times to top or bottom of current
folds.
Change-Id: Ia087e47bd5f9d63a2b9a4b2ffd3fc57559dfba6b
Reviewed-by: hjk <qthjk@ovi.com>
It's possible to do '2dzj' to delete everything up to beginning of
second unfolded block or whole folded block.
Change-Id: I080c9ec4d12471faf09cabea3c96b448b5fc7f4d
Reviewed-by: hjk <qthjk@ovi.com>
Use showcmd Vim option to show current partial command.
Removed unneeded updateMiniBuffer() calls.
Change-Id: Iddacd364b7c92882b6169a6894c89cdb202a32bf
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>
Some recent regression left an "-- --" in there.
Change-Id: Ibd587011e2dc80f3fe3e46cdc78c55d934a50b66
Reviewed-by: Lukas Holecek <hluk@email.cz>
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>
Implemented folding commands "za" (toggle fold), "zA", "zR" and "zM"
(toggle/open/close all folds recursively).
Other commands should work with folded blocks, e.g. dd on folded block
deletes whole block.
Folding a block moves cursor to the top of the block. Moving cursor left
or right or unfolding the block again won't restore the cursor position
as it was before folding (in Vim the position is restored).
Change-Id: I9fde30ea9358760419486e092d1032e85f415dc1
Reviewed-by: hjk <qthjk@ovi.com>
Highlighting text is always case sensitive regular expression.
Fix asterisk and hash search.
Change-Id: Ia41eee9266de4ed9bf0bd221609d8e02b72ada03
Reviewed-by: hjk <qthjk@ovi.com>
Highlight color is taken from current color scheme and changing the text
keeps highlighted matches valid for current search.
Change-Id: I9032b48589ff0c638b04f1bcf3a0e26f422af491
Reviewed-by: hjk <qthjk@ovi.com>
Widget for Ex and search mode is QLineEdit.
Messages are displayed using QLabel widget with different style for
error, warnings etc.
Change-Id: I4d4f799bbe261febaf6c2c21c01f6b66e1beec6e
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>