Commit Graph

308 Commits

Author SHA1 Message Date
Eike Ziller
7d986f0486 Cycle through extra editor windows when cycling through splits
Change-Id: I1bd5654d62b11456c35cc5bf1099e41fb3559bc7
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-05-31 12:27:12 +02:00
Robert Loehning
1f62d7c90d Normalized connect()s
Change-Id: I82e891a73724cdfa0db8c84e9daeb72e00e87029
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-16 13:55:14 +02:00
Oswald Buddenhagen
6fb94a7b10 Merge branch '2.7'
Conflicts:
	doc/src/qtquick/qtquick-components.qdoc
	doc/src/qtquick/qtquick-designer.qdoc
	qtcreator.pri
	qtcreator.qbs
	src/plugins/cppeditor/cppinsertdecldef.cpp
	src/plugins/qnx/qnxruncontrolfactory.cpp

Change-Id: I0a37a07c42719bc0d9ef5b3ac4641d01a63c0d88
2013-05-15 10:21:47 +02:00
hluk
70a5d125f9 FakeVim: Focus current editor before handling command line command
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>
2013-05-06 13:18:07 +02:00
Orgad Shaneh
ec84dd058a Fix indentation
Mostly 3 leading spaces converted to 4

A few other indentation issues

Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-06 08:38:50 +02:00
hluk
016a926ab7 FakeVim: Window movement with <C-W> and :only
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>
2013-05-02 14:48:04 +02:00
hluk
2ed88c44fd FakeVim: Don't overuse cursor setting and scrolling in editor
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>
2013-04-19 14:40:30 +02:00
Eike Ziller
dd731a8998 Add right aligned location for widget in status bar.
Change-Id: I7ff41fc891836d15b2b9b6bf090feaf2e4feb968
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-09 13:05:48 +02:00
Eike Ziller
43969c4e56 Rename PluginManager::runningTests() --> testRunRequested()
Change-Id: I209ebb85ad2a3cc32be0c45ee37ba4918ec42828
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-04 14:58:52 +02:00
hluk
1bea9b98fb FakeVim: Option 'passcharacters' (not in Vim)
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>
2013-04-04 13:50:08 +02:00
hluk
84d9069d94 FakeVim: Widgets in preferences for 'scrolloff' and 'passnewline'
Change-Id: I257b1d01fa8c016c1680ee266cf87ce6298bea12
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-02 14:05:38 +02:00
Daniel Teske
a183bb8ea1 Utils::TreeWidgetColumStretcher: Generalize to support all QHeaderViews
I need this for a QTableView.

Change-Id: I07f4c6561abc2c62ce19a21a2233c65210329ef6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-26 16:19:26 +01:00
hjk
d5cf6dff56 FakeVim: Simplify Core::Id usage
Change-Id: Id8fdc442c535d0fcc274360b8ed590f5e1c61e03
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-19 15:25:37 +01:00
hluk
0f25f0c89b FakeVim: Initial support for Vim macro recording and replaying
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>
2013-03-18 17:18:35 +01:00
Lukas Holecek
ca5b956ab5 FakeVim: Emulate Vim option ignorecase
Change-Id: I0dc87f8a34fa458a9eab14440f7ad2ac2cfe0a98
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-13 12:35:44 +01:00
hjk
d44bac6f43 FakeVim: Make plugin standalone if necessary
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>
2013-03-08 17:53:14 +01:00
Lukas Holecek
0809986e50 FakeVim: User-settable path to .vimrc with saner default for Windows
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>
2013-02-18 17:32:01 +01:00
Lukas Holecek
b3ab0b6504 FakeVim: Focus window in given direction
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>
2013-02-05 10:21:42 +01:00
Adrien Bustany
67c5d505f6 fakevim: Fix "ctrl-w + arrow" movement between views
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>
2013-02-04 17:08:20 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
be48a3faff Use Core::Id for IOptionsPage::m_id
Change-Id: Id9d6cf28966eeb65775cf1f16f57773af5fb6bca
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-01-17 11:43:04 +01:00
Lukas Holecek
2af8015941 FakeVim: Allow to delete selected text in command buffer
Change-Id: Ia3074053da465b5ce999955f428c970f1b01a265
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-30 16:08:36 +01:00
hjk
a570e7327f FakeVim: handle keyboard selection in command buffer
Change-Id: I6a1f605fc77b9af596ee60c5f98e1b3252333284
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-30 11:18:39 +01:00
hjk
78beacd7b4 Use Core::Id for IOptionPage::category
Change-Id: I63433edd9118a7aa4ecaef28f40bfc729d90f512
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:10:59 +01:00
hjk
e833b794b3 Use Core::Id in ICore::showOptionsDialog
Change-Id: I3865fde2347d687a7dee76dd5ca62db69cc4dd04
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:04:30 +01:00
Orgad Shaneh
1f74468a56 FakeVim: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I5ed7bb6f39689d5657709e2ab4a2fa90594abb0e
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Lukas Holecek <hluk@email.cz>
2012-12-09 22:08:51 +01:00
Lukas Holecek
61c3de01a8 fakevim: Commands '[z' and ']z' to move to top or bottom of fold
Commands '[z' and ']z' to move [count] times to top or bottom of current
folds.

Change-Id: Ia087e47bd5f9d63a2b9a4b2ffd3fc57559dfba6b
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-30 14:34:43 +01:00
Lukas Holecek
9d2f1f6769 fakevim: Commands 'zj' and 'zk' to move [count] folds down and up
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>
2012-11-30 14:33:44 +01:00
Lukas Holecek
f31da9ac55 fakevim: Show current command in minibuffer (showcmd option)
Use showcmd Vim option to show current partial command.

Removed unneeded updateMiniBuffer() calls.

Change-Id: Iddacd364b7c92882b6169a6894c89cdb202a32bf
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-20 08:29:37 +01:00
Lukas Holecek
82a55d4b9e fakevim: Global file marks
Uppercase marks for jumping to a line in a different file.

Change-Id: I2f05389956e1f3d6ae557f6545de3bec30673203
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-02 08:16:21 +01:00
hjk
376ddd5d74 fakevim: start consolidation of both test suites
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>
2012-11-01 17:16:15 +01:00
hjk
b93751e212 FakeVim: clear command buffer when leving fakevim.
Some recent regression left an "--  --" in there.

Change-Id: Ibd587011e2dc80f3fe3e46cdc78c55d934a50b66
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-20 14:36:27 +02:00
Lukas Holecek
8e8c8e49ce fakevim: Various fixes
Automatic indentation, change letter case, correct position after
command.

Change-Id: I3e9659fca82fbc3fa443d593f915931bf7f17e93
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-18 09:51:34 +02:00
Lukas Holecek
49e7ec748e fakevim: Use internal editor widget in tests
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>
2012-10-17 20:30:20 +02:00
Lukas Holecek
9bf725af2c fakevim: Added basic code folding
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>
2012-10-10 11:25:06 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Lukas Holecek
3e6ac65444 fakevim: Fix search issues
Highlighting text is always case sensitive regular expression.

Fix asterisk and hash search.

Change-Id: Ia41eee9266de4ed9bf0bd221609d8e02b72ada03
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-02 09:00:41 +02:00
Lukas Holecek
c1755d4d69 fakevim: Highlight matches using Find::IFindSupport
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>
2012-09-28 14:51:20 +02:00
Lukas Holecek
1264d0ea5e fakevim: Appearance of command line widget.
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>
2012-09-26 17:22:21 +02:00
Lukas Holecek
4503ce663a fakevim: Improved searching
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>
2012-09-04 09:41:28 +02:00
Lukas Holecek
a897a3b00a fakevim: Added tests
Change-Id: I6b6e54817bf41402f5575142b1adb9362c717439
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-31 08:41:39 +02:00
Eike Ziller
bc67246432 Merge remote-tracking branch 'origin/2.6' 2012-08-23 15:52:15 +02:00
hjk
0322817048 fakevim: de-noise
Change-Id: I6b47304f43138d6944a55b2a2047c4832ced16d9
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-22 08:44:27 +02:00
Lukas Holecek
7e7460ad33 fakevim: Added support for smartcase searching
Change-Id: I85a83aff0886282a6eac2dc9cc4662087c3b0b95
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-01 16:17:03 +02:00
Friedemann Kleint
f393ad1640 Fix exit crash in fakevim plugin.
Introduced by cf9895ae01.

Change-Id: Ia5e7f92fb05313826e5ffd8b080b8a711bc6e793
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-23 11:37:53 +02:00
Orgad Shaneh
cf9895ae01 Fix some memory leaks
Task-number: QTCREATORBUG-7645

Change-Id: I34253d063a20ebf927bf651cf68af4fe1b71bc89
Reviewed-by: hjk <qthjk@ovi.com>
2012-07-20 09:13:09 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Eike Ziller
3934347fe9 ActionManager API cleanup.
d-pointer instead of inheritance
static methods

Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-25 10:08:24 +02:00