commit f42678524a1c800230e80cff3e151e2b202ca71b
parent 836fc224824365367bcafca949982c21bae57679
Author: bharatvaj.ph <bharatvaj@yahoo.com>
Date: Tue, 31 Aug 2021 04:20:11 +0530
Fix unused GFAll command
Move plugin download into function
Diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.config/vim/plugin/plugin.vim b/.config/vim/plugin/plugin.vim
@@ -1,9 +1,11 @@
" Plugin Management
-let data_dir = has('nvim') ? stdpath('data') . '/site' : "${XDG_DATA_HOME}/vim"
-if empty(glob(data_dir . '/autoload/plug.vim'))
- silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
- autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
-endif
+function DownloadPlug()
+ let data_dir = has('nvim') ? stdpath('data') . '/site' : "${XDG_DATA_HOME}/vim"
+ if empty(glob(data_dir . '/autoload/plug.vim'))
+ silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
+ PlugInstall --sync | source $MYVIMRC
+ endif
+endfunction
call plug#begin($XDG_DATA_HOME."/vim/plugged")
Plug 'tpope/vim-commentary'
@@ -18,7 +20,7 @@ call plug#end()
" Plugin Keybindings
" fzf
-nmap <leader>F :GFAll<cr>
+nmap <leader>F :GFiles<cr>
nmap <leader>f :Files<cr>
nnoremap <leader>cc :ChecklistToggleCheckbox<cr>
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
@@ -61,8 +61,6 @@ for key in ['<Up>', '<Down>', '<Left>', '<Right>']
exec 'cnoremap' key '<Nop>'
endfor
-
-
" Plugins
source $XDG_CONFIG_HOME/vim/plugin/plugin.vim