diff --git a/.vimrc b/.vimrc index 704b6a7..3398eba 100644 --- a/.vimrc +++ b/.vimrc @@ -116,7 +116,7 @@ call plug#begin('~/.vim/plugged') " begin vim Plug 'chenxuan520/my-vim-dashboard' " function list -Plug 'preservim/tagbar', {'on':'TagbarToggle'} +Plug 'liuchengxu/vista.vim', {'on': 'Vista'} " auto complete Plug 'neoclide/coc.nvim', {'branch': 'release'} " find anything @@ -987,9 +987,13 @@ function! ShowDocumentation() endif endfunction -" tagbar -let g:tagbar_width = 22 -nnoremap t :TagbarToggle +" vista +nnoremap t :Vista!! +let g:vista_default_executive = 'ctags' +let g:vista#renderer#enable_icon = 0 +let g:vista_sidebar_width = 22 +let g:vista_echo_cursor = 0 +let g:vista_stay_on_open = 0 " auto pair let g:AutoPairsMapCh = 0 diff --git a/README.md b/README.md index e7d6c92..3eb0fb0 100644 --- a/README.md +++ b/README.md @@ -426,22 +426,29 @@ set-option -ga terminal-overrides ",*256col*:Tc" - [tokyonight](https://github.com/ghifarit53/tokyonight-vim) -12. ctrl-s之后没有多光标,反而卡住了 +### 12. ctrl-s之后没有多光标,反而卡住了 - 终端的设置问题,将`stty -ixon`加到~/.bashrc,然后重新打开终端加载就可以了 -13. 安装nodejs出错,无法连接下载 +### 13. 安装nodejs出错,无法连接下载 - 重新运行./shell/nodejs.sh -14. xshell中使用vim的backspace无法删除字符 +### 14. xshell中使用vim的backspace无法删除字符 - xshell的问题,[参考](https://www.cnblogs.com/yjd_hycf_space/p/11329841.html) -15. nvim无法使用系统粘贴板 +### 15. nvim无法使用系统粘贴板 - 运行`sudo apt install xclip`,[参考](https://zhuanlan.zhihu.com/p/667386801) +### 16. 出现ctags: Warning: Cannot disable fixed field + + - 默认的ctags版本太低了,需要更新,[下载地址](https://github.com/universal-ctags/ctags-nightly-build/releases) + + - 打不开github链接也可以用[我提前下好的](https://gitee.com/mirrorvim/userful-tools-2/releases/download/ctagsv1.0.1/ctags)(注意是linux x86_64的) + + ## 帮助 1. [插件快捷键说明](./doc/key.md)(可能有部分过时,推荐使用\H查看) diff --git a/init.vim b/init.vim index 84f530d..a734e19 100644 --- a/init.vim +++ b/init.vim @@ -116,7 +116,7 @@ call plug#begin('~/.vim/plugged') " begin vim Plug 'chenxuan520/my-vim-dashboard' " function list -Plug 'preservim/tagbar', {'on':'TagbarToggle'} +Plug 'liuchengxu/vista.vim', {'on': 'Vista'} " auto complete Plug 'neoclide/coc.nvim', {'branch': 'release'} " find anything @@ -309,7 +309,6 @@ nnoremap :Step tnoremap tnoremap ~/.config/nvim/nvr.py -l tnoremap ~/.config/nvim/nvr.py -l;exit -tnoremap tnoremap exit nnoremap T :split:term nnoremap t :vsplit:term @@ -965,9 +964,13 @@ function! ShowDocumentation() endif endfunction -" tagbar -let g:tagbar_width = 22 -nnoremap t :TagbarToggle +" vista +nnoremap t :Vista!! +let g:vista_default_executive = 'ctags' +let g:vista#renderer#enable_icon = 0 +let g:vista_sidebar_width = 22 +let g:vista_echo_cursor = 0 +let g:vista_stay_on_open = 0 " auto pair let g:AutoPairsMapCh = 0 diff --git a/shell/pack.sh b/shell/pack.sh new file mode 100755 index 0000000..d5ad46e --- /dev/null +++ b/shell/pack.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# this file is for author pack the plug,don't run it + +mv ~/.vim/plugged/coc.nvim ~/.vim/ +tar -zcvf vim.tar.gz ~/.vim/plugged/* +mv ~/.vim/coc.nvim ~/.vim/plugged/ diff --git a/shell/plug.sh b/shell/plug.sh index fc71c63..2c6c394 100755 --- a/shell/plug.sh +++ b/shell/plug.sh @@ -1,6 +1,6 @@ #!/bin/bash rm ./vim.tar.gz -wget https://gitee.com/mirrorvim/vim-fast/releases/download/v1.0.13/vim.tar.gz +wget https://gitee.com/mirrorvim/vim-fast/releases/download/v1.0.14/vim.tar.gz tar -zxvf ${PWD}/vim.tar.gz -C ~/.vim/plugged/ git config --global --add safe.directory "*" diff --git a/vimrc-no-plug b/vimrc-no-plug index 18565eb..fb40404 100644 --- a/vimrc-no-plug +++ b/vimrc-no-plug @@ -141,7 +141,7 @@ command! -nargs=0 Fzfinstalldeb exec ":!sudo apt install -y fzf" command! -nargs=0 Fzfinstallweb exec ":!wget https://gitee.com/mirrorvim/userful-tools-2/releases/download/cmdv1.0.0/fzf-0.36.0-linux_amd64.tar.gz;mkdir ~/.local;mkdir ~/.local/bin;tar -zxvf ./fzf-0.36.0-linux_amd64.tar.gz -C ~/.local/bin;rm ./fzf-0.36.0-linux_amd64.tar.gz"|redraw!|call Askifaddpath() command! -nargs=0 Nvrinstallweb exec ":!mkdir -p ~/.config/nvim;wget https://gitee.com/mirrorvim/vim-fast/raw/master/shell/nvr.py -O ~/.config/nvim/nvr.py;chmod +x ~/.config/nvim/nvr.py"|redraw!|call Askifaddpath() command! -nargs=0 Ctagsinstalldeb exec ":!sudo apt install -y ctags" -command! -nargs=0 Ctagsinstallweb exec ":!mkdir ~/.local;mkdir ~/.local/bin;wget https://gitee.com/mirrorvim/userful-tools-2/releases/download/ctagsv1.0.0/ctags -O ~/.local/bin/ctags;chmod +x ~/.local/bin/ctags"|redraw!|call Askifaddpath() +command! -nargs=0 Ctagsinstallweb exec ":!mkdir ~/.local;mkdir ~/.local/bin;wget https://gitee.com/mirrorvim/userful-tools-2/releases/download/ctagsv1.0.1/ctags -O ~/.local/bin/ctags;chmod +x ~/.local/bin/ctags"|redraw!|call Askifaddpath() command! -nargs=0 Lfinstallweb exec ":!mkdir ~/.local;mkdir ~/.local/bin;wget https://gitee.com/mirrorvim/userful-tools-2/releases/download/lfv1.0.0/lf -O ~/.local/bin/lf;chmod +x ~/.local/bin/lf"|redraw!|call Askifaddpath() command! -nargs=0 Lazygitinstallweb exec ":!mkdir ~/.local;mkdir ~/.local/bin;wget https://gitee.com/mirrorvim/userful-tools-2/releases/download/cmdv1.0.0/lazygit.tar.gz;tar -zxvf ./lazygit.tar.gz -C ~/.local/bin;rm ./lazygit.tar.gz ~/.local/bin/README.md ~/.local/bin/LICENSE"|redraw!|call Askifaddpath()