New answers tagged functions
2
votes
Wrap :retab! or create a new command that calls it?
I would propose:
function! Fixws()
retab!
%s/\s\+$//
endfunction
command! Fixws :call Fixws()
The command is :Fixws because the custom command starts with an uppercase.
Top 50 recent answers are included
Related Tags
functions × 243vimscript × 98
key-bindings × 34
vimrc × 25
neovim × 16
variables × 10
search × 9
buffers × 9
autocmd × 9
regular-expression × 8
command-line × 8
visual-mode × 7
error × 6
command × 6
macro × 5
register × 5
quickfix × 5
range × 5
syntax-highlighting × 4
cut-copy-paste × 4
normal-mode × 4
vim-windows × 4
insert-mode × 4
external-command × 4
folding × 4