-
Notifications
You must be signed in to change notification settings - Fork 50
image2ascii for markdown images #43
base: master
Are you sure you want to change the base?
Conversation
Hey @Maddin-619, thanks for the PR! Please add documentation for this feature in the README, the vim docs, and also add a md example. |
28a0970
to
3b4e176
Compare
After finding the right image2ascii (theres also a python command with the same name but different parameters) I found that the width/height issue can also be solved by using the |
You are right. This is much more comfortable. Should we drop the with and height in favor of the ratio or should we accept both? |
I guess having both would be nice but it would also mean more parsing - no idea whats the best way here, maybe in the form of actual URL GET parameters? Like |
I actually had the same issue when I was testing the MR, but I forgot to post it here. We should also mention what the "right image2ascii version" is and how to install it. |
Its actually in the PR notes and the vim manual of this PR, I just didn't rtfm 😅 I knew of "the other" image2ascii and so just assumed thats the one.. Maybe in a second step the command and parameters could even be made variables so one can use the ascii-fier of choice. |
@Maddin-619 thanks for the additions. Do you think this is ready to be merged? |
I did not implement an exchangable image2ascii program as suggested. Stick with the golang tool for now and this works just fine with optional ratio or with and height params in http query style. So in my opinion this could be merged now, doing the exchangable thing maybe in abother PR. |
I recently used this plugin for a presentation in my company and it was so cool. I thought it was nice using some images too, so I made a little patch: If the markdown file includes an image link, the image gets converted with the command line tool image2ascii and centered in the presentation buffer. If the url dosn't exist the alt text gets printed.
In the terminal image2ascii can get the image width and height, but from vim script that didn't worked. So it is necessary to pass the width and height manually. I found a markdown extension where the image size could be passed after the url with an
=
sign prefix, so I used these format:Here is an example. The cover page of my presentation :)
P.S. Since it is October can u please lable this PR that it gets accepted: https://hacktoberfest.digitalocean.com/resources/participation
Thank you!