前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux 安装最新Neovim

Linux 安装最新Neovim

作者头像
zeekling
发布2023-05-11 09:34:25
6380
发布2023-05-11 09:34:25
举报
文章被收录于专栏:浪浪山下那个村

NeoVim 和Vim 的差异

vim 老矣

  • Vim已经几乎是老代码,维护的人较少。
  • vim 代码老旧,bugfix,新特性加入比较困难。

vim 新型分支 --neovim

Neovim是一个社区驱动的开源项目,是Vim文本编辑器的一个分叉版本,它的构建使Vim更容易为核心开发人员维护。是对vim的一个增强,相比与vim性能更好,速度更快。

安装最新版本

  • 下载最新代码,切换到nightly分支
代码语言:javascript
复制
git clone git@github.com:neovim/neovim.git
git checkout nightly
  • 编译
代码语言:javascript
复制
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install

查看版本:

代码语言:javascript
复制
➜  neovim git:(heads/nightly) vim --version                 
NVIM v0.10.0-dev-304+g84378c4dd
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/home/zeekling/project/github/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include -I/home/zeekling/project/github/neovim/build/src/nvim/auto -I/home/zeekling/project/github/neovim/build/include -I/home/zeekling/project/github/neovim/build/cmake.config -I/home/zeekling/project/github/neovim/src -I/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include -I/home/zeekling/project/github/neovim/.deps/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

如何把neovim配置的像IDE一样

安装SpaceVim

安装参考:https://spacevim.org/quick-start-guide/#installation

配置

/.SpaceVim.d/init.toml中添加下面内容:

代码语言:javascript
复制
# Enable autocomplete layer
[[layers]]
name = 'autocomplete'
auto_completion_return_key_behavior = "complete"
auto_completion_tab_key_behavior = "smart"
auto_completion_delay = 50
auto_completion_complete_with_key_sequence = "nil"
auto_completion_complete_with_key_sequence_delay = 0.1

[[layers]]
name = "lang#python"

[[layers]]
name = "format"

[[layers]]
name = 'lang#c'
enable_clang_syntax_highlight = true

[[layers]]
  name = "lsp"

[[layers]]
  name = "ui"
  enable_scrollbar = false
  enable_sidebar = false

[[layers]]
name = "incsearch"

[[layers]]
  name = "lang#markdown"

[[layers]]
  name = "git"
  git_plugin = 'fugitive'

[[layers]]
  name = "lang#cmake"

[[layers]]
  name = "lang#java"  

[[layers]] 
  name = "lang#python"

[[layers]]
  name = "colorscheme"

[[layers]]
  name = "gtags"
  gtagslabel = "pygments"

[[layers]]
  name = "lang#tcl"

[[layers]]
  name = "lang#lua"

[options]
    # 文件树插件可选值包括:
    # - nerdtree (默认)
    # - vimfiler: 需要编译 vimproc.vim, 在目录 bundle/vimproc.vim 下
    # - defx: 需要 +py3 支持
    filemanager = "vimfiler"
    enable_filetree_gitstatus = true
    project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
    vimcompatible = false
    filetree_direction = "left"
#    colorscheme = "SpaceVim"
    colorscheme = "material"
#    colorscheme = "hybrid"
#    colorscheme = "NeoSolarized"
    colorscheme_bg = "light"
    enable_guicolors = true
    bootstrap_before = "myspacevim#before"
    bootstrap_after  = "myspacevim#after"
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2023.05.10,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • NeoVim 和Vim 的差异
    • vim 老矣
      • vim 新型分支 --neovim
      • 安装最新版本
      • 如何把neovim配置的像IDE一样
        • 安装SpaceVim
          • 配置
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档