windows配置neovim

最近在windows下将gvim换成了neovim,配置过程如下

  1. 安装neovim

我在windows下使用scoop,所以只需要运行以下命令安装neovim

scoop install neovim
  1. 创建neovim的配置文件
ni -type file -force C:\Users\juw1179\AppData\Local\nvim\init.vim
  1. 我的init.vim的配置文件如下
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'
Plugin 'Lokaltog/vim-powerline'
Plugin 'Markdown'
Plugin 'PProvost/vim-ps1'
Plugin 'MatlabFilesEdition'
Plugin 'posva/vim-vue'
Plugin 'mattn/emmet-vim'
Plugin 'JuliaEditorSupport/julia-vim'
Plugin 'iCyMind/NeoSolarized'

call vundle#end()            " required
filetype plugin indent on    " required
"
" Remember the position of cursor
set viminfo='800,<3000
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif

set cursorline
"hi CursorLine ctermbg=darkgrey
set cursorcolumn
set autoindent
set wrap
set nu
set tabstop=2
set shiftwidth=2
set expandtab
set fileencodings=gb18030,gbk,gb2312,utf-8
set termencoding=utf-8
set incsearch " incremental search
set laststatus=2 
set list lcs=tab:\|\ 
syntax enable

" Set Solarized Color Scheme
"let g:solarized_termcolors=256
"set t_Co=256
"set background=dark
colorscheme NeoSolarized
set termguicolors
set hlsearch
set nobackup
  1. 安装vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  1. 安装插件
    打开neovim(nvim)并运行以下命令
:PluginInstall
  1. 设置文件可以用右键nvim打开
    编辑注册表
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with Neovim]

[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Open with Neovim\command]
nvim "%1"

搞定收工

你可能感兴趣的:(windows配置neovim)