Does :global convert tabs to spaces prior to sending to the screen?

24 views
Skip to first unread message

Rod Holcomb

unread,
May 26, 2016, 1:21:57 PM5/26/16
to vim_use
I have the following function in my .vimrc


command! -nargs=+ -complete=command TabMessage call TabMessage(<q-args>)
function! TabMessage(cmd)
redir => message
silent execute a:cmd
redir END
tabnew
silent put=message
set nomodified
endfunction



basically it redirect message to a new tab.
however when I run
:TabMessage g//

tabs my buffer get stripped on there way to the new tab.

Thoughts?

Thanks.

Christian Brabandt

unread,
May 26, 2016, 1:28:21 PM5/26/16
to vim_use
Hi Rod!
I think this happens by the redir function, which basically gets the
output from the screen and does not know, that the underlying message
has been using tabs.


Best,
Christian
--
Wer wünscht, daß man ihn fürchte, erreicht nur, daß man ihn haßt.
-- Charles-Louis de Montesquieu

Rod Holcomb

unread,
May 27, 2016, 12:31:48 AM5/27/16
to vim_use
>
> I think this happens by the redir function, which basically gets the
> output from the screen and does not know, that the underlying message
> has been using tabs.
>
In an earlier post I had not done enough testing the new split window from
:OutputSplitWindow does not properly retain tabs. Now I really need to learn vimscript.

--Rod.
Reply all
Reply to author
Forward
0 new messages