robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
4f27b585e9
master
1*nvim.txt* Nvim 2 3 4 NVIM REFERENCE MANUAL 5 6 7Nvim *nvim* *neovim* *nvim-intro* 8 9Nvim is based on Vim by Bram Moolenaar. Nvim is emphatically a fork of Vim, 10not a clone: compatibility with Vim (especially editor and Vimscript features, 11except |Vim9script|) is maintained where possible. See |vim-differences| for 12the complete reference. 13 14- If you already use Vim, see |nvim-from-vim| for a quickstart. 15- If you have never used Vim or Nvim before, see below. 16 17 Type |gO| to see the table of contents. 18 19============================================================================== 20What now? *nvim-quickstart* 21 22To learn how to use Vim in 30 minutes, try the tutorial: >vim 23 24 :Tutor<Enter> 25< 26Or watch this 10-minute video: https://youtu.be/TQn2hJeHQbM . 27 28 *config-example* *example-init* 29To customize Nvim, you will need a config file. Create your |init.lua| by 30copying the "example_init.lua" file: >vim 31 32 :exe 'edit' stdpath('config') .. '/init.lua' 33 :read $VIMRUNTIME/example_init.lua 34 :write ++p 35 :restart 36< 37See |lua-guide| for practical notes on using Lua to configure Nvim. 38 39"IDE" features in Nvim are provided by |LSP|. 40 41If you are just trying out Nvim for a few minutes, and want to see the 42extremes of what it can do, try one of these popular "extension packs" or 43"distributions" (Note: Nvim is not affiliated with these projects, and does 44not support them): 45 46- *lazyvim* https://www.lazyvim.org/ 47- *nvchad* https://nvchad.com/ 48- *kickstart* https://github.com/nvim-lua/kickstart.nvim 49 - Not recommended; use |example-init| instead. 50 51However, we recommend (eventually) taking time to learn Nvim from its stock 52configuration, and incrementally setting options and adding plugins to your 53|config| as you discover a need. 54 55============================================================================== 56Transitioning from Vim *nvim-from-vim* 57 581. To start the transition, create your |init.vim| (user config) file: >vim 59 60 :exe 'edit' stdpath('config') .. '/init.vim' 61 :write ++p 62 632. Add these contents to the file: >vim 64 65 set runtimepath^=~/.vim runtimepath+=~/.vim/after 66 let &packpath = &runtimepath 67 source ~/.vimrc 68 693. Restart Nvim, your existing Vim config will be loaded. >vim 70 71 :restart 72 73See |provider-python| and |provider-clipboard| for additional software you 74might need to use some features. 75 76Your Vim configuration might not be entirely Nvim-compatible (see 77|vim-differences|). For example the 'ttymouse' option was removed from Nvim, 78because mouse support is always enabled if possible. If you use the same 79|vimrc| for Vim and Nvim you could guard 'ttymouse' in your configuration 80like so: 81>vim 82 if !has('nvim') 83 set ttymouse=xterm2 84 endif 85 86And for Nvim-specific configuration, you can do this: 87>vim 88 if has('nvim') 89 tnoremap <Esc> <C-\><C-n> 90 endif 91 92For a more granular approach use |exists()|: 93>vim 94 if exists(':tnoremap') 95 tnoremap <Esc> <C-\><C-n> 96 endif 97 98Now you should be able to explore Nvim more comfortably. Check |nvim-features| 99for more information. 100 101 *portable-config* 102Because Nvim follows the XDG |base-directories| standard, configuration on 103Windows is stored in ~/AppData instead of ~/.config. But you can still share 104the same Nvim configuration on all of your machines, by creating 105~/AppData/Local/nvim/init.vim containing just this line: >vim 106 source ~/.config/nvim/init.vim 107< 108 109============================================================================== 110 vim:tw=78:ts=8:et:ft=help:norl: