Skip to content

Making wiki.vim support multi-filetype links #296

@saccarosium

Description

@saccarosium

continues: #295

Objective

Be able to simply work with multiple filetype and let wiki.vim change dynamically behaviour based on the user selected extensions.

Solution

Having a global dictionary where define all the info we need for every supported filetype depending on the current filetype and selected filetypes of the user.

let g:wiki_filetypes = {
      \ 'markdown': {
      \   'link_type': 'wiki'|'md',
      \   'extension': 'md | markdown',
      \   'heading': 'atx | headex',
      \ },
      \ 'asciidoc': {
      \   'link_type': 'wathever'
      \   'extention': 'adoc | asciidoc'
      \ },
      \ 'org': {
      \   'extension': 'org'
      \ },
      \}

Dictionary where user can decide what filetype wiki.vim will consider as part of the wiki. The user needs to call the names of the filetypes, as defined in vim, because a filetype can have multiple extentions and we want this to work for every extention.

let g:wiki_active_filetypes = ['markdown', 'asciidoc', 'text']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions