I want to :retab
selection in my vimscript function.
When I write execute "normal! :'<,'>retab"
nothing happens.
If I write:
let cmd = "normal! :'<,'>retab"
echom cmd
The output is what I would expect:
normal! :<a:firstline>,<a:lastline>retab
If I do this however...
let cmd = "normal! :'<,'>retab"
echom cmd
execute cmd
The output is empty...
I eventually used the feedkeys
function, to simulate what I wanted to achieve. Just for the completion sake, it's call feedkeys(":'<,'>retab\<CR>", 'n')
.
I narrowed the problem down to the fact, that :
character is in the command, but it's quite weird... Is this prohibited in vimscript?