最近在windows下將gvim換成了neovim,配置過程如下
- 安裝neovim
我在windows下使用scoop,所以只需要運行以下命令安裝neovim
scoop install neovim
- 創(chuàng)建neovim的配置文件
ni -type file -force C:\Users\juw1179\AppData\Local\nvim\init.vim
- 我的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
- 安裝vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- 安裝插件
打開neovim(nvim)并運行以下命令
:PluginInstall
- 設(shè)置文件可以用右鍵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"
搞定收工