From 6120d88d7db915b6fcaaed9ed4c3070fc4baedc9 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Tue, 8 Dec 2020 11:18:26 +0800 Subject: [PATCH] [misc] shift back to vim --- cli/fish/config.fish | 2 +- cli/vim.sh | 25 +++++++++++++++++++------ cli/vim/init.vim | 3 +++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/cli/fish/config.fish b/cli/fish/config.fish index e7ac62e..ec5471a 100644 --- a/cli/fish/config.fish +++ b/cli/fish/config.fish @@ -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 ""' diff --git a/cli/vim.sh b/cli/vim.sh index c231c45..4f37c55 100755 --- a/cli/vim.sh +++ b/cli/vim.sh @@ -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 diff --git a/cli/vim/init.vim b/cli/vim/init.vim index 3e9e34c..97314dc 100644 --- a/cli/vim/init.vim +++ b/cli/vim/init.vim @@ -89,6 +89,8 @@ if has('nvim') let vim_plug_path = expand("~/.config/nvim/autoload/plug.vim") endif else + map + map 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 :call fzf#vim#files(trim(system("git rev-parse --show-toplevel 2>/dev/null \|\| pwd"))) nnoremap gco :call fzf#run({'source': 'git branch \| cut -c 3-; git tag -l', 'sink': '!git checkout'}) nnoremap gm :call fzf#run({'source': 'git branch \| cut -c 3-', 'sink': '!git merge'}) +nnoremap ls :Buffers " ==== gruvbox configuration ====