Here is my .vimrc
config file according to the book <<learning the vi and vim>>
p201-203
.
function SetTimeOfDayColors()
let currentHour = strftime("%H")
if currentHour < 6 + 0
let colorScheme = "darkblue"
elseif currentHour < 12 + 0
let colorScheme = "morning"
elseif currentHour < 18 + 0
let colorScheme = "shine"
else
let colorScheme = "evening"
endif
echo "setting color scheme to " . colorScheme
execute "colorscheme " . colorScheme
endfunction
set statusline += \ %{SetTimeOfDayColors()}
An error occur when to vim test.txt
.
line 15: E518: Unknown option: \ %{SetTimeOfDayColors()} Press ENTER or type command to continue
What is the matter with the codes here?
+=
– Amy