Vi like editor

Editors ::: editor_webvi
Maintained by Me!Damyon Wiese
This is vi for Moodle. No really - it works! Why? Why not ?
Latest release:
6 sites
6 fans
Current versions available: 1
Canvas based vi clone text editor for Moodle.

Put this entire directory at:


Visit your site notifications page to install the new plugins.

Enable the new editor type on the page:

Site administration / ► Plugins / ► Text editors / ► Manage editors

Now anyone can choose it in their profile as their default editor.

This is not a perfect vi clone by any means - but it does support most of the functions I use, and I find it natural to type in.

Vi primer for the un-enlightened.

Vi is simply the best. It is a purely keyboard based text editor with separate "modes".

Visual Mode
This is the mode that you will be in when the text editor opens. This mode lets you quickly navigate around your document
and perform commands like copy/paste. You will need to click on the editor before it will respond to any keyboard commands.

Visual Mode Commands
Arrow keys: Move the cursor
h: Left
j: Down
k: Up
l: Right
w: Move one word right
^: Start of line
$: End of line
G: Move to last line
<number>G: Move to line number
<number>%: Move to <number>% of doc
y<optional number>y: Copy this many lines (default 1)
y<optional number>y: Cut this many lines (default 1)
<optional number>dd: Delete this many lines (default 1)
d<navigation command>: Delete from the current position to the new position
<optional number>x: Delete this many characters (default 1)
<optional number>r<any char>: Replace this many chars with the new char (default 1)
u: undo
<ctrl>r: redo
<optional number>.: repeat the last command this many times
/<string>: Search for string
?<string>: Search backwards for string
m<a-z>: Mark a cursor position
'<a-z>: Move to a saved cursor position
i: Enter edit mode at the current cursor position
a: Enter edit mode after the current cursor position
A: Enter edit mode at the end of the line
I: Enter edit mode at the start of the line
~: Toggle the caps of the current char

Edit Mode
In this mode, anything you type will be added at the current cursor position. The only other command in this mode is
ESCAPE to return to visual mode.


Screenshot #0


Damyon Wiese (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Mon, Jul 7, 2014, 9:38 PM
    Hi Damyon. Thanks for this awesome contribution. As a command line geek, I guess I don't need to underline how much keen on I was to
    give this a try. I found it working pretty well, although some of the key bind I'm used to from regular ViM do not work yet (such as
    b, gg, Shift-O etc). The get_preferred_format() return value made me particualrly happy smile I hope you would be able to implement the
    support for repositories soon - and I hope they would be browsable in "command line like" style!

    You may want to to know that are now fully supported and accepted in this Plugins database which would make your Github
    page look a bit nicer. I noticed that the CSS in your styles.css are likely to affect the whole site, regardless the actual user
    preference (as I understand that, we concatenate all styles.css from all plugins so they should really affect only their own scope).
    I am wondering whether you actually need to change textarea styling via CSS. If the textarea widht determines the created canvas,
    it's size could be changed via webvi_init() maybe?

    It might be helpful to put a note into your README.txt referring to your original webvi code (and it's Apache 2.0 license).

    Approving this plugin now, you are cleared to land. Welcome to the Plugins directory!
  • Tue, Jul 8, 2014, 3:09 AM

    Now, all we need is a vi course format smile
  • Tue, Jul 8, 2014, 11:13 AM
    Wonderful! This would be great as an Atto plugin as well as alternate the HTML source plugin.
  • Martin Dougiamas
    Thu, Jul 10, 2014, 5:06 PM
    Brilliant! Just needs Y to Yank lines and s for substitutions smile
  • Thu, Jul 10, 2014, 11:53 PM
    Very cool! Time to teach the users to use VI the only true editor smile
  • Me!
    Fri, Dec 9, 2016, 9:33 AM
    I updated this plugin to mark it as compatible with 3.2.
  • Fri, Dec 9, 2016, 11:07 PM
    Does it do the same stripping the atto does when injecting html?
  • Tue, Oct 23, 2018, 7:33 PM

    I installed the theme in version 3.5.2+ of moodle, however, it has not worked correctly. It always presents the following sentence: "Unknown category"

    Could you please guide me to correct the mistake
Please login to post comments