<commit_before>func! local#zettel#edit(...)
    " build the file name
    let l:sep = ''
    if len(a:000) > 0
        let l:sep = '-'
    endif

    let l:fname = expand("~/Nextcloud/Documents/Zettelkasten/") . strftime("%Y%m%d%H%M) . l:sesp . join(a:000, '-') . '.md'

    exec "e " . l:fname

    if len(a:000) > 0
        exec "normal gg0\<c-r>=strftime('%F %H:%M')\<cr> " . join(a:000) . "\<cr>\<esc>G"
    else
        exec "normal gg0\<c-r>=strftime('%F %H:%M')\<cr>\<cr>\<esc>G"
    endif
endfunc<commit_msg>fix: zettel#edit actuellement fonctionnel et un peu plus sane<commit_after>func! local#zettel#edit(...)
    " Build the file name
    let s:sep = ''
    if len(a:000) > 0
        let s:sep = '-'
    endif

    let s:fname = expand("~/Nextcloud/Documents/Zettelkasten/") . strftime("%Y%m%d%H%M%S") . s:sep . join(a:000, '-') . '.md'

    exec "edit " . fnameescape(s:fname)

    " Fill header content
    let s:note = []
    let s:header_markup = "#"
    let s:human_date = strftime("%F %H:%M:%S")
    let s:title = ""

    if len(a:000) > 0
        let s:title = join(a:000)
    endif

    call add(s:note, s:header_markup . " " . s:human_date . " " . s:title)

    " Write note header content
    let s:failed = append(0, s:note)

    " Maybe some error management?!
endfunc
{'fraction_non_alphanumeric': 0.19442292796281951, 'fraction_numerical': 0.024012393493415957, 'mean_word_length': 2.569060773480663, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '824699', 'n_tokens_mistral': 563, 'n_tokens_neox': 514, 'n_words': 109}