Commit Graph

678 Commits

Author SHA1 Message Date
hjk
908ae71092 fakevim: fix repetition of <count>~
Change-Id: I215959b6bb2bfb77277f4b19389d98e00d04b7d5
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-26 09:06:13 +02:00
Lukas Holecek
49a337f235 fakevim: Fix last position and selection (marks)
Change-Id: If75164be930dac3c4f3b9c26179ee54aa643ab4e
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-25 00:29:20 +02:00
Lukas Holecek
80b737252b fakevim: Fix substitute command
Command separator (bar character) shouldn't break substitute command.

Escape substitution text.

Change-Id: I9a793ab2df167d5d8a2b4de22329d061fc169785
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-23 08:16:11 +02:00
Lukas Holecek
5a809353d9 fakevim: Fix insert modes
Change-Id: I8efb89e6931be2c37cfaf82f0aa053317c6b8d93
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-21 13:11:00 +02:00
Lukas Holecek
ba86ddcc44 fakevim: Ignore user mappings with 'r' and other commands
Task-number: QTCREATORBUG-7913
Change-Id: Ic9efd579556acc78736d7562c46adee83e971074
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-21 13:09:43 +02:00
Lukas Holecek
1586737596 fakevim: Single command integrity (undo, redo, repeat)
Change-Id: I7e12092fd8928f34306a40b76a8ec7e6afe4a050
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-20 14:57:12 +02:00
hjk
ac485f3e1b fakevim: compile fix
Change-Id: Idf87513c32a6d9ab12bf1f67b7165a21b852645b
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-18 13:59:31 +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
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
Lukas Holecek
8bed5c33f9 fakevim: Fix cursor position after pasting text at end of line
Change-Id: I5017d5f6987cea12b1eb26212fbe5fe813bf73cb
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-09 13:15:39 +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
ca48d81c28 fakevim: Searching with star and hash should escape regex
Change-Id: Ia1db4eca8841209eb960191221606d94b216e3b6
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-04 18:01:14 +02:00
Lukas Holecek
1e6cd8af47 fakevim: Improved number transformations in Vim
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>
2012-10-04 18:00:09 +02:00
Lukas Holecek
41b963934d fakevim: Search state should be global
State variables for the last search should be same for all buffers
(opened files).

Change-Id: I238085db630aeb99ec5c99db960df03e1da88771
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-04 10:21:36 +02:00
Lukas Holecek
d2bf853ca1 fakevim: Star and hash search with g
Added g* and g# commands to search without \<, \>.

Change-Id: I74f010f2415e4d493be9925ab047a1c06f35d7a9
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-04 09:43:36 +02:00
Lukas Holecek
f357502984 fakevim: Improved repeat command
Repeat commands in visual mode correctly.

Task-number: QTCREATORBUG-7248
Change-Id: I937688f669f9bb9e1ad5f64b42dc0ee56dc3ca38
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-04 09:43:01 +02:00
Lukas Holecek
ceaedb0883 fakevim: Correct Undo/Redo position for large editing operations
Change-Id: Ie5d354a0e7f59c61646d14da79bf7059821c12e5
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-02 12:09:53 +02:00
Lukas Holecek
37c3dbc57d fakevim: Fix text indentation commands
Fixed indentation commands with movement and correct behavior in tests.

Change-Id: Idb77427c556f54c75658f806bb6c94402cab52ea
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-02 09:03:09 +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
dcfd97d41d fakevim: Fix search for last submitted expression
Browsing search history shouldn't change last search expression.

If submitted search expression is empty last one is use instead.

Change-Id: I279e2800baa98f48c8592149db16dde81714f24f
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-01 09:41:04 +02:00
Lukas Holecek
6268f943d0 fakevim: Improve Ex command handling
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>
2012-10-01 09:40:33 +02:00
Lukas Holecek
da31e05af0 fakevim: Fix map handling in Ex mode
Change-Id: I23b280351de0e57df751fe5530fec8b3dd9e197d
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-01 09:37:04 +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
Christian Kandeler
3d9e492860 Do not use the fromAscii() and toAscii() functions.
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.

Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-09-21 21:03:48 +02:00
Lukas Holecek
12f1098329 fakevim: Improved command line buffers
Command line history should be global.

Keep last submitted command/search visible.

Change-Id: I0fc60786d486eb07c849d016aa23f71875d2cede
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-18 08:18:07 +02:00
Lukas Holecek
6bab355134 fakevim: Fix mapped input handling
Do not wait for incomplete input indefinitely.

Handle shift correctly.

Change-Id: I9b500bd9c29de54008d6b940753fa0cf61217b75
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-14 11:19:50 +02:00
Lukas Holecek
97769d1a71 fakevim: Avoid unnecessary clearing message
Change-Id: Ied9d1f2702dd1cb1b9a46547567a1df35ccfe256
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-14 11:18:51 +02:00
Christian Kandeler
405217c111 Utils::HostOsInfo: Introduce controlModifier() method.
Change-Id: Ibd244963c5cd643fc0e8358ceabff0ad5f6599eb
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-13 10:14:53 +02:00
Lukas Holecek
e767fb28fa fakevim: Improved mappings handling
Implemented special key names (e.g. <left>, <space>, <leader>,
<backspace>).

Disallow mapping with <nop>.

Change-Id: I8f4cdc84cb469db0b5cddd9059484cce7aa1b17f
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-12 14:23:05 +02:00
Lukas Holecek
fc5df4b24b fakevim: Improved command line mode
Traverse only history items starting with current command line content.

Clear messages only if necessary.

Change-Id: I6862fe7e32ec0235576e64287481d72c4194e759
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-11 18:32:51 +02:00
Lukas Holecek
3841b85418 fakevim: Fix searching
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>
2012-09-10 12:05:07 +02:00
Lukas Holecek
b559b53ba6 fakevim: Fixed undo/redo with page down/up in insert mode
Change-Id: Ie657e9d5aeed71a3c301349df031a90237ba6eb8
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-04 10:08:17 +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
eb8f1379dc fakevim: Improved undo/redo
Change-Id: I9326820cf0b8c551932ffae4cc4ae0af8415fd4e
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-03 11:03:53 +02:00
Lukas Holecek
a57b4cf93e fakevim: Improved jump list
Record jump before changing text cursor position.

Implemented "latest jump" mark (single quote).

Change-Id: Ia3392761f80c185b06ad326718ad9db0d3108d45
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-28 08:16:32 +02:00
Lukas Holecek
2481e58da8 fakevim: Improved word movement
Change-Id: I26f2dfd8780af3cbcc47646c2ddff757c919c88a
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-28 08:14:13 +02:00
Christian Kandeler
e669f05406 Utils: Introduce HostOsInfo class.
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.

Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 17:00:03 +02:00
Lukas Holecek
3306cecd79 fakevim: Fix selectText() with invalid range
If invalid range is passed to selectText() it should return empty
string.

Change-Id: I42ec26fb3dad3f1b521370b1a9596f3d52b92a64
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-22 08:32:02 +02:00
Friedemann Kleint
20fe4725fb Compile with Qt 5.
Change-Id: If0e3eab81aa8c458fe47e2b5d16d1469286840b9
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-21 11:42:24 +02:00
Lukas Holecek
20231b769d fakevim: Clipboard data format compatible with Vim
Store clipboard data that can be used by Vim and vice versa.

Change-Id: If1eb436fa371afeff39fd37353fe0841dafe169a
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-17 08:18:37 +02:00
Lukas Holecek
a1834bba8e fakevim: Fixed pasting text [count] times and in selection
Text pasted correctly [count] times and text cursor position
after the operation is same as in Vim.

P and p keys should work the same if pasting to selection.

Change-Id: Ic1cc82a71a2103b13a37e270ad9b7745ff95954d
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-17 08:17:12 +02:00
Lukas Holecek
64fece4d28 fakevim: Added support for last selection operations
Change-Id: Ib0628790d415b400fa7b2ca6d2d536b4f6a84aed
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-17 08:12:20 +02:00
Lukas Holecek
e6bb2f644b fakevim: Support for count steps in block selections
Added support for combinations like "2vi)" or "3da{".

Change-Id: I548250faca900b6e5c78f1418cbf3cd4591e7e35
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-15 08:14:21 +02:00
Lukas Holecek
b4ec04e5e6 fakevim: Range mode of a clipboard register depends on its content
If register takes its content from clipboard check it it ends with new
line char ('\n' or '\r'). If it does the text can be pasted only on
a new line. This emulates Vim behaviour.

Change-Id: I70ae8b264ba41c3d84a42b1c91f3c4bdb183efd9
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-09 13:16:05 +02:00
Lukas Holecek
77e101406f fakevim: Fixed pasting from clipboard
Paste from clipboard if register is "" and 'clipboard' contains
'unnamedplus' (otherwise from selection if available and 'clipboard'
contains 'unnamed').

Also correctly parse 'clipboard' option to string list.

Change-Id: Ic78cd2953789c0402f515973ed2eb48fc3e72154
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-07 22:21:37 +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
Lukas Holecek
6544ed2f00 fakevim: Emulate Vim regexp more precisely
Change-Id: Ia951f6e10d0e8d19e8d7d4b2a696eb9277ce6201
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-01 14:52:52 +02:00
Lukas Holecek
d0dcd40635 fakevim: Implement special clipboard buffers
Introduces Vim's special registers "+ and "* and partial support for
"clipboard" option - only values "unnamed" and "unnamedplus" and the
behaviour is only similar.

Task-number: QTCREATORBUG-6342
Change-Id: I1fa95b681edadacfe9690a2fd6eb2e98e7cc5dca
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-01 13:25:04 +02:00