From fb300188910206108d306f59a16380429144a125 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 23 Oct 2020 11:48:19 +0800 Subject: [PATCH] [misc] add fzf as part of fish installation and replace CtrlP with fzf --- fish/install.sh | 7 +++++-- nvim/config/init.vim | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/fish/install.sh b/fish/install.sh index 97ae8d1..dda4ae2 100755 --- a/fish/install.sh +++ b/fish/install.sh @@ -10,11 +10,11 @@ case "$PM" in ! which pip3 && $ROOT/python/install.sh sudo add-apt-repository ppa:fish-shell/release-3 -y sudo apt update - sudo apt install fish libnotify-bin xdotool -y + sudo apt install fish libnotify-bin xdotool fzf -y ;; pacman) ! which pip && $ROOT/python/install.sh - sudo pacman -S --needed --needed fish xdotool + sudo pacman -S --needed --needed fish xdotool fzf ;; esac @@ -31,3 +31,6 @@ lnsf $DIR/config/functions/fish_prompt.fish $XDG_CONFIG_HOME/fish/functions/fish lnsf $DIR/config/functions/fish_right_prompt.fish $XDG_CONFIG_HOME/fish/functions/fish_right_prompt.fish lnsf $DIR/config/functions/fisher.fish $XDG_CONFIG_HOME/fish/functions/fisher.fish +# install plugins +fish -c "fisher add jethrokuan/fzf" + diff --git a/nvim/config/init.vim b/nvim/config/init.vim index ff9f00d..a20e709 100644 --- a/nvim/config/init.vim +++ b/nvim/config/init.vim @@ -89,8 +89,8 @@ call plug#begin() Plug 'editorconfig/editorconfig-vim' Plug 'tpope/vim-surround' Plug 'jiangmiao/auto-pairs' -Plug 'preservim/nerdtree' -Plug 'posva/vim-vue' +Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } +Plug 'posva/vim-vue', { 'for': 'vue' } Plug 'tpope/vim-repeat' "Plug 'neoclide/coc.nvim', {'branch': 'release'} "Plug 'neoclide/coc-json', {'do': 'yarnpkg install --frozen-lockfile'} @@ -100,20 +100,26 @@ Plug 'tpope/vim-repeat' Plug 'liuchengxu/eleline.vim' Plug 'tpope/vim-fugitive' " git 功能 Plug 'scrooloose/nerdcommenter' -Plug 'ctrlpvim/ctrlp.vim' +"Plug 'ctrlpvim/ctrlp.vim' Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '(GrepperOperator)'] } Plug 'morhetz/gruvbox' -Plug 'dag/vim-fish' -Plug 'Vimjas/vim-python-pep8-indent' +Plug 'dag/vim-fish', { 'for': 'fish' } +Plug 'Vimjas/vim-python-pep8-indent', { 'for': 'python' } Plug 'chrisbra/Colorizer' -Plug 'alvan/vim-closetag' +Plug 'alvan/vim-closetag', { 'for': ['vue', 'html', 'xml'] } Plug 'airblade/vim-gitgutter' +Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } +Plug 'junegunn/fzf' call plug#end() +" ==== vim-markdown configuration ==== +let g:vim_markdown_folding_disabled = 1 + " ==== vim-closetag configuration ==== let g:closetag_filetypes = 'html,xhtml,phtml,vue' + " ==== coc configuration ==== "let g:coc_disable_startup_warning = 1 "nmap gd (coc-definition) @@ -161,7 +167,10 @@ nnoremap gmh :diffget //2 nnoremap gml :diffget //3 " ==== ctrlp configuration ==== -let g:ctrlp_user_command = ['.git', 'git ls-files -co --exclude-standard'] +"let g:ctrlp_user_command = ['.git', 'git ls-files -co --exclude-standard'] + +" ==== fzf configuration ==== +nnoremap :FZF " ==== gruvbox configuration ====