VSCode 配置 Neovim + Easymotion
Neovim 安装#
- https://github.com/neovim/neovim/releases/tag/v0.7.2 Windows
- 将
neovim/bin
添加到系统变量中
- 将
Neovim 配置#
安装插件
- 创建init.vim文件
- python -m pip install neovim
- 安装vim-plug
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
ni "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force
详细如下
Lazy loading, my preferred way, as you can have both installable at once:
function! Cond(Cond, ...)
let opts = get(a:000, 0, {})
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
endfunction
" inside plug#begin:
Plug 'easymotion/vim-easymotion', Cond(!exists('g:vscode'))
Plug 'asvetliakov/vim-easymotion', Cond(exists('g:vscode'), { 'as': 'vsc-easymotion' })
Branching inside plug, simpler version of your above example, I like this worse because it makes installing confusing:
call plug#begin('/.config/nvim/plugged')
if exists('g:vscode')
Plug 'asvetliakov/vim-easymotion', { 'as': 'vsc-easymotion' }
else
Plug 'vim-easymotion/vim-easymotion'
endif
Neovim配置文件#
set number relativenumber
set autoindent
let mapleader=";"
function! Cond(Cond, ...)
let opts = get(a:000, 0, {})
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
endfunction
call plug#begin('D:/ProgramFiles/Neovim/plugged')
" inside;plug#begin:
Plug 'easymotion/vim-easymotion', Cond(!exists('g:vscode'))
Plug 'asvetliakov/vim-easymotion', Cond(exists('g:vscode'), { 'as': 'vsc-easymotion' })
call plug#end()
let g:EasyMotion_smartcase = 1
nmap <Leader><Leader>z <Plug>(easymotion-jumptoanywhere)
nmap <Leader><Leader>x <Plug>(easymotion-s2)
easymotion 功能#
https://raw.githubusercontent.com/Lokaltog/vim-easymotion/master/doc/easymotion.txt
作者:JoyFrank
出处:https://www.cnblogs.com/zxyfrank/p/16478893.html
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
世界上只有一种英雄主义,就是看到生活本来的样子,并且热爱它
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 上周热点回顾(2.17-2.23)
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)