Why does the following:
let s:colorschemes = ['synic', 'ir_black']
let s:colorscheme_idx = 0
function! RotateColorscheme()
let s:colorscheme_idx += 1
let s:name = s:colorschemes[s:colorscheme_idx]
echo s:name
colorscheme s:name
endfunction
not execute the colorscheme
? Vim complains with the following error 'cannot find colorschem s:name'. How do I tell it that I want it to derefence that variable and not apply it literally to :colorscheme?
If you press "F", Vim will move the cursor backwards instead of forward. Given the previous sentence, if pressed "Fq", and the cursor was at the end of the line, it would move to the "q" in "quick".
Try out echo by running the following command: :echo "Hello, world!" You should see Hello, world! appear at the bottom of the window.
b: local to the current buffer. l: local to a function. g: global. :help internal-variables. Follow this answer to receive notifications.
Have a look at this script from vim.wikia.com which does pretty much what you are asking for.
Key-line seems to be this one:
let nowcolors = 'elflord morning desert evening pablo'
execute 'colorscheme '.split(nowcolors)[i]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With