最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Windows 10下使用Neovim + SpaceVim,代替Sublime, IDE 等

运维笔记admin5浏览0评论


文章目录

  • 前言
  • 前期软件准备
  • Neovim
  • SPaceVim
    • 配置 SPaceVim
    • 增加python支持:

前言

个人习惯使用vim去处理日常工作,但电脑系统是 Windows 10,为方便经常会使用虚拟机和服务器中的vim。久而久之,发现有点麻烦,一直在想Windows下能否像Linux一样使用Vim呢。直到最近在Github上发现了几个很好用的repository,一切随之改变。

  1. Neovim 对应的官网为:https://neovim.io/
  2. SpaceVim,官网为:https://github/SpaceVim/SpaceVim

前期软件准备

Git for Windows : https://git-scm/download/win

一路左键安装就可以了

Neovim

根据系统版本,去https://github/neovim/neovim/releases下载对应的Neovim文件
我的系统是WIndows 64 位

  • 解压 nvim-win64.zip (or nvim-win32.zip)
  • 运行 nvim-qt.exe,并建议添加到环境变量: 右边我的电脑 -> 属性 -> 高级系统设置 -> 高级 -> 环境变量 -> 新建

SPaceVim

  1. 下载安装脚本 install.cmd 并以管理员身份运行,或者 进入在cmd中输入:
   git clone https://github/SpaceVim/SpaceVim.git $HOME\.SpaceVim
  1. 运行nvim-qt.exe 2遍,第一遍下载安装dein.vim等,知道出现提示结束,第二遍会开始下载vim的各种插件
    PS:国内网络链接github有时会抽风,速度比较慢,千万不要手贱
  1. 安装插件的过程中可能会出现vimproc.vim build error或是 make error,需要手动安装装:
   git clone https://github/Shougo/vimproc.vim/releases/download/ver.9.3/vimproc_win64.dll $HOME\.cache\vimfiles\repos\github\Shougo\vimproc.vim\lib

或去 https://github/Shougo/vimproc.vim/releases/ 网站下载对应的vimproc_win**.dll文件,放到C:\Users\用户名.cache\vimfiles\repos\github\Shougo\vimproc.vim\lib下

配置 SPaceVim

增加python支持:

  1. 在SPaceVim的配置文件C:\Users\用户名\.SpaceVim.d\init.toml中,加入:
[[layers]]
name = "lang#python"

然后打开nvim-qt.exe, 自动下载python的自动补全插件

  1. C:\Users\用户名.SpaceVim\init.vim中添加
let g:python3_host_prog = 'D:\\Anaconda\\Anaconda3\\python.exe'
  1. 更改字体为 Monaco, 在C:\Users\用户名.SpaceVim\init.vim中的Options中添加:
guifont = "Monaco:h11"
发布评论

评论列表(0)

  1. 暂无评论
ok 不同模板 switch ($forum['model']) { /*case '0': include _include(APP_PATH . 'view/htm/read.htm'); break;*/ default: include _include(theme_load('read', $fid)); break; } } break; case '10': // 主题外链 / thread external link http_location(htmlspecialchars_decode(trim($thread['description']))); break; case '11': // 单页 / single page $attachlist = array(); $imagelist = array(); $thread['filelist'] = array(); $threadlist = NULL; $thread['files'] > 0 and list($attachlist, $imagelist, $thread['filelist']) = well_attach_find_by_tid($tid); $data = data_read_cache($tid); empty($data) and message(-1, lang('data_malformation')); $tidlist = $forum['threads'] ? page_find_by_fid($fid, $page, $pagesize) : NULL; if ($tidlist) { $tidarr = arrlist_values($tidlist, 'tid'); $threadlist = well_thread_find($tidarr, $pagesize); // 按之前tidlist排序 $threadlist = array2_sort_key($threadlist, $tidlist, 'tid'); } $allowpost = forum_access_user($fid, $gid, 'allowpost'); $allowupdate = forum_access_mod($fid, $gid, 'allowupdate'); $allowdelete = forum_access_mod($fid, $gid, 'allowdelete'); $access = array('allowpost' => $allowpost, 'allowupdate' => $allowupdate, 'allowdelete' => $allowdelete); $header['title'] = $thread['subject']; $header['mobile_link'] = $thread['url']; $header['keywords'] = $thread['keyword'] ? $thread['keyword'] : $thread['subject']; $header['description'] = $thread['description'] ? $thread['description'] : $thread['brief']; $_SESSION['fid'] = $fid; if ($ajax) { empty($conf['api_on']) and message(0, lang('closed')); $apilist['header'] = $header; $apilist['extra'] = $extra; $apilist['access'] = $access; $apilist['thread'] = well_thread_safe_info($thread); $apilist['thread_data'] = $data; $apilist['forum'] = $forum; $apilist['imagelist'] = $imagelist; $apilist['filelist'] = $thread['filelist']; $apilist['threadlist'] = $threadlist; message(0, $apilist); } else { include _include(theme_load('single_page', $fid)); } break; default: message(-1, lang('data_malformation')); break; } ?>