You will need a version of Vim built with Python plugin support. This is standard on most distribution packages these days. Try vim --version | grep +python to confirm.

If you’re using Ubuntu, as of 16.04, default Vim doesn’t have Python configured. See here for options to get Vim with Python. Note you need Python 2 support. Make sure pip installs below are for Python 2 as well (you might need to use pip2).

  1. Install external Python modules that ensime-vim requires to function:

     $ pip install websocket-client sexpdata
  2. If you use Neovim, additionally ensure you’ve installed the neovim module:

    $ pip install neovim
  3. If you’re using Neovim with Nix you’ll need to override the package to ensure that the Python interpreter uses the websocket-client and sexpdata modules. This can be achieved easily using overlays:

    self: super:
      neovim = self.neovim.override {
        extraPythonPackages = with self.pythonPackages; [ websocket_client sexpdata ];

    Make sure to rebuild Neovim after that.

  4. Install the ENSIME plugin for your build tool
  5. Add ensime-vim to your plugin manager of choice in your .vimrc (or init.vim for Neovim):

    Plugin Manager Your .{n}vimrc
    Vim-Plug Plug 'ensime/ensime-vim'
      Plug 'ensime/ensime-vim', { 'do': ':UpdateRemotePlugins' } # if Neovim
    Vundle Plugin 'ensime/ensime-vim'

    Under the hood this is just another Vim plugin, so other plugin managers should work great as well.

  6. Install the vim-scala plugin for Scala filetype detection and highlighting. Optionally, install Syntastic as well for syntax checking integrated with ENSIME. Instructions for both plugins can be found in their respective documentation.
  7. Trigger the plugin installations after updating your configuration. With vim-plug this is done by executing :PlugInstall. With Vundle run :PluginInstall.
Post-Install Config

Depending on your preferences, you may want to add some of the following to your .vimrc