From e9708be1f9aedf684ec38da3560aee4fd864e429 Mon Sep 17 00:00:00 2001 From: Hai Ninh Hoang Date: Wed, 3 Mar 2021 16:41:35 +0700 Subject: [PATCH] updates --- general/functions.vim | 17 +++++++++++------ keys/which-key.vim | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/general/functions.vim b/general/functions.vim index 60f0bf6..3324e33 100644 --- a/general/functions.vim +++ b/general/functions.vim @@ -17,14 +17,19 @@ nnoremap :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> " endfunction " Change color scheme to light (Papercolor) -function! Light() - :colorscheme PaperColor - :set background=light -endfunction +" function! Light() +" :colorscheme PaperColor +" :set background=light +" endfunction -function! Sync() - " :!echo "Hello world" +function! SyncNeovimConfig() :!cd ~/.config/nvim && git add . && git commit -m "updates" && git push + :echomsg "Status: Sync Neovim Successful" +endfunction + +function! SyncDotfilesConfig() + :!cd ~ && dotfiles add -u && dotfiles commit -m "updates" && dotfiles push + :echomsg "Status: Sync Dotfiles Successful" endfunction " WSL yank support diff --git a/keys/which-key.vim b/keys/which-key.vim index 8ae9e66..0e647ae 100644 --- a/keys/which-key.vim +++ b/keys/which-key.vim @@ -44,7 +44,8 @@ let g:which_key_map['T'] = [ ':TSHighlightCapturesUnderCursor' , 'treesitter let g:which_key_map['u'] = [ ':UndotreeToggle' , 'undo tree'] let g:which_key_map['v'] = [ 'v' , 'split right'] let g:which_key_map['W'] = [ ':call WindowSwap#EasyWindowSwap()' , 'move window' ] -let g:which_key_map['y'] = [ ':call Sync()' , 'Sync...' ] +let g:which_key_map['y'] = [ ':call SyncNeovimConfig()' , 'Sync...' ] +let g:which_key_map['Y'] = [ ':call SyncDotfilesConfig()' , 'Sync...' ] let g:which_key_map['z'] = [ 'Goyo' , 'zen' ] " Group mappings