Skip to content

Vim/Neovim-plugin - New or edit image in dedicated application from inside a markdown document.

License

Notifications You must be signed in to change notification settings

mipmip/vim-nomisa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nomisa - Vim/Neovim Plugin

This plugin enables you to quickly edit a file in an external explication. If the file does not exist they can be created using templates.

Why I made this.

I make presentations in markdown (quarto with revealjs). Markdown is perfect for quick braindumps but sometimes I just want an empty canvas to tell my story visually. Placing my cursor on e.g. ![](images/about-nomisa.svg) and running :Nomisa will open inkscape with this file. If it does not exist is offers me a list with svg-templates.

The same can be configured for any other extension in combination with any other application.

Features

  • opens file under the cursor in external application
  • creates file from template if not existing yet
  • makes parent directories is they do not exist
  • extendable with new extensions

Limitations

  • currently only able to detect file paths inside ![]() markdown image tags.

Demo

nomisa-demo.mp4

Todo

  • make small video
  • currenty only one extension template is supported

Filetypes

Any markdown image filetype can be configured. By default svg,png, jpg and gif are preconfigured.

Show me a .

Usage

Installation

Install with a vim-plugin manager, with Plug:

Plug 'mipmip/vim-nomisa' ,  { 'branch': 'main' }

With Lazy:

{
    'mipmip/vim-nomisa',
}

Configuration

Default

Nomisa should work out of the box with the configuration below:

" path where you templates live

" - the templates directory has subdirectories per supported extension
" - default path is in plugin directory
" - path should have an trailing slash

let g:nomisa_templates_path = s:plugin_path . '/nomisa_templates/'

let g:nomisa_extension_handlers = {}

" every extension should have an application configured. You can use complete paths as well.
let g:nomisa_extension_handlers.svg = 'inkscape'
let g:nomisa_extension_handlers.png = 'gimp'
let g:nomisa_extension_handlers.jpg = 'gimp'
let g:nomisa_extension_handlers.gif = 'gimp'

Custom template path

Copy the template dir from the plugin to a directory e.g. in your home dir.

let g:nomisa_templates_path = $HOME . '/my_nomisa_templates/'

About

Vim/Neovim-plugin - New or edit image in dedicated application from inside a markdown document.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published