New answers tagged variables
1
vote
Accepted
How can I echo a variable and redirect it to a file, register or the clipboard?
I would do:
:redir @* | echo g:terminal_ansi_colors | redir END
It moves the output of echo g:terminal_ansi_colors to the * register.
Top 50 recent answers are included
Related Tags
variables × 113vimscript × 35
vimrc × 12
functions × 11
neovim × 7
environment-variables × 7
key-bindings × 6
autocmd × 5
command-line × 4
statusline × 4
string-manipulation × 4
regular-expression × 3
options × 3
path × 3
set × 3
execute × 3
buffers × 2
substitute × 2
colorscheme × 2
register × 2
ex-mode × 2
cursor × 2
shell × 2
syntax-highlighting × 1
search × 1