VIM plugin for inserting image tags via NERDTree

I am trying to find / create a plugin for vim NERDTree that will allow you to use a shortcut to insert HTML image tags.

Perhaps something like the solution given here: VIM browser plugin for executing commands in files

Only I can't get this to work - it looks like it uses a perl script to call ImageMagick to determine the size of the image, and then generates an HTML tag. This script is not shown in the solution :(

It would be nice if the script allowed you to select (multiple) images and automatically paste the resulting HTML into the last used position of the last used window.

Does anyone know of an existing plugin like this, or drive me in the right direction?

+3
source share
1 answer

I actually used:

 :e /directory/where/are/images

(this gives me bufferwith the contents of the directory, then)

 V

(selects the line (s))

 :%s:.\+:<img src="&" />:

(converts file names to tags img...)

ggVGya

(all lines are selected, copied to the register a, which can be pasted anywhere ...)

NTN

+4
source

Source: https://habr.com/ru/post/1777463/


All Articles