In the majority of cases we were doing that anyways, having two
ways is just needlessly confusing.
Change-Id: Ied362a702c23beee528368d74df1f2aabe5807f8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Vim allows for spliting veritcally by typing <C-W><C-V>. Add this
keybinding.
Change-Id: I7db5a8cd06eea05b011655ec326b3795f0896ed9
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk121@nokiamail.com>
And use it where appropriate
Change-Id: I0f37b8aada6eaa9be6743724b91a59173a01cb0c
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Rename OpenEditorsModel to DocumentModel.
In the DocumentModel also make the distinction between "restored"
document (i.e. just info about file name, display name, id), "opened
document" (i.e. document with IEditor and IDocument), and "document"
(which refers to any).
Change-Id: I01ebe10ec84aab5fe81e54be6bec14f653f28771
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
And use documents for the list of currently open documents, instead of
using a set of "original" editors that needed to be separately managed.
Change-Id: I3379ca44f03646399d3ecb0e775d7f1fd81a6bcf
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The model index is an internal detail of the model/view and shouldn't be
used outside that context.
Change-Id: I2c1f742fff427484f6ff244dd3e0d8428a7318d3
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
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>