From 55d39bc509e30da771c16d5845b6b5462934c3bf Mon Sep 17 00:00:00 2001 From: Jorge Maldonado Ventura Date: Thu, 23 Mar 2017 00:27:01 +0100 Subject: [PATCH] Update markdown.snippets Use the name of the current file without its extension as the title. It replaces '-' with ' ' and capitalizes the first letter. --- vim/vim/my_UltiSnips/markdown.snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vim/my_UltiSnips/markdown.snippets b/vim/vim/my_UltiSnips/markdown.snippets index 3001484..28be111 100644 --- a/vim/vim/my_UltiSnips/markdown.snippets +++ b/vim/vim/my_UltiSnips/markdown.snippets @@ -1,5 +1,5 @@ snippet pel "Pelican metadata" bs -Title: ${1:title} +Title: ${1:`!p snip.rv = snip.basename.replace('-', ' ').capitalize()`} Tags: $2 Category: $3 Date: `date '+%Y-%m-%d %H:%M'`