3

When I'm working in vim and someone comes over to help/write some code into the editor and they don't know vim, they get totally stuck and we have to switch to a different editor.

Does anyone know if there is a plugin that turns off modes/vim specific things, so that they can edit like in a basic graphical editor?

5

You have a few options:

  1. Start vim with evim (or vim -y). This puts vim in "easy" mode: it sets 'insertmode' and behaves like a point-and-click editor (from the docs).
  2. :source $VIMRUNTIME/evim.vim—basically the same. Note that it sets up mappings (:help evim-keys).

You might be able to find or write a script to undo this whole thing, but it may also be easier to quit and restart after doing this. Sessions (such as via tpope/Obsession) make this less painful than it sounds.

  • 2
    Great answer! Quicker shortcut to #2 is :ru evim.vim, as using the :runtime command will search for the script file in $VIMRUNTIME. Probably worth mentioning the very important CTRL-L keystroke to escape to Normal mode in evim. It's mentioned in help but not very prominently. The more usual CTRL-O is also pretty useful. – filbranden Feb 10 at 11:48
  • 1
    @filbranden the only issue with :runtime is that someone might have other evim.vim scripts laying around! I prefer to be explicit, but that is certainly an option. – D. Ben Knoble Feb 10 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.