[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] new vile user
From: |
Thomas Dickey |
Subject: |
Re: [vile] new vile user |
Date: |
Wed, 31 Dec 2014 20:44:51 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Dec 31, 2014 at 12:17:26PM +0000, address@hidden wrote:
> hi, i'm a new user of vile.
> i'm trying to find a way to
> 1) show the file modification time in the modeline, if is possible
> (something like (strftime('%Y/%m/%d %a %T')) in vim); i have tried
> to define a user-variable, like
> setv %myvariable="strftime('%Y/%m/%d %a %T')" i've tried different
> modality without result
vile would do it like this:
setv %myvariable &date '%Y/%m/%d %a %T' &ftime $cfilname
but
> 2) show the fileformat and the fileencoding of the file; i have
> tried the $encoding but the result is 8-bit (my locale is set to
> UTF-8)
One of these may help:
setv %myencoding $file-encoding
setv %xxencoding &local file-encoding
However, in both cases the description of modeline mentioning a "variable"
|---------+--------------------------------------------------------------|
| %{name} | any internal mode/variable value, given its name |
+------------------------------------------------------------------------+
may only work for variables beginning with "$" (if so, I could probably
make that work with little effort). vile doesn't do function-evaluation
in modeline-format though (I suspect that would be more work).
> 3) tell vile to return to the last position when opening files
it doesn't save that information when it exits - though it may be possible
to write a very complicated macro :-(
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature