[misc] shift back to vim

This commit is contained in:
Klesh Wong 2020-12-08 11:18:26 +08:00
parent 114e18180d
commit 6120d88d7d
3 changed files with 23 additions and 7 deletions

View File

@ -2,7 +2,7 @@
if status is-interactive
# === default programs
set -gx EDITOR nvim
set -gx EDITOR v
# === fzf configuration
set -U FZF_DEFAULT_COMMAND 'ag -g ""'

View File

@ -20,17 +20,30 @@ fi
if ! has_cmd "$VIM"; then
case "$PM" in
apt)
sudo add-apt-repository ppa:neovim-ppa/stable -y
sudo apt update
sudo apt install -y neovim
# nvim not very compatible with CJK characters and ranger
#sudo add-apt-repository ppa:neovim-ppa/stable -y
#sudo apt update
#sudo apt install -y neovim
#if enhance_vim; then
#sudo pip3 install pyvim neovim
#fi
# gui-common is required for clipboard integration
sudo add-apt-repository ppa:jonathonf/vim
sudo apt-get update
sudo apt install -y vim vim-gui-common
if enhance_vim; then
sudo pip3 install pyvim neovim
sudo pip3 install pyvim
fi
;;
pacman)
sudo pacman -S --noconfirm --needed neovim
#sudo pacman -S --noconfirm --needed neovim
#if enhance_vim; then
#sudo pip install pyvim neovim
#fi
sudo pacman -S --noconfirm --needed vim
if enhance_vim; then
sudo pip install pyvim neovim
sudo pip install pyvim
fi
;;
esac

View File

@ -89,6 +89,8 @@ if has('nvim')
let vim_plug_path = expand("~/.config/nvim/autoload/plug.vim")
endif
else
map <ScrollWheelUp> <C-Y>
map <ScrollWheelDown> <C-E>
let vim_plug_path = expand("~/.vim/autoload/plug.vim")
set listchars=eol:\ ,tab:>\ ,trail:~,extends:>,precedes:<
endif
@ -224,6 +226,7 @@ let g:fugitive_no_maps=1
nnoremap <C-p> :call fzf#vim#files(trim(system("git rev-parse --show-toplevel 2>/dev/null \|\| pwd")))<Cr>
nnoremap <leader>gco :call fzf#run({'source': 'git branch \| cut -c 3-; git tag -l', 'sink': '!git checkout'})<CR>
nnoremap <leader>gm :call fzf#run({'source': 'git branch \| cut -c 3-', 'sink': '!git merge'})<CR>
nnoremap <leader>ls :Buffers<CR>
" ==== gruvbox configuration ====