On 13/03/09 11:42, StarWing wrote:
>
> how to get the infomation of editing file? i know a way that use
> netrw:
> :Explore %:p:h
> i
> but i only want to get the last modified time of current file, i want
> a simple way to get it.
>
> another idea is shell-exec (!), e.g. :!ls -l %
>
> but it still discommodiousness.
>
> has a built-in way to do it?

        :echo strftime('%c',getftime(expand('%')))

see
        :help expand()
        :help getftime()
        :help strftime()
and if necessary
        :help :echo

though I suppose you understand what that last one is about.

The above is "pure Vim", and therefore works on all platforms where 
strftime() is defined ('%c' being the "default format" whose dedtails 
may depend on the C compiler used to compile the Vim executable). OTOH,

        :!ls -l %

(On Unix/Linux) or

        :!dir %

(or similar, on Windows) have the advantage of needing fewer keypresses.


Best regards,
Tony.
-- 
You are here:
                ***
                ***
             *********
              *******
               *****
                ***
                 *

                 But you're not all there.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to