Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

image2ascii for markdown images #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update README, vim docs and add an example
Maddin-619 committed Oct 10, 2021
commit 3b4e176861bf2b7e57d456f545db32855b80d861
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -24,6 +24,10 @@ Markdown files are rendered a bit more fancifully. Be sure to read the help file

![presenting.vim Markdown demo](examples/FancyMarkdown.gif)

Markdown image links where handled by converting them into ascii.

![image2ascii markdown example](examples/image2ascii_demo.png)

## Installation

Use [pathogen][3] or [vundle][4] to install presenting.vim.
16 changes: 16 additions & 0 deletions doc/presenting.txt
Original file line number Diff line number Diff line change
@@ -153,7 +153,23 @@ These fonts can be changed with the the following variables: >
More information about figlets can be found at https://figlet.org and the
interactive website http://patorjk.com/software/taag can be used to test out
the different fonts.
------------------------------------------------------------------------------
*presenting_image2ascii*

Note: Currently, this applies only to Markdown files.

Markdown image embeddings can also been rendered into ascii by a tool called
image2ascii. This is on by default, and can be turned off by setting >
:let g:presenting_image2ascii = 0
>

You can append `=WIDTHxHEIGHT` after the URL of the graphic file to resize the
image. Do not forget the space before the `=`: >
![alt text](./image.png =55x35)
>

More information about image2ascii can be found at
https://github.com/qeesung/image2ascii
==============================================================================
ISSUES *presenting-issues*

Binary file added examples/1200px-Vimlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions examples/PresentingDemo.markdown
Original file line number Diff line number Diff line change
@@ -120,6 +120,20 @@ function Factorial(n)
endfunction
```

# Images

If [image2ascii](https://github.com/qeesung/image2ascii) is installed and enabled markdown image links are converted to ascii and displayed in the presentation buffer.
You can append `=WIDTHxHEIGHT` after the URL of the graphic file to resize the image. Do not forget the space before the `=`

```bash
![vim logo](./1200px-Vimlogo.png =55x35)
```

Results into:

![vim logo](./1200px-Vimlogo.png =55x35)


# The End


Binary file added examples/image2ascii_demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.