format hotkey coc

This commit is contained in:
Christoph J. Scherr 2023-07-10 14:48:48 +02:00
parent 46916dddf2
commit d0289830ea
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 6 additions and 2 deletions

View File

@ -78,9 +78,13 @@ autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming
nmap <leader>rn <Plug>(coc-rename)
" Formatting all code
vmap <leader>F <Plug>(coc-format-selected)
nmap <leader>F <Plug>(coc-format-selected)
" Formatting selected code
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
xmap <leader>f :call CocActionAsync('format')<CR>
nmap <leader>f :call CocActionAsync('format')<CR>
augroup mygroup
autocmd!