Techyou labs
文章RSS
评论RSS
登录
真正的爱应该超越生命的长度,心灵的宽度,灵魂的深度
搜索
关于作者
文章分类
Default
Linux/Unix
Database
Cloud
Networking
Security
Programming
最新文章
openvpn自签名证书
带你重走 TiDB TPS 提升 1000 倍的性能优化之旅
Unicode 中的 BIDI 双向性算法[转]
在linux中设置优先使用ipv4,而不是ipv6
linux下WPS高分辨率下因字体缩放导致字体发虚的问题
ssh-rsa not in pubkeyacceptedalgorithms问题解答及处理办法 Permission denied (publickey)
在 Ubuntu 22.04 中使用 PipeWire 替换 PulseAudio
MYSQL简单监控指标
deepin-wine6-stable下TIM悄悄崩溃问题
openwrt 设置ipv6地址分配
最新评论
renothing: 备注:路由器端优先设置ipv4并不影响客户端的ip...
renothing: 二次反向代理跟你应用程序得处理时间有关系吧?尤其是...
二次反向代理性能很差,怎么优化的?: 我也用nginx 做了个二次反向代理,但是并发连3...
hostyep: 交换链接么?目前每天保持30个左右对口IP,每月都...
yzhkpli: error while loading share...
美肤宝: 感谢分享。。。
lq: 嗯 喜欢弄得点单点
按月归档
August 2023
March 2023
December 2022
November 2022
September 2022
August 2022
March 2022
January 2022
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
February 2021
September 2020
May 2020
September 2019
August 2019
July 2019
June 2019
May 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
April 2018
March 2018
December 2017
October 2017
September 2017
August 2017
April 2017
March 2017
February 2017
August 2016
July 2015
November 2014
September 2014
August 2014
July 2014
June 2014
July 2013
April 2013
September 2012
July 2012
May 2012
April 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
June 2009
May 2009
April 2009
March 2009
February 2009
December 2008
November 2008
September 2008
August 2008
July 2008
June 2008
常用标签
Mysql
nginx
mysql优化
linux
debian
Powered by
Typecho)))
Optimized by
EAimTY
neovim折腾手记
May 21, 2019
受够了YouCompleteMe每次插件升级就得重新编译的痛苦,决定试试传说中的新贵neovim Ubuntu/Mint https://launchpad.net/~neovim-ppa/+archive/ubuntu/stable (Xenial 16.04 or newer only). https://launchpad.net/~neovim-ppa/+archive/ubuntu/unstable To be able to use add-apt-repository you may need to install software-properties-common: sudo apt-get install software-properties-common If you're using an older version Ubuntu you must use: ``` sudo apt-get install python-software-properties ``` Run the following commands: ``` sudo add-apt-repository ppa:neovim-ppa/stable sudo apt-get update sudo apt-get install neovim ``` 让neovim成为默认首选编辑器 ``` sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60 sudo update-alternatives --config vi sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60 sudo update-alternatives --config vim sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60 sudo update-alternatives --config editor ``` nvim的默认配置文件路径 The Nvim config file is named "init.vim", located at: > Unix ~/.config/nvim/init.vim Windows ~/AppData/Local/nvim/init.vim Or if |$XDG_CONFIG_HOME| is defined: >$XDG_CONFIG_HOME/nvim/init.vim The `$XDG_CONFIG_HOME` and `$XDG_DATA_HOME` environment variables are used if they exist, otherwise default values (listed below) are used. CONFIG DIRECTORY (DEFAULT) *$XDG_CONFIG_HOME* Nvim: stdpath("config") Unix: ~/.config ~/.config/nvim Windows: ~/AppData/Local ~/AppData/Local/nvim DATA DIRECTORY (DEFAULT) *$XDG_DATA_HOME* Nvim: stdpath("data") Unix: ~/.local/share ~/.local/share/nvim Windows: ~/AppData/Local ~/AppData/Local/nvim-data *$NVIM_LOG_FILE* Usually the file is ~/.local/share/nvim/log unless that path is inaccessible or if $NVIM_LOG_FILE was set before |startup|. 总的来说,你从vim切换到neovim会如丝般顺滑,基本没什么不同. 对于使用了pyenv或者goenv以及npm的同志来说,自动识别更让人惊喜. 安装plug.vim来管理插件 ``` curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ``` 编辑~/.config/nvim/init.vim ``` " Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using standard Vim directory names like 'plugin' call plug#begin('~/.vim/plugged') " Make sure you use single quotes " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align Plug 'junegunn/vim-easy-align' " Any valid git URL is allowed Plug 'https://github.com/junegunn/vim-github-dashboard.git' " Multiple Plug commands can be written in a single line using | separators Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' } " Using a non-master branch Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug 'fatih/vim-go', { 'tag': '*' } " Plugin options Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } " Plugin outside ~/.vim/plugged with post-update hook Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } " Unmanaged plugin (manually installed and updated) Plug '~/my-prototype-plugin' " Initialize plugin system call plug#end() ``` 以上是例子,具体要装哪些插件根据自己需求决定. 附上我的插件列表: ``` Finished. 0 error(s). [========================] ~ ~ - git-blame.vim: OK ~ - coc.nvim: OK ~ - neosnippet.vim: OK ~ - pangu.vim: OK ~ - vim-css-color: OK ~ - nerdtree: OK ~ - nerdtree-git-plugin: OK ~ - vim-template: OK ~ - vim-terraform: OK ~ - vim-misc: OK ~ - vim-go: OK (not loaded) ~ - vim-gitgutter: OK ~ - molokai: OK ~ - tabular: OK ~ - neoterm: OK ~ - vim-vue: OK ~ - neosnippet-snippets: OK ~ - nerdcommenter: OK ~ - tagbar: OK ~ - vim-easymotion: OK ~ - ctrlsf.vim: OK ~ - ctrlp.vim: OK ~ - vim-easytags: OK ~ - vim-markdown: OK ``` 上张效果图
福利就附一篇网友写的vim手册: https://www.dreamxu.com/books/vim/ https://www.zhihu.com/question/23590572
暂无评论
添加新评论
称呼
Email
网站
取消回复
内容
发表评论