From 3fee00aba52726189f9b2c697201fb6a8e1fe15a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 10 Jul 2023 14:48:48 +0200 Subject: [PATCH] format hotkey coc --- home/.config/nvim/coc.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/home/.config/nvim/coc.vim b/home/.config/nvim/coc.vim index cda38f8..944144e 100644 --- a/home/.config/nvim/coc.vim +++ b/home/.config/nvim/coc.vim @@ -78,9 +78,13 @@ autocmd CursorHold * silent call CocActionAsync('highlight') " Symbol renaming nmap rn (coc-rename) +" Formatting all code +vmap F (coc-format-selected) +nmap F (coc-format-selected) + " Formatting selected code -xmap f (coc-format-selected) -nmap f (coc-format-selected) +xmap f :call CocActionAsync('format') +nmap f :call CocActionAsync('format') augroup mygroup autocmd!