3

I'm trying to find/create a plugin for vim's NERDTree that will allow a shortcut to inserting HTML image tags.

Perhaps something like the solution shown here: VIM browser plugin to execute commands on files

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

Would be nice if the script would allow a selection of (multiple) images, and auto-pasted the resulting HTML into the last used position of the last used window.

Anyone know of an existing plugin like this, or steer me in the right direction?

1 Answer 1

4

Actually I used to do:

 :e /directory/where/are/images

(this gives me a buffer with directory contents, then)

 V

(selects line(s))

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

(converts the file names to img tags...)

ggVGya

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

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.