Commit Graph

590 Commits

Author SHA1 Message Date
Martin Aumüller
de21fef76c fakevim: update cursor position to start of selection after incremental search
the find plugin places the cursor at the end of a found item, but vi at the start,
thus update cursor position when editor widget regains focus

Merge-request: 97
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-21 17:23:30 +01:00
Martin Aumüller
d67bd86fb4 fakevim: update document's cursor before triggering search
otherwise, incremental search would not always begin at the current cursor position

Merge-request: 97
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-21 17:23:30 +01:00
Martin Aumüller
f48ff89988 fakevim: handle forward/backward search depending on initial search ('?'/'/')
Merge-request: 97
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-21 17:23:30 +01:00
Martin Aumüller
825d1c7932 fakevim: make find next/previous work with incremental search
Merge-request: 97
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-21 17:23:29 +01:00
Martin Aumüller
fb1e56cbe0 fakevim: use FakeVim indentation settings instead of creator's
Merge-request: 2160
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-15 15:27:42 +01:00
hjk
67027dddb6 fakevim: comment out warning about unhandled commands 2010-01-07 16:25:18 +01:00
Martin Aumüller
f289da3d91 fakevim: implement smart indent
use creator's indenter for smartindent mode
- this works like automatic indent w/o fakevim

perhaps this fixes QTCREATORBUG-139

Merge-request: 98
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-06 15:21:17 +01:00
Martin Aumüller
c4fede0fd3 fakevim: use BaseTextEditor's isElectricCharacter
in order for automatic indenting to work, isElectricCharacter has to match the language of the document

Merge-request: 98
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-06 15:21:17 +01:00
hjk
b6cae42a62 fakevim: remove spurious executable attributes; also some style issues 2010-01-05 18:48:53 +01:00
Martin Aumüller
f08176cc49 fakevim: [num]'-'/'+' moves to first non-blank of previous/next but ([num]-1)th line
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:53 +01:00
Martin Aumüller
29236ea356 fakevim: leave visual mode if entering insert mode
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:53 +01:00
Martin Aumüller
7ccdbc5e97 fakevim: fix indenting
- the indented region has been off by one line as lineForPosition returns 1-based line numbers but QTextDocument::findBlockByNumber expects base 0
- all lines (including first and last line) have to be indented
- if text is collapsed, then findBlockByNumber has to be used instead of findBlockByLineNumber for getting the block containing a line

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:53 +01:00
Martin Aumüller
a088b01713 fakevim: fix undo for indenting
previously, indenting would have been undone line by line

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:53 +01:00
Martin Aumüller
a04137f39a fakevim: 'dG' at the end of the document should delete the last line
make sure that when deleting line-wise, a complete line is deleted,
even at the end of the document

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:53 +01:00
Martin Aumüller
c71c338e72 fakevim: common implementation of 'G' and 'gg'
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:53 +01:00
Martin Aumüller
c7281909c1 fakevim: [lineno]gg should behave as [lineno]G
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:52 +01:00
Martin Aumüller
159e3f613d fakevim: fix 'yj', 'dj', 'cj' and 'yk', 'dk', 'ck'
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:52 +01:00
Martin Aumüller
e95692b599 fakevim: fix 'c$', 'd$', 'y$', 'C', 'D' at end of line
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:52 +01:00
Martin Aumüller
df9335c542 fakevim: fix 'P' at end of line
previously, the insertion point would have stayed just in front of the last character instead of in
front of the last but first character

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:52 +01:00
Martin Aumüller
6ebac9116f fakevim: fix 'O' at begin of document
'O' would have opened the new line after the first line instead of before

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:52 +01:00
Martin Aumüller
869782df18 fakevim: fix undoing of commands that enter insert mode
atomically undo command that entered insert mode together with undoing the insertion of new characters

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:51 +01:00
Martin Aumüller
833a266319 fakevim: update mini buffer after 'A' to indicate change to INSERT mode
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:51 +01:00
Martin Aumüller
d13f0bb2ce fakevim: wrong indentation
Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-05 18:48:51 +01:00
hjk
84e2e8933d fakevim: make Ctrl-C leave visual modes 2010-01-05 18:13:23 +01:00
hjk
b20dee565e fakevim: implement S 2010-01-05 18:13:23 +01:00
hjk
d29b5cd208 fakevim: make auto-inserted text part of 'last insertion', so it can be repeated 2010-01-04 13:16:45 +01:00
hjk
f39381fc6c fakevim: better gJ 2009-12-15 09:39:22 +01:00
hjk
421449ad30 fakevim: code cosmetics: use some accessor functions to m_visualMode 2009-12-15 09:39:21 +01:00
hjk
35e732f331 fakevim: some improvements to d, x, D and X in the visual modes 2009-12-15 09:39:21 +01:00
hjk
c7850c3f98 fakevim: improve some basic tab/space/indentation handling 2009-12-11 13:25:36 +01:00
hjk
a0abde6306 fakevim: Add back references, $ and ^ handling to ex-mode substitute 2009-12-09 17:41:59 +01:00
hjk
9af0027158 fakevim: make undo of line shifting 'atomic' 2009-12-01 17:11:09 +01:00
Kimitake
f928145163 ^[ should work as well as ESC key in insert mode.
Merge-request: 2157
Reviewed-by: hjk <qtc-committer@nokia.com>
2009-11-27 14:48:37 +01:00
Kimitake
8abc551b31 [ and ] can be added in command mode, but they should be ignored.
Merge-request: 2157
Reviewed-by: hjk <qtc-committer@nokia.com>
2009-11-27 14:48:37 +01:00
hjk
aa3b274a93 fakevim: fix undo of 'J' 2009-11-19 08:51:18 +01:00
hjk
dcad2e249f fakevim: fix pasting in visual block mode 2009-11-10 10:07:36 +01:00
hjk
82c548285f fakevim: fix writing of full file in stand-alone mode 2009-11-10 09:25:51 +01:00
hjk
1775f5d887 fakevim: remove workaround for Qt <= 4.5. Creator needs 4.6 anyway 2009-11-03 14:25:25 +01:00
hjk
0bc1095b70 fakevim: fix undo() behaviour
This is the finalization of the change started with 3c0ca8c188.
Fakevim undo was broken due to behavioural changes in QTextDocument
in Qt 4.6. Now that QTextDocument has gotten new accessors to the
needed (and previously available) data we can use it.
2009-11-03 14:15:24 +01:00
hjk
3c0ca8c188 fakevim: prepare fix of QTextDocument::revision() based undo/redo. 2009-10-26 12:52:07 +01:00
hjk
83cc22b233 fakevim: fix QTCREATORBUG-152
It took two 'u' to undo a '~'.
2009-10-23 15:47:12 +02:00
con
17d9bd6b0a Rename QuickOpen namespace. 2009-10-16 11:30:46 +02:00
Friedemann Kleint
ee5e169cb8 FakeVim: Fix tr()-warnings. 2009-10-07 09:27:14 +02:00
Friedemann Kleint
5948e284bb Rename namespace Core::Utils into Utils
Also move Designer::Internal::FormWindowEditor ->
Designer::FormWindowEditor.
2009-10-05 11:06:05 +02:00
James Linse
b2235b5ca2 Fixed yanking and deleting using marks ma "ay'a
Fixed yanking with e (ye) Fixed ce followed by .
Initial implementation for mark updates (marks should stay on the same line after adding/deleting lines)
Fixed yank with Y
Added fakevim tests for yanking using marks and yanking using Y.
Fixed yanking with marks when a mark was set to a blank line.
Combined yy and Y to use the same yanking method.

Merge-request: 1314
Reviewed-by: hjk <qtc-committer@nokia.com>
2009-09-16 14:16:55 +02:00
hjk
0422c8330c fakevim: fix broken auto tests 2009-08-20 12:05:59 +02:00
hjk
d774393a86 fakevim: fix repeating <count>s 2009-08-20 10:24:22 +02:00
hjk
eb42239499 fakevim: make 'o' undo work in a single operation 2009-08-18 16:47:01 +02:00
hjk
06140f9c7a fakevim: fix 'ddp'
Was broken recently during the yank/paste rework.
2009-08-18 16:47:01 +02:00
hjk
93cbef8724 long live the king 2009-08-14 09:30:56 +02:00