On Mo, 08 Dez 2014, Gary Johnson wrote:

> You want this trigger to apply only to the passwd file, so your
> autocommand could look something like this:
> 
>     autocmd BufWritePost passwd call system("echo '" . $USER . " wrote passwd 
> on " . strftime("%Y-%m-%d at %H:%M:%S") . "' > /path/to/passwd.log")
> 

Note, that when using the vipw command (that is specifically provided 
for editing the passwd file to prevent file corruption), this 
autocommand might not trigger since the filename might differ (and in 
fact, it might even be a tiny vi or nvi that gets triggered to edit the 
temporary file, which do not have autocommand support)

Best,
Christian
-- 
Nicht weil es schwierig ist, wagen wir es nicht, sondern weil wir es
nicht wagen, ist es schwierig.
                -- Lucius Annaeus Seneca (4-65 n.Chr.)

-- 
-- 
You received this message from the "vim_dev" 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_dev" 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.

Raspunde prin e-mail lui