Introduce methods to save a document/list of documents/all documents,
both silently and with a dialog to the DocumentManager.
All of these return a bool that signifies whether the save was
successful or not.
Detailed information on which files failed to load or whether the
save was canceled by the user are still available as optional
in/out parameters.
Change-Id: Id17798302f2a8ba6b85a07c1f0b91f03b20da03f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
If FakeVim mode is disabled, enable it just for the single requested
user command.
Keep useful messages shown for few seconds.
Task-number: QTCREATORBUG-10460
Change-Id: I89c1722542f47befbf2c24a663bf3d1c455b77d9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
The default "matches" method now takes the widget and looks for all
child labels, checkboxes, push buttons and group boxes.
Because of that, the former "createWidget" method
can be called multiple times without creating a new widget
(-->widget()), and the "finished" method must ensure that the created
widget gets deleted, since not all widgets that were created are added
to the UI anymore.
Change-Id: Ia231c7c78dd8819146668e6447d36d22e7836904
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
...by providing a default implementation of immediateProposal() in the
base class.
Change-Id: I4f4f9aa491fbfc9390cc7b7093f1b3c1c8e460a4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Immediate proposals are displayed for asynchronous providers and fragile
proposals.
The idea is to show already available results immediately. The proposal
calculated in the process runner can then replace the immediate
proposal.
Change-Id: I7903e6677c9dfeb4957eb416062fff1fb01ff23f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Search in visual mode should select text up to matched position.
Using commands should work with search movement; e.g. 'd2/needle<CR>'.
Commands should be also properly canceled if search movement fails.
Change-Id: Ic695dccaf3f36ccae2f2b1a93f888d5ba9805a78
Reviewed-by: hjk <hjk121@nokiamail.com>
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>