sponsor Vim development Vim logo Vim Book Ad

md_insert_equation.vim : Easily generate link to image of equation in markdown file

 script karma  Rating 0/0, Downloaded by 563  Comments, bugs, improvements  Vim wiki

created by
Chong HE
 
script type
ftplugin
 
description
Notice: This plugin currently only offer the most simplistic interface for simple equation inputting. To make it a full-fledged LaTeX equation editor with all highlighting and auto-completion feature is surely doable(by using split with tex filetype) but it could take some effort and I don't know if there will be people needing it. So if you happen to take interests in this plugin and have the need for such feature, or any other feature you feel nice to have, shout out in the issue section of my github repository and I'll surely work on it as soon as I'm available.

Code is hosted at: https://github.com/ron89/md_insert_equation.vim

## Motivation

Inputing math equation into markdown file can be troublesome sometimes as there
is no standard method of it. So far the most fail-proof method to make
generally recognized(by github, etc.) equation is to use a third party API to
translate $LaTeX$ code into equation image, then generate a link to that image.
However, typing the link according to the api in markdown hyperlink format is
cumbersome. To facilitate the process in Vim editor, I made this plugin.

## How to use

All you need to do is to:
  * invoke the keybinding `<LocalLeader>ee`;
  * type in your equation in LaTeX format.
And the equation will be automatically translated into latex.codecogs.com
recognized image generating API and inserted under your cursor. Invoking the
same keybinding under existing equation will enable you to edit it in LaTeX
format.

screenshot: https://imgur.com/kVwtBD6
 
install details
* Note: I do not recommend installing this plugin by directly downloading the
  tar ball and copying the content to your ~/.vim/ftplugin folder, especially
  if you already have installed other markdown related plugins(which is very
  likely to be true). If you still would like to do so, please append the
  content of this plugin's ftplugin/markdown.vim to your
    ~/.vim/ftplugin/markdown.vim
  if that file already exists.

## I strongly recommend using one of the package managers for installing/managing:
  * Pathogen
        git clone https://github.com/ron89/md_insert_equation.vim ~/.vim/bundle/md_insert_equation.vim
  * Vundle
        Add to .vimrc:
            Bundle 'ron89/md_insert_equation.vim'
        Run
            :BundleInstall
  * NeoBundle
        Add to .vimrc:
            NeoBundle 'ron89/md_insert_equation.vim'
        Run
            :NeoBundleInstall
  * vim-plug
        Add to .vimrc:
            Plug 'ron89/md_insert_equation.vim'
        Run
            :PlugInstall
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
md_insert_equation.vim-0.1.0.tar.gz v0.1.0 2016-03-26 7.4 Chong HE Initial upload
ip used for rating: 44.223.37.137

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github