neovim win 10でのインストール構成

13867 ワード

インストール
githubインストールパッケージアドレス
WindowsのPre-built archivesで
nvim-win 64をクリックします.zip、ダウンロード.インストールパッケージを解凍し、D:\Editorなどの適切なファイルに入れます.nvim-qt.exeをダブルクリックします.
次の操作
  • 所在フォルダに環境変数D:\Editor\Neovim\bin
  • を加える.
  • C:/Users/foo/AppData/Local/nvim/siteにspellフォルダを作成し、nvim-qtを開く.exe,入力:set spell
  • は、vimのvimrcファイルに相当するC:\Users\16590\AppData\Local
    vim
    ファイルをinit.vimに作成する.
  • neovimにPythonで書かれたpluginsがある場合は、neovim Python moduleをインストールします.方法、コンソール入力pip install neovim、neovimのinit.vimに
  • を加える
    let g:python3_host_prog='C:/Users/foo/Envs/neovim3/Scripts/python.exe'
    let g:python_host_prog='C:/Users/foo/Envs/neovim/Scripts/python.exe'

    プラグイン管理vim-plug
    ところで、vim-plugを使用するのは、非同期をサポートし、ダウンロード管理が速いためです.
    最初の方法はvim-plugのplugを直接コピーします.vimのコードは、C:\Users\16590\AppData\Local
    vim\autoload
    の下で、このフォルダがなければ、自分でautoloadフォルダを作ってplugを作成します.vim、コードを貼り付けてください.
    方法2、コンソール下$ curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim次はvim-plugの使い方です.
    ここにいるvimへの書き込み
    call plug#begin('D:\Editor\Neovim\share
    vim\plugged') " Plug 'bling/vim-airline' Plug 'vim-airline/vim-airline-themes' call plug#end() " "Powerline setting let g:airline_theme='molokai' let g:airline_powerline_fonts = 1

    一般的にはPlug'xxx'を書き込み保存し、nvim-qtを開く.exe、:PlugInstallを実行してプラグインをインストールした後、let g:xxx(プラグインに対応する文)に書き込む
    その他の構成
    私のgithubアップロードの構成を参照してください
    init.vimファイル内容
    """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    "                                  PlugList                                  "
    """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    " Specify a directory for plugins
    " - For Neovim: 'D:\Editor\Neovim\share
    vim\plugged' " - Avoid using standard Vim directory names like 'plugin' call plug#begin('D:\Editor\Neovim\share
    vim\plugged') " Make sure you use single quotes " Plug 'flazz/vim-colorschemes' Plug 'bling/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'mhinz/vim-startify' "theme color Plug 'tomasr/molokai' | Plug 'altercation/solarized' " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align "Plug 'junegunn/vim-easy-align' " Any valid git URL is allowed Plug 'https://github.com/junegunn/vim-github-dashboard.git' " Multiple Plug commands can be written in a single line using | separators Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' "JS "Plug 'isRuslan/vim-es6' | Plug 'mxw/vim-jsx' "Syntastic Plug 'scrooloose/syntastic' " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' } "comments-auto Plug 'scrooloose/nerdcommenter' " Using a non-master branch "Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) " Plugin outside ~/.vim/plugged with post-update hook "Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } " Unmanaged plugin (manually installed and updated) Plug '~/my-prototype-plugin' "Fuzzy file, buffer, mru, tag, etc finder. Plug 'kien/ctrlp.vim' "multiple selections "Plug 'terryma/vim-multiple-cursors' "Highlights trailing whitespace Plug 'bronson/vim-trailing-whitespace' "emmet quick-html Plug 'mattn/emmet-vim' call plug#end() """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " plugin settings " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "set my leader "let mapleader=";" let mapleader="\" set nocompatible " Initialize plugin system filetype plugin indent on " let g:airline_theme='molokai' let g:airline_powerline_fonts = 1 "NerdTree #### let NERDTreeQuitOnOpen = 0 let NERDChristmasTree=1 map f :NERDTreeToggle " NERDTree let NERDTreeMinimalUI=1 " NERDTree let NERDTreeWinSize=25 "let g:NERDTreeWinSize = 32 "ctrlp #### let g:ctrlp_map = '' let g:ctrlp_cmd = 'CtrlP' let g:ctrlp_working_path_mode = 'ra' set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe "let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' "ultisnip #### let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" "nerdcommenter #### let g:NERDSpaceDelims = 1 let g:NERDTrimTrailingWhitespace = 1 "vim-easy-align #### xmap ga (EasyAlign) nmap ga (EasyAlign) "vim-jsx #### let g:jsx_ext_required = 0 "syntastic """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " common setting " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set background=dark set t_Co=256 colorscheme molokai set number "Show related row numbers set relativenumber set autoindent set smartindent set showmatch set ignorecase set cursorline set incsearch set display+=lastline set guifont=Inconsolata:h15:cANSI set tabstop=4 set shiftwidth=4 set expandtab set nobackup set noswapfile set history=1024 set autochdir set whichwrap=b,s,,[,] set nobomb set backspace=indent,eol,start whichwrap+=,[,] " set clipboard+=unnamed set clipboard=unnamed set winaltkeys=no set undofile " keep an undo file (undo changes after closing) set ruler " show the cursor position all the time set showcmd " display incomplete commands set cmdheight=1 " 1 screen lines to use for the command-line set showfulltag " show tag with function protype. set guioptions+=b " present the bottom scrollbar when the longest visible line exceed the window set fileencodings=utf-8,gbk2312,gbk,gb18030,cp936 set encoding=utf-8 set tenc=utf-8 syntax on syntax enable set autoread set hlsearch """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " keyboard-binding " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " cd D:\Code\VimCode vmap "+y map "+p " nmap q :q " nmap w :w " vim nmap WQ :wa:q " , vim nmap Q :qa! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " others " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Put these in an autocmd group, so that we can delete them easily. augroup vimrcEx autocmd! " When editing a file, always jump to the last known cursor position. " Don't do it for commit messages, when the position is invalid, or when " inside an event handler (happens when dropping a file on gvim). autocmd BufReadPost * \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif " Enable spellchecking for Markdown autocmd FileType markdown setlocal spell " Automatically wrap at 80 characters for Markdown autocmd BufRead,BufNewFile *.md setlocal textwidth=80 " Disable wrap on some languages autocmd BufRead,BufNewFile *.slim setlocal textwidth=0 autocmd BufRead,BufNewFile *.erb setlocal textwidth=0 autocmd BufRead,BufNewFile *.html setlocal textwidth=0 " Automatically wrap at 72 characters and spell check git commit messages autocmd FileType gitcommit setlocal textwidth=72 autocmd FileType gitcommit setlocal spell " Allow stylesheets to autocomplete hyphenated words autocmd FileType css,scss,sass setlocal iskeyword+=- " Autocomplete ids and classes in CSS autocmd FileType css,scss set iskeyword=@,48-57,_,-,?,!,192-255 " Add the '-' as a keyword in erb files autocmd FileType eruby set iskeyword=@,48-57,_,192-255,$,- " Auto reload VIM when settings changed autocmd BufWritePost .vimrc so $MYVIMRC autocmd BufWritePost *.vim so $MYVIMRC autocmd BufWritePost vimrc.symlink so $MYVIMRC " Make those debugger statements painfully obvious au BufEnter *.rb syn match error contained "\" au BufEnter *.rb syn match error contained "\" au BufEnter *.js syn match error contained "\" au BufEnter *.coffee syn match error contained "\" augroup END """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " run " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "C,C++ F5 map :call CompileRunGcc() func! CompileRunGcc() exec "w" if &filetype == 'c' exec "!g++ % -o %

    リファレンスリンク
    VimからNeoVimへ
    インストール使用構成Neovim-構成
    転載先:https://www.cnblogs.com/wudongwei/p/8836047.html