Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
a01fa6c1
Commit
a01fa6c1
authored
Dec 19, 2008
by
hjk
Browse files
implement 'M' in fakevim
parent
5107caf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/fakevim/handler.cpp
View file @
a01fa6c1
...
...
@@ -287,8 +287,7 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
m_tc
.
movePosition
(
Left
,
KeepAnchor
,
n
);
finishMovement
();
}
else
if
(
key
==
'H'
)
{
int
firstPos
=
m_editor
->
cursorForPosition
(
QPoint
(
0
,
0
)).
position
();
m_tc
.
setPosition
(
firstPos
,
KeepAnchor
);
m_tc
=
m_editor
->
cursorForPosition
(
QPoint
(
0
,
0
));
m_tc
.
movePosition
(
Down
,
KeepAnchor
,
qMax
(
count
()
-
1
,
0
));
moveToFirstNonBlankOnLine
();
finishMovement
();
...
...
@@ -304,12 +303,17 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
m_tc
.
movePosition
(
Right
,
KeepAnchor
,
qMin
(
count
(),
rightDist
()));
finishMovement
();
}
else
if
(
key
==
'L'
)
{
QPo
int
point
=
m_editor
->
geometry
().
bottomR
ight
();
int
firstPos
=
m_editor
->
cursorForPosition
(
p
oint
).
position
(
);
m_tc
.
set
Position
(
firstPos
,
KeepAnchor
);
int
heigth
=
m_editor
->
he
ight
();
m_tc
=
m_editor
->
cursorForPosition
(
QP
oint
(
0
,
heigth
)
);
m_tc
.
move
Position
(
Up
,
KeepAnchor
,
qMax
(
count
()
-
1
,
0
)
);
m_tc
.
movePosition
(
Up
,
KeepAnchor
,
qMax
(
count
(),
1
));
moveToFirstNonBlankOnLine
();
finishMovement
();
}
else
if
(
key
==
'M'
)
{
int
heigth
=
m_editor
->
height
();
m_tc
=
m_editor
->
cursorForPosition
(
QPoint
(
0
,
heigth
/
2
));
moveToFirstNonBlankOnLine
();
finishMovement
();
}
else
if
(
key
==
'n'
)
{
search
(
m_lastSearchString
,
m_lastSearchBackward
);
}
else
if
(
key
==
'N'
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment