Skip to content

Commit 3409166

Browse files
committed
update setup and vim
1 parent c3cc0e1 commit 3409166

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

home/.vimrc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,22 @@ set nobackup
280280
set nowritebackup
281281
set updatetime=300
282282
set shortmess+=c
283-
vmap <leader>f <Plug>(coc-format-selected)
284-
nmap <leader>f <Plug>(coc-format-selected)
285-
283+
" Symbol renaming.
284+
nmap <leader>rn <Plug>(coc-rename)
285+
" GoTo code navigation.
286+
nmap <silent> gd <Plug>(coc-definition)
287+
nmap <silent> gy <Plug>(coc-type-definition)
288+
nmap <silent> gi <Plug>(coc-implementation)
289+
nmap <silent> gr <Plug>(coc-references)
290+
" Use `[g` and `]g` to navigate diagnostics
291+
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
292+
nmap <silent> [g <Plug>(coc-diagnostic-prev)
293+
nmap <silent> ]g <Plug>(coc-diagnostic-next)
294+
" Format
295+
vmap <leader>f <Plug>(coc-format)
296+
nmap <leader>f <Plug>(coc-format)
297+
" Highlight the symbol and its references when holding the cursor.
298+
autocmd CursorHold * silent call CocActionAsync('highlight')
286299
" Switch to opened buffer position, including tab
287300
set switchbuf=usetab
288301

remove.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ echo "Removing..."
44

55
rm -rf $HOME/.vim $HOME/.zsh $HOME/.oh-my-zsh
66

7-
rm -rf $HOME/.vimrc $HOME/.zshrc
7+
rm -rf $HOME/.vimrc $HOME/.zshrc*
88

9-
rm -rf $HOME/.config/nvim
9+
rm -rf $HOME/.config/nvim $HOME/.config/coc
1010

1111
rm -rf $HOME/.config/flake8 $HOME/.config/pep8
1212

setup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ npm config set prefix '~/.npm-global'
2828

2929
echo "Setting up pyenv"
3030
eval "$(pyenv init -)"
31-
pyenv install 3.7.8
32-
pyenv install 2.7.17
31+
pyenv install -s 3.7.8
32+
pyenv install -s 2.7.17
3333
pyenv shell 2.7.17 && pip install -U pip neovim flake8 autopep8 pep8 python-language-server
3434
pyenv shell 3.7.8 && pip install -U pip neovim flake8 autopep8 pep8 python-language-server
3535
pyenv global 3.7.8
@@ -46,5 +46,6 @@ export ZSH="$HOME/.zsh/oh-my-zsh"
4646
echo "Setting up configurations ..."
4747
cp -l -f -T -r $PWD/home $HOME
4848
cp -l -f -T -r $PWD/config $HOME/.config
49+
vim -E -s -u "$HOME/.vimrc" +PlugInstall +qall
4950

5051
echo "Done installation."

0 commit comments

Comments
 (0)