Vim Tips Wiki
Advertisement

Write the first paragraph of your article here.

Section heading

Sweyla has a color theme generator. Here's a simple function and some mappings to pull down a theme from Swelya.

"" Plugins and Scripts
function! s:UpdateSweyla(...)
	if a:0 > 0
		let l:timestamp = a:1
	else
		let l:timestamp = system("date +%s")
	endif
	let l:timestamp = substitute(l:timestamp, "\n$", "", "g")
	let l:return = system("wget -q -O $HOME/.vim/colors/sweyla.vim http://themes.sweyla.com/vim/sweyla" . l:timestamp . ".vim")

	colo sweyla
endfunction
command! -nargs=? Sweyla call s:UpdateSweyla(<args>)
nmap <Leader>w :Sweyla<CR>

References

Comments

Advertisement