I have a plugin change colorscheme depending on working directory: https://github.com/UncleBill/prism.vim
Hope it could give you some inspiration Al <[email protected]>于2020年9月18日 周五下午2:03写道: > Hi Maxim, > > > > >I have a rather simple task. I would like Vim to change the colour scheme > depending on the time of the day. Please find my solution below. I place it > into my ~/.vimrc file. I’m wondering, maybe there is a more elegant way to > do it? Maybe there is a built-in Vim function to enquire the hour of the > day? > > > > > >let hr = substitute(system('date +%H'), "\n", "", "") > > > > I believe strftime("%H") will do what you want. According to the help, > this isn't particularly portable, so ymmv. > > > > Al > > > > -- > > -- > > You received this message from the "vim_use" maillist. > > Do not top-post! Type your reply below the text you are replying to. > > For more information, visit http://www.vim.org/maillist.php > > > > --- > > You received this message because you are subscribed to the Google Groups > "vim_use" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/vim_use/20200917220753.GA13368%40sleipnir > . > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAPHDgoNQGa4ogg1o%3DMTOGPUx34R0fTcPwxWoVm2DowGYH7YMfg%40mail.gmail.com.
