forked from qt-creator/qt-creator
add special characters \u \U \l \L to fakevim substitute command
vim substitute (:s/) hast the option to use special characters \u \U \l \L in the replacement part to change the case of the following letters. This was not present in fakevim. Change-Id: I13785db24018283c242d94fd7892765657570176 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -3006,6 +3006,18 @@ void FakeVimPlugin::test_vim_substitute()
|
||||
COMMAND("undo | s/[bcef]//g", "a d");
|
||||
COMMAND("undo | s/\\w//g", " ");
|
||||
COMMAND("undo | s/f\\|$/-/g", "abc de-");
|
||||
|
||||
// modifiers
|
||||
data.setText("abC dEfGh");
|
||||
COMMAND("s/b...E/\\u&", "aBC dEfGh");
|
||||
COMMAND("undo | s/b...E/\\U&/g", "aBC DEfGh");
|
||||
COMMAND("undo | s/C..E/\\l&/g", "abc dEfGh");
|
||||
COMMAND("undo | s/b...E/\\L&/g", "abc defGh");
|
||||
|
||||
COMMAND("undo | s/\\(b...E\\)/\\u\\1/g", "aBC dEfGh");
|
||||
COMMAND("undo | s/\\(b...E\\)/\\U\\1/g", "aBC DEfGh");
|
||||
COMMAND("undo | s/\\(C..E\\)/\\l\\1/g", "abc dEfGh");
|
||||
COMMAND("undo | s/\\(b...E\\)/\\L\\1/g", "abc defGh");
|
||||
}
|
||||
|
||||
void FakeVimPlugin::test_vim_ex_commandbuffer_paste()
|
||||
|
||||
Reference in New Issue
Block a user