diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
old mode 100755
new mode 100644
index de6fb38cbabbb0f9a6dbac2e9cffd7e208ed0f14..c5aa42c6cb99409ee444c901ed4a404472ae6e5e
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -1527,6 +1527,16 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
         m_opcount.clear();
         m_mvcount.clear();
         enterInsertMode();
+    } else if (key == 'S') {
+        const int line = cursorLineInDocument() + 1;
+        setAnchor(firstPositionInLine(line));
+        setPosition(lastPositionInLine(line + count() - 1));
+        yankSelectedText();
+        removeSelectedText();
+        setDotCommand("%1S", count());
+        m_opcount.clear();
+        m_mvcount.clear();
+        enterInsertMode();
     } else if (key == 't') {
         m_movetype = MoveInclusive;
         m_subsubmode = FtSubSubMode;
@@ -1594,7 +1604,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
         const int line = cursorLineInDocument() + 1;
         m_savedYankPosition = position();
         setAnchor(firstPositionInLine(line));
-        setPosition(lastPositionInLine(line+count() - 1));
+        setPosition(lastPositionInLine(line + count() - 1));
         if (count() > 1)
             showBlackMessage(QString("%1 lines yanked").arg(count()));
         m_rangemode = RangeLineMode;