diff options
author | Teddy Wing | 2019-07-03 20:56:48 +0200 |
---|---|---|
committer | Teddy Wing | 2019-07-03 20:57:58 +0200 |
commit | bb506f14758be6bc1d79d8b67d25d1e98d580b08 (patch) | |
tree | 65c9b79d75ccc1b788c624617b4ec2bcd0abeb1f | |
parent | 0d44b0c6a567c34a1fc1951d43b8b5c2d673d6a7 (diff) | |
download | dotvim-bb506f14758be6bc1d79d8b67d25d1e98d580b08.tar.bz2 |
projects/aodocs.vim: Add mappings to run `ufo-cache-syncclient` program
Mappings to modify the client build cache without leaving Vim. Use
`:silent` combined with `<C-l>` to avoid the hit-enter prompt.
-rw-r--r-- | projects/aodocs.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/projects/aodocs.vim b/projects/aodocs.vim index 4ebe736..9721b6b 100644 --- a/projects/aodocs.vim +++ b/projects/aodocs.vim @@ -4,6 +4,9 @@ augroup AODocs autocmd BufRead $VIM_PROJECT_PATH_AODOCS_GO/ufo-client/client/*.go \ silent GoGuruScope github.com/Revevol-Apps/ufo-client/client + autocmd BufRead,BufEnter $VIM_PROJECT_PATH_AODOCS_GO/* + \ call s:UFOCacheSyncClientAddMappings() + autocmd BufRead,BufEnter $VIM_PROJECT_PATH_AODOCS/*.js \ setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2 @@ -39,3 +42,10 @@ function! s:CommitWackoTextWidthMappings() nnoremap <silent> <buffer> o :call <SID>CommitWackoTextWidth()<CR>o nnoremap <silent> <buffer> O :call <SID>CommitWackoTextWidth()<CR>O endfunction + + +function! s:UFOCacheSyncClientAddMappings() + nnoremap <buffer> <leader>uc :silent !ufo-cache-syncclient<CR><C-l> + nnoremap <buffer> <leader>ud :silent !ufo-cache-syncclient rm<CR><C-l> + nnoremap <buffer> <leader>ur :silent !ufo-cache-syncclient rebuild<CR><C-l> +endfunction |