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! diff --git a/home/.config/nvim/common.vim b/home/.config/nvim/common.vim index 6c5dac9..c9c76a6 100644 --- a/home/.config/nvim/common.vim +++ b/home/.config/nvim/common.vim @@ -14,7 +14,7 @@ set autoindent " indent a new line the same amount as the line just set number " add line numbers set wildmode=longest,list " get bash-like tab completions set cc=100 " set an 100 column border for good coding style -set mouse=a " enable mouse click +set mouse=hr " enable mouse for help file editing and hitting prompts set cursorline " highlight current cursor line set ttyfast " Speed up scrolling in Vim set fdm=indent " folding method syntax diff --git a/home/.config/nvim/main.vim b/home/.config/nvim/main.vim index a9eef6a..2963471 100644 --- a/home/.config/nvim/main.vim +++ b/home/.config/nvim/main.vim @@ -122,6 +122,8 @@ runtime coc.vim " slime (sends stuff to other programs, like ipython) let g:slime_target = "neovim" +nmap a ggvG:SlimeSend +nmap cs :SlimeConfig "------------------------------------------------------ lua << EOF @@ -190,9 +192,4 @@ dimensions = { vim.keymap.set('n', '', 'lua require("FTerm").toggle()') vim.keymap.set('t', '', 'lua require("FTerm").toggle()') --- slime --- get id of a terminal, FloatTerm is usually 7, but I should rice this more -vim.g.slime_get_jobid = function() - return 7 -end EOF