Hi Jacob!

On Do, 11 Jun 2015, Jacob Wegelin wrote:

> The timestamp.vim plugin works beautifully. It automatically updates a line 
> in the file that I edit, giving the second when I last re-saved the file.
> 
> But how does one change the format of the timestamp?
> 
> .vim/doc/timestamp.txt
> 
> says, about the format:
> 
> Default: '%a %d %b %Y %I:%M:%S %p %Z'
> 
> <snip>
> 
> To change this value, either set g:timestamp_rep in your {.vimrc} or set 
> b:timestamp_rep for the buffer in question.
> 
> Can anyone provide an example of the syntax whereby one explicitly sets 
> g:timestamp_rep in the .vimrc?
> 
> For instance, I tried inserting the following line into my .vimrc
> 
> set g:'%a'
> 
> and this threw an error when I opened a new file in vim.
> 
> Thanks for any insight

You need to set a variable. This is done using the :let command, so you 
have to use in your .vimrc:

:let g:timestampe_rep='%a %b'

The percent items can be looked up (unfortunately not in the help) at 
e.g. man strftime

Best,
Christian
-- 
Wie das Unbedingte sich selbst bedingen und so das Bedingte zu 
seinesgleichen machen kann.
                -- Goethe, Maximen und Reflektionen, Nr. 1321

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to