
vim
vim
快乐的飞起
a programming lover
展开
-
linux安装golang
1.下载源码2.使用tar命令将安装包解压到/usr/local目录下:tar -xzf go1.8.linux-amd64.tar.gz -C /usr/local3.单用户配置vim ~/.bashrc后面加入export GOPATH=/home/golang/gopath export GOROOT=/usr/local/goexport GOOS=linuxexport GOTOOLS=$GOROOT/pkg/toolexport PATH=$PATH:$GOROOT/b原创 2021-01-13 17:03:34 · 525 阅读 · 0 评论 -
vim强大的开源配置
https://github.com/SpaceVim/SpaceVim https://github.com/PegasusWang/vim-config原创 2021-01-12 15:13:29 · 227 阅读 · 0 评论 -
vim和git
Fugitive在Vim里使用Git https://github.com/tpope/vim-fugitive Gedit,Gdiff,Gblame,Gcommit等笔者更喜欢用tmux新开一个窗口来使用git,后面我们会讲到原创 2021-01-09 23:16:21 · 336 阅读 · 0 评论 -
vim注释插件vim-commentary
vim-commentaryvim注释插件有很多,这里使用这个比较轻量的ttps://github.com/tpope/vim-commentary记住常用的命令gc注释和取消注释插件会根据不同的文件类型使用不同注释,python(#)golang(//Plug 'joom/vim-commentary'...原创 2021-01-09 22:50:53 · 679 阅读 · 0 评论 -
2021-01-09
格式化与静态t查为什么需要这些工具呢?能让工具做的就不用让人去费心把精力集中代码逻辑本身,而不是整理格式这些浪费精力的事情上静态检查是为了让编写的代码更加规范。golint/pylint/eslint等无论你编写何种编程语言,最好都加上自动格式化和静态检查Neoformat vim-autoformat和Neoformat是两种使用较多的格式化插件你可以按照自己的喜好来选择,这里我们使用neoformat nttps://github.com/sbdchd/neoformat需要安装对应语言的格原创 2021-01-09 22:47:42 · 1924 阅读 · 0 评论 -
强大的vim代码补全插件deoplete.nvim
deoplete.nvim一个强大的neovim/vim8异步补全插件https://github.com/shougo/deoplete.nvim多编程语言的支持,支持模糊匹配需要安装对应编程语言的扩展if has('nvim') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }else Plug 'Shougo/deoplete.nvim' Plug 'roxma/nvim-yarp' Plug 'rox原创 2021-01-09 22:38:18 · 1330 阅读 · 0 评论 -
python-mode把vim打造成轻量IDE
Python-modePython插件使用比较多的是jedi-vim和python-modehttps://github.com/python-mode/python-modepython-mode同样具备基本的补全、跳转、重构、格式化功能即使是在服务器上也能愉快调试python代码了vim --version | grep pythonPlug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }:sou原创 2021-01-09 21:36:19 · 308 阅读 · 0 评论 -
强大的Vim模糊搜索与替换插件
模糊搜索我们经常需要在一个代码项目中模糊搜索一些文本,怎么办呢?Vim自带的搜索/可以搜索当前文件,但是项目有很多个文件需要一个插件来模糊搜索多个文件内容使用Ag.vim或者fzf.vim都可以很好地支持模糊搜索fzf与fzf.vimfzf是一个强大的命令行模糊搜索工具,fzf.vim集成到了vim里https://github.com/junegunn/fzf.vim```handlebars使用Ag[PATTERN]模糊搜索字符串使用Files[PATH]模糊搜索目录```cpp原创 2021-01-09 21:19:23 · 2271 阅读 · 0 评论 -
Vim-surround,编辑也要成双成对
vim-surround如果快速让你更换一对单引号为双引号,你会怎么做?一个一个查找然后替换,是不是比较低效?https://github.com/tpope/vim-surroundvim-surround使用normal模式下增加,删除,修改成对内容ds(delete a surrounding)cs(change a surrounding)ys(you add a surrounding)Plug 'anyakichi/vim-surround':w:source %:plu原创 2021-01-09 20:59:04 · 219 阅读 · 0 评论 -
Vim快速定位插easymotion
Vim移动命令在基础篇我们讲了很多vim中移动的命令比如w/e基于单词移动,gg/G文件首尾,0/$行首位fchar查寻字符ctrl+f ctrl+u前后翻屏那假如我想快速跳到当前窗口显示区的任意位置呢?2.如何移动到任意位置可以使用vim的搜索/加上n跳转,但是使用easymotion更方便https://github.com/easymotion/vim-easymotion官方文档比较长,很多人没有看懂怎么用,其实一个映射就能应付nmap ss <Plug>(easym原创 2021-01-09 20:45:37 · 1326 阅读 · 0 评论 -
vim模糊搜索插件从ctrlp
1.Plug 'kien/ctrlp.vim'2.:w:source %:PlugInstall:qa " 退出所有3.模糊搜索器如果想快速查找并且打开一个文件可以用ctrlp插件https://github.com/ctrlpvim/ctrlp.vimlet g:ctrlp_map = '<c-p>' " CTRL+p 打开模糊搜索let g:ctrlp_cmd = 'CtrlP'使用ctrl+p然后开始输入少量字符就可以搜索啦...原创 2021-01-09 20:20:07 · 450 阅读 · 0 评论 -
vim文件目录树
文件管理器nerdtree使用nerdtree插件进行文件目录树管理ttps://github.com/scrooloose/nerdtree autocmdvimenter*NERDTree可以在启动vim的时候打开nnoremapv:NERDTreeFind查找文件位置nnoremap <leader>n :NERDTreeFocus<CR> " ,+ n 目录树nnoremap <C-n> :NERDTree<CR>原创 2021-01-08 21:27:27 · 974 阅读 · 0 评论 -
vim美化插件,让你的vim与众不同
1.vim美化插件更改vim的外观修改启动界面:https://github.com/mhinz/vim-startify状态栏美化:https://github.com/vim-airline/vim-airline增加代码缩进线条:https://github.com/yggdroot/indentline2.vim配色方案找到一个你喜欢的配色vim-hybird配色:github.com/wOng/vim-hybridsolarized配色:github.com/altercat原创 2021-01-08 11:27:32 · 1800 阅读 · 0 评论 -
如何寻找自己需要的vim插件
如何寻找自己需要的插件。大部分插件托管在了github上通过google搜索关键词寻找想要的插件https://vimawesome.com/浏览网上开源的vim配置借鉴想要的插件原创 2021-01-08 10:57:06 · 236 阅读 · 0 评论 -
vim汇总
1.先安装vim-plug参考 vim-plug和 vim请求拒绝2. 插件查找如何寻找自己需要的插件3.vim美化插件,让你的vim与众不同4.vim文件目录树原创 2021-01-08 21:28:10 · 106 阅读 · 0 评论 -
vim安装vim-plug报错:Failed connect to raw.githubusercontent.com:443;(拒绝连接)
1、打开hosts文件sudo vim /etc/hosts2、在hosts文件中添加以下内容199.232.28.133 raw.githubusercontent.com3、重新执行vim-plug安装命令curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim...原创 2021-01-08 00:52:27 · 2150 阅读 · 4 评论 -
vim-plug
vim-plug githublinuxcurl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim#安装你的第一个插件我们将安装vim-startify,一个好用的vim开屏插件nttps://github.com/mhinz/vim-startify修你的.vimrc件,增加该插件名称启动vim或者sou原创 2021-01-08 01:02:25 · 816 阅读 · 0 评论 -
vim配置
" 常用设置" 设置行号set number colorscheme hybrid" 按F2进入粘贴模式set pastetoggles=<F2>" 高亮搜索set hlsearch" 设置折叠方式set foldmethod=indent" 一些方便的映射let mapleaders=','let g:mapleader=','" 使用jj进入normal模式inoremap jj <Esc>^" 使用Leader+w直接保存inoremap <原创 2021-01-08 00:29:50 · 162 阅读 · 0 评论 -
vim-go
vim-go功能强大的golang插件vim-gohttps://github.com/fatih/vim-go代码补全,重构,跳转,自动格式化,自动导入等功能基本可以满足golang日常开发Plug ‘fatih/vim-go’, { ‘do’: ‘:GoUpdateBinaries’ }ctrl +x +o 智能提示ctrl + p 上选Ctrl+n 下选Ctrl +] 跳转到定义处ctrl +o 跳回原来位置代码格式化 :GoFmt 回车自动导入 :GoImpor原创 2021-01-08 01:03:20 · 712 阅读 · 0 评论 -
vim
1.Vim的概念和基本操作,比如移动和增删改查如何1.输入Vim命令进入Vim 进去之后似乎没法输入东西,起始默认进去是normal模式使用 :q可以退出Vim2.开始编辑 进入编辑模式就可以像其他编辑器一样编辑了 使用i(insert)进入编辑模式, 开始输入文字表示(insert),a(append),o(open a line below) 使用Esc又可以回到normal模式。使用:wq保存退出 w : write q :quit - a append 当前原创 2021-01-07 21:16:07 · 271 阅读 · 0 评论