diff options
| author | Teddy Wing | 2019-09-28 15:27:39 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2019-09-30 21:58:30 +0200 | 
| commit | d7aa43dceece2884fc58b3b2421c12f0be52b444 (patch) | |
| tree | 561ce7f2c8e4341d298aa02f3f30d3cc096fc931 | |
| parent | 401cb76a4466b72896a528646e51c95435ce35ff (diff) | |
| download | dotvim-d7aa43dceece2884fc58b3b2421c12f0be52b444.tar.bz2 | |
projects/aodocs.vim: Add mappings to enable/disable ESLint debugger
Mappings for JavaScript files that add and remove the
`no-debugger: warn` rule to `.eslintrc`.
| -rw-r--r-- | projects/aodocs.vim | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/projects/aodocs.vim b/projects/aodocs.vim index 11e6721..c72272a 100644 --- a/projects/aodocs.vim +++ b/projects/aodocs.vim @@ -11,6 +11,9 @@ augroup AODocs  		\ setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2  			\ formatoptions+=cro +	autocmd BufRead,BufEnter $VIM_PROJECT_PATH_AODOCS/*.js +		\ call s:ESLintAddMappings() +  	autocmd BufRead,BufEnter $VIM_PROJECT_PATH_AODOCS/*.json  		\ setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4 @@ -53,3 +56,9 @@ function! s:UFOCacheSyncClientAddMappings()  	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 + + +function! s:ESLintAddMappings() +	nnoremap <buffer> <leader>eda :silent !eslint-yes-debugger.sh -a<CR> <Bar> :redraw!<CR> +	nnoremap <buffer> <leader>edd :silent !eslint-yes-debugger.sh -d<CR> <Bar> :redraw!<CR> +endfunction | 
