Neovim

Thomas Brisbout

Freelance JS developer

 tbrisbout

Contents

  • Project Introduction
  • Installation and configuration
  • Main differences and new features

Project Introduction

Motivation

Vim codebase is a really bad one according to several people. 

http://geoff.greer.fm/vim/

 

Contributions are hard.

 

#if defined(BEOS)
    int
#else
    static  int
#endif
RealWaitForChar(fd, msec, check_for_gpm)
    int     fd;
    long    msec;
    int     *check_for_gpm UNUSED;
{
    int     ret;
#ifdef FEAT_NETBEANS_INTG
    int     nb_fd = netbeans_filedesc();
#endif
#if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
    static int  busy = FALSE;

Project Stats

  • 15K+ stars on GitHub
  • 189 contributors
  • 4K+ commits

Project Status

  • There is a bounty source to pay a salary to the lead dev (@tarruda)
  • A lot of pull request & issues need reviewing
  • A few PR have not progressed for a long time
    • [WIP] VimL to lua translator #243

    • [WIP] Compiling under Windows #810

  • Last update yesterday
  • Newsletter: no news since april

Installation

From Packages

# Ubuntu

sudo add-apt-repository \
      ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim

# OSX

brew tap neovim/neovim
brew install --HEAD neovim

Specific Dependency

# Python Module
sudo pip2 install neovim

# Clipboard (on Linux, depends on distro)
sudo apt-get install xsel

Linking configuration


# The easy way

ln -s ~/.vimrc ~/.nvimrc
ln -s ~/.vim ~/.nvim

And it works !

Configuration

Same config file as is

  • It works (unless you're doing obscure stuff) !
  • Neovim ignores most obsolete settings

Same config file modified

" Conditionals

if !has('nvim')
  set ttymouse=xterm2
endif

if has('nvim')
  tnoremap <Esc> <C-\><C-n>
endif

Partials

" load specific

if has('nvim')
  source ./nvim_only
else
  source ./vim_only
endif

" common config

...

Specific .nvimrc

  • File will be simpler
  • e.g. you don't need feature existence test
  • Need to maintain both

New Features

Defaults

- 'autoindent' is set by default
- 'autoread' is set by default
- 'backspace' defaults to "indent,eol,start"
- 'complete' doesn't include "i"
- 'display' defaults to "lastline"
- 'encoding' defaults to "utf-8"
- 'formatoptions' defaults to "tcqj"
- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is set by default
- 'incsearch' is set by default
- 'langnoremap' is set by default
- 'laststatus' defaults to 2 (statusline is always shown)
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
- 'mouse' defaults to "a"
- 'nocompatible' is always set
- 'nrformats' defaults to "hex"
- 'sessionoptions' doesn't include "options"
- 'smarttab' is set by default
- 'tabpagemax' defaults to 50
- 'tags' defaults to "./tags;,tags"
- 'ttyfast' is always set
- 'viminfo' includes "!"
- 'wildmenu' is set by default

Subtilities

  • Clipboard now use shell commands
  • pbcopy / pbpaste on OSX
  • xclip / xsel on linux

Other additions

  • Plugin interface via msg-rpc
  • can run asynchronously (due to async job control)
  • True colors

Terminal emulation

Some links

  • https://neovim.io/
  • https://salt.bountysource.com/teams/neovim
  • https://twitter.com/Neovim

neovim

By Thomas BRISBOUT

neovim

This is an introduction to Neovim (Project Status, installation and configuration tips ...)

  • 2,406