Skip to content

Commit

Permalink
feat:replace tagbar2vista
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuan520 committed Jul 11, 2024
1 parent c80a008 commit f3bb2ae
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
12 changes: 8 additions & 4 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -987,9 +987,13 @@ function! ShowDocumentation()
endif
endfunction

" tagbar
let g:tagbar_width = 22
nnoremap <silent> <leader>t :TagbarToggle<cr>
" vista
nnoremap <silent> <leader>t :Vista!!<cr>
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
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)(可能有部分过时,推荐使用\<space\>H查看)
Expand Down
13 changes: 8 additions & 5 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -309,7 +309,6 @@ nnoremap <F8> :Step<cr>
tnoremap <c-\> <c-\><c-n>
tnoremap <c-o> ~/.config/nvim/nvr.py -l <space>
tnoremap <c-]> ~/.config/nvim/nvr.py -l<space>;exit<left><left><left><left><left>
tnoremap <LeftMouse> <Nop>
tnoremap <c-z> exit<cr>
nnoremap <leader><leader>T :split<CR>:term<cr>
nnoremap <leader><leader>t :vsplit<CR>:term<cr>
Expand Down Expand Up @@ -965,9 +964,13 @@ function! ShowDocumentation()
endif
endfunction

" tagbar
let g:tagbar_width = 22
nnoremap <silent> <leader>t :TagbarToggle<cr>
" vista
nnoremap <silent> <leader>t :Vista!!<cr>
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
Expand Down
7 changes: 7 additions & 0 deletions shell/pack.sh
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion shell/plug.sh
Original file line number Diff line number Diff line change
@@ -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 "*"
2 changes: 1 addition & 1 deletion vimrc-no-plug
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sid>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 <sid>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 <sid>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 <sid>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 <sid>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 <sid>Askifaddpath()

Expand Down

0 comments on commit f3bb2ae

Please sign in to comment.