Hey everyone, I’m excited to announce the MVP release of ConnorGray/Vilfram, a new paclet I’ve been working on that adds a Vi-like editing experience to Wolfram Notebooks.
This is just a short post to get the word out to anyone who might be interested in trying it out.
More details can be found in the Vilfram GitHub repository:
>> https://github.com/ConnorGray/Vilfram <<
Getting Started
The ConnorGray/Vilfram paclet can be installed from paclets.com by evaluating:
PacletInstall["ConnorGray/Vilfram"]
Once installed, Vilfram will automatically be available and enabled in any opened notebook.
Check the section “Disabling Vilfram” below for instructions of disabling Vilfram.
Examples
Use h, j, k, and l keys for basic movement:

Switch between Insert and Command mode:

Use $, ^, e, and b to jump to the beginning and end of lines and words

Use visual selection to quickly copy, cut, and delete

Smart selection expansion to efficiently select the right subexpression

All Supported Commands
The following Command-mode sequences are supported:
Mode switching
i,a— enter Insert modeEsc— enter Command mode
Movement
Character-oriented:
h— move single character leftl— move single character rightj— move single line downk— move single line up
Word-oriented:
e— move to next wordb— move to previous word
Line-oriented:
^— move to beginning of line$— move to end of lineo— insert new line belowO— insert new line above
Document-oriented:
G— move to top of notebookgg— move to end of notebook
Visual Selection
v— begin visual selectionh— change selection single character leftl— change selection single character rightj— change selection single line downk— change selection single line upe— extend selection to next wordb— extend selection to previous word^— extend selection to beginning of line$— extend selection to end of liney— copy (“yank”) current selectionx— cut current selection
Deletion
de— delete to next worddb— delete to previous wordd^— delete to beginning of lined$— delete to end of line
Other
u— undo:w— save current notebook:x— save and close current notebook
Notable differences from Vi
Wolfram Notebooks are different in structure and supported functionality from traditional character-based editors. Some Vi commands have Vilfram analogues with slightly different behavior that is better suited to the features of the notebook environment.
- Structured selection commands
Notebooks support a powerful and intuitive structural selection mechanism whereby the current selection can be expanded in steps that are each an enclosing syntactical structure.
-
vi— expands the selection each timeiis pressed -
di+— expands the selection each timeiis pressed; deletes when theReturnkey is pressed -
No block caret
Vi often distinguishes between Insert and Command mode by, respectively, changing the input caret between a block which is placed on a particular character, and a vertical bar which is placed in-between characters.
Disabling Vilfram
“Help! I installed Vilfram and now I’m stuck!”
Don’t panic.
You’re not the first to get stuck in Vi.
To disable Vilfram, use your mouse to select the Edit > Disable Vilfram
menu item:
This will persistently disable Vilfram in the current and future sessions.
Use Edit > Enable Vilfram to re-enable Vilfram.
Enjoy!
Connor


– you have earned Featured Contributor Badge