1

I have this custom function in my ~/.vimrc mapped to Visual mode using vnoremap.

After having executed the function using <leader><space>, how execute it again using something similar to the dot (.) operator, so that I don't have two press to keys?

function! Visual_indent_with_space() range abort
   '<,'>g/./exe "normal! " v:count1 . "I "
   :normal gv
endfunction

vnoremap <leader><space> :call Visual_indent_with_space()<cr>
1
  • It has to be explicitly supported by programming. See the repeat plugin that emulates the feature. – Luc Hermitte Jul 23 '20 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.