From Gentoo Wiki
Jump to:navigation Jump to:search

Neovim is a Vim-fork focused on extensibility and agility.


USE flags

USE flags for app-editors/neovim Vim-fork focused on extensibility and agility.

lto Build with Link Time Optimization (LTO)
nvimpager Install nvimpager symlink to macro
tui Build the neovim unix tui


root #emerge --ask app-editors/neovim


Environment variables

A couple important variables:

  • VIMRUNTIME - Used to locate runtime files (documentation, syntax highlighting, etc.).
  • VIMINIT - Ex commands to be executed at startup. Run :help VIMINIT

A full list of environment variables can be found under the environment section of man 1 nvim.


  • ~/.config/nvim/init.vim - User-local nvim configuration file.
  • ~/.config/nvim - User-local nvim configuration directory. See also XDG_CONFIG_HOME.
  • $VIM/sysinit.vim - System-global nvim configuration file.
  • ~/.config/nvim - System-global nvim runtime directory.



user $nvim --help
  nvim [options] [file ...]      Edit file(s)
  nvim [options] -t <tag>        Edit file where tag is defined
  nvim [options] -q [errorfile]  Edit file with first error

  --                    Only file names after this
  +                     Start at end of file
  --cmd <cmd>           Execute <cmd> before any config
  +<cmd>, -c <cmd>      Execute <cmd> after config and first file

  -b                    Binary mode
  -d                    Diff mode
  -e, -E                Ex mode
  -es, -Es              Silent (batch) mode
  -h, --help            Print this help message
  -i <shada>            Use this shada file
  -m                    Modifications (writing files) not allowed
  -M                    Modifications in text not allowed
  -n                    No swap file, use memory only
  -o[N]                 Open N windows (default: one per file)
  -O[N]                 Open N vertical windows (default: one per file)
  -p[N]                 Open N tab pages (default: one per file)
  -r, -L                List swap files
  -r <file>             Recover edit state for this file
  -R                    Read-only mode
  -S <session>          Source <session> after loading the first file
  -s <scriptin>         Read Normal mode commands from <scriptin>
  -u <config>           Use this config file
  -v, --version         Print version information
  -V[N][file]           Verbose [level][file]
  -Z                    Restricted mode

  --api-info            Write msgpack-encoded API metadata to stdout
  --embed               Use stdin/stdout as a msgpack-rpc channel
  --headless            Don't start a user interface
  --listen <address>    Serve RPC API from this address
  --noplugin            Don't load plugins
  --startuptime <file>  Write startup timing messages to <file>

See ":help startup-options" for all options.



root #emerge --ask --depclean --verbose app-editors/neovim

See also

  • Vim — a text editor based on the vi text editor.
  • Vim/Guide — provides basic instructions for using the vim text editor.