You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a Visual Studio Code extension that provides a keymap similar to good old VZ Editor.
Covers the basic experience which is almost identical to VZ Editor (except ESC-* and function keys)
Emulates the Text stack (push/pop to the clibboard) with Cut, Copy and Paste
Toogle-style Selection mode (toggle by Ctrl+B) and Column selection mode (toggle by Ctrk+K B)
Undelete stack (Ctrl+U to restore deleted characters)
Keyboard macro (record/replay keyboard sequence)
Page scroll doesn't move the cursor position in the view
Half-page scroll as an option
Tag jump (Shift+F10)
Permissive two-stroke keys (e.g. Ctrl+Q Ctrl+X is equivalent to Ctrl+Q X)
List view operation with VZ-style cursor keys (e.g. selecting files on Explorer, selecting Suggestion)
Some options are available (search for 'vz' in the Settings)
Supported keys
Cursor, Scroll, Selection, Jump
Key
Function
Ctrl+S, Ctrl+D, Ctrl+E, Ctrl+X
Move cursor left/right/up/down
Ctrl+A, Ctrl+F
Move cursor to left/right start of a word
Ctrl+R, PageUp, Ctrl+C, PageDown
Scroll up/down one/half page
Ctrl+W, Shift+PageUp, Ctrl+Z, Shift+PageDown
Scroll up/down one line
Ctrl+Q S, Ctrl+Q D
Move cursor to start/end of a logical line
Ctrl+Q [, Ctrl+Q ]
Move cursor to start/end of a wrapped line
Ctrl+Q E, Ctrl+Q X
Move cursor to top/bottom of a view
Ctrl+Q R, Ctrl+Q C
Move cursor to start/end of a file
Ctrl+B
Toggle selection mode
Ctrl+K B
Toggle box selection mode
Ctrl+Q B
Jump to opposite side of selection range
Ctrl+Q K
Jump to bracket
Ctrl+Q J
Jump by line number
Ctrl+Q M
Mark current position
Ctrl+Q P
Jump to last marked position
Shift+F10
Tag jump
Delete, Insert, Edit, Clipboard
Key
Function
Ctrl+H, Ctrl+G
Delete left/right charactor
Ctrl+Q H, Ctrl+T
Delete left/right word
Ctrl+Q T, Ctrl+Q Y
Delete left/right half of a line
Ctrl+U
Restore deleted characters
Ctrl+I
Tab
Ctrl+M
Insert line break
Ctrl+N
Insert new line above
Ctrl+K D
Duplicate lines
Ctrl+Q N
Insert file path
Ctrl+Q U
Transform case
Ctrl+Y
Cut (push to text stack)
Ctrl+J
Paste (pop from text stack)
Ctrl+K K
Copy (push to text stack)
Ctrl+K C
Paste (keep text stack)
Ctrl+K Y
Clear clipboard and text stack
Search
Key
Function
Ctrl+Q F
Find
Ctrl+Q A
Replace
Ctrl+L
Select word to find
Ctrl+R, PageUp, Ctrl+C, PageDown
Find previous/next match
Ctrl+Q O
Replace one match
Undo, Redo
Key
Function
Ctrl+K U, Alt+Backspace
Undo
Shift+Alt+Backspace
Redo
Keyboard Macro
Key
Function
CTRL+_
Start/cancel recording key sequence
CTRL+^
Finish recording key sequence, Replay recorded key sequence
Window Management
Key
Function
Alt+Y
Split editor window
Alt+W
Switch editor window
Alternatives for conflicts
Key with conflict
Alternative key provided by Vz Keymap
Function
Ctrl+Q
Ctrl+Q Ctrl+Q
Quick open view
Ctrl+B
Ctrl+Alt+B
Toggle side bar visibility
Ctrl+J
Ctrl+Alt+J
Toggle panel visibility
Existing alternatives (Just for your information)
Key with conflict
Alternative way existing in VS Code
Function
Ctrl+A
Quadrupled click
Select all
Ctrl+N
Alt+F N (File > New File)
New untitled file
Ctrl+S
Alt+F S (File > Save)
Save file
Ctrl+W
Ctrl+F4
Close editor tab
Ctrl+I
Ctrl+Space
Trigger suggest (IntelliSense)
Ctrl+K Ctrl+C
Ctrl+/
Single line comment
Compatibility in detail
For basic compatibility, every two-stroke shortcuts provided by this extension allow you either to press the Ctrl key or not when pressing the second stroke.
(e.g. Ctrl+Q Ctrl+X is equivalent to Ctrl+Q X)
The selection mode of VZ Editor is something a little unique feature. Once you start it by Ctrl+B, you can make a selection range using cursor keys without the Shift key.
To emulate that behavior on VS Code, this extension holds the selection mode status internally.
You can use a context variable 'vz.inSelectionMode' in the 'when' clause in your keybindings.json to determine whether it is in selection mode or not.
The difference between standard 'editorHasSelection' and 'vz.inSelectionMode' is whether it includes the state in which the selection range is empty.
Note that, since some shortcut keys are mapped to the corresponding functionality of the VS Code directly, the behavior may be different than on VZ Editor.
For example, the result of Ctrl+F which moves the cursor to the next word may differ since word borders are defined differently in VS Code and VZ Editor.
This extension does not provide any two-stroke shortcut keys starting from ESC key, such as ESC S to save the document, to avoid breaking existing functionalities of ESC key that are single-stroke.
Instead, it is recommended to use acceleration keys such as Alt+F S to save the document.
The keyboard macro function can record and replay keyboard operations not only character input but also almost all keyboard operations provided by Vz Keymap such as cursor movement, selection, scrolling, delete, cut & paste, search, replace and even undo and redo.
However it doesn't record the keyboard inputs itself directly, instead, it records the commands of Vz Keymap invoked internally by the keyboard input.
Thus, please be notified that it can't record the execution of commands other than Vz Keymap.
How to use Find and Replace
Find
Press Ctrl+Q F (Find) to open the find widget, input your search string, and press Enter or Ctrl+M to confirm.
At this moment the find widget should still be open, but the keyboard focus has moved back to the document, so you can edit the document in a normal way while also you move around by Ctrl+R (Previous match) and Ctrl+C (Next match).
Press ESC to close the find widget and finish the finding mode.
Note:
Ctrl+L (Select Word to Find) instead of Ctrl+Q F is also available for opening the find widget, and in this case, the string (word) which starts from the location of the cursor is set as the new search string and the keyboard focus stays on the document. If you repeat pressing Ctrl+L here, you can make the string longer by the word repeatedly. It simulates a similar behavior as the original VZ Editor.
When the keyboard focus is on the find widget, you can also skip the confirmation step like pressing Ctrl+M, and immediately start searching matches by pressing Ctrl+C (Next match) for instance. Either way, the keyboard focus will move to the document.
Replace
Press Ctrl+Q A (Replace) to open the find and replace widget, input your search string and your replacement string.
You can use TAB when you move from search string input to replacement string input. Also, you can use Shift+TAB to go back.
While the keyboard focus is on replacement string input, press Enter or Ctrl+M to execute one replacement and jump to the next match.
You can skip applying the replacement to the match at current cursor position by pressing Ctrl+C (Next match).
Press ESC to close the find and replace widget and finish the replacement mode.
Note:
In order to achieve the above way of operations, the keyboard focus is retained on the find widget when you press Ctrl+R (Previous match) or Ctrl+C (Next match) with the focus on the replacement string input.
You can also use CtrL+Q O to execute the replacement. This way is available even the keyboard focus is on the document.