From 4db6e3e9170bb3c5b14af145b7dbf6a751aff663 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 9 Mar 2013 14:20:31 +0100 Subject: [PATCH] add kak_timestamp env var to access current buffer timestamp --- src/main.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cc b/src/main.cc index 3dff00f2..04407598 100644 --- a/src/main.cc +++ b/src/main.cc @@ -737,6 +737,9 @@ void register_env_vars() shell_manager.register_env_var("bufname", [](const String& name, const Context& context) { return context.buffer().name(); }); + shell_manager.register_env_var("timestamp", + [](const String& name, const Context& context) + { return int_to_str(context.buffer().timestamp()); }); shell_manager.register_env_var("selection", [](const String& name, const Context& context) { return context.editor().selections_content().back(); });