calendar-vim icon indicating copy to clipboard operation
calendar-vim copied to clipboard

Customize filenames/extensions

Open odcb opened this issue 7 years ago • 3 comments

Hi -- I love calendar-vim. Two requests:

  1. Would it be possible to specify the filename of the text files? At the moment, they are just the date number (e.g. 19.md) and rely on the directory structure for context. But when searching files outside the directory context, I get a lot of files all named the same thing (19.md, 19.md etc.). Could there be an option for ISO dates for filenames (YYYY-MM-DD)?

  2. Could we also select file extension? My files are markdown, but I prefer a .txt extension rather than .md, because preview handlers handle that better, especially on mobile.

Thanks.

odcb avatar Mar 19 '18 14:03 odcb

Apologies -- forget number 2 -- had a look at the code and see there's a hidden option there --

let g:calendar_diary_extension = ".txt"

But number 1 is still on the wishlist! Thanks.

odcb avatar Mar 20 '18 09:03 odcb

I know this ticket is older than 3 years, but I have tried to implement point 1 in this PR: https://github.com/mattn/calendar-vim/pull/40

juanlufont avatar Jul 13 '21 17:07 juanlufont

see https://github.com/hotoo/calendar-vim/pull/3

and set vimrc

let g:calendar_diary_path_pattern = "{YYYY}-{MM}-{DD}{EXT}"

hotoo avatar Sep 05 '21 14:09 hotoo