{"id":13478165,"url":"https://github.com/bytesnake/vim-graphical-preview","last_synced_at":"2025-07-25T22:39:58.499Z","repository":{"id":39751478,"uuid":"452717686","full_name":"bytesnake/vim-graphical-preview","owner":"bytesnake","description":"Small plugin for Vim to display graphics with SIXEL characters","archived":false,"fork":false,"pushed_at":"2022-11-28T19:18:13.000Z","size":2070,"stargazers_count":209,"open_issues_count":4,"forks_count":5,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-27T02:42:48.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytesnake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-27T14:36:25.000Z","updated_at":"2025-02-15T19:19:05.000Z","dependencies_parsed_at":"2023-01-22T09:45:51.013Z","dependency_job_id":null,"html_url":"https://github.com/bytesnake/vim-graphical-preview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytesnake%2Fvim-graphical-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytesnake%2Fvim-graphical-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytesnake%2Fvim-graphical-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytesnake%2Fvim-graphical-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytesnake","download_url":"https://codeload.github.com/bytesnake/vim-graphical-preview/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243742526,"owners_count":20340663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:53.332Z","updated_at":"2025-03-15T14:30:32.202Z","avatar_url":"https://github.com/bytesnake.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Display graphics in (N)Vim with SIXEL characters\n\nAdds the ability to display graphics to (N)Vim. This is developed for my digital notebook and is still in infancy. Expect weird behaviour and crashes.\n\nThe picture's content is streamed via the SIXEL character set (see [1](https://saitoha.github.io/libsixel/), [2](https://en.wikipedia.org/wiki/Sixel), [3](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) for more information) \n\n## Features\n\n - [x] Render LaTex equations within math fences\n - [x] Display pictures in standalone image links\n - [x] Support GnuPlot, arbitrary LaTex, fetch source from other files\n - [ ] Fix weird artifacts of SIXEL\n\n## Examples\n\n### Graphic and LaTex math support\n\nhttps://user-images.githubusercontent.com/989353/187507544-9cbebd36-5a53-43eb-898a-5f64200d8b68.mp4\n\n### Support folding\n\nhttps://user-images.githubusercontent.com/989353/187507582-f4daee70-ead3-4aba-a256-4d4c72223bbd.mp4\n\n### Stream SIXEL characters via any text medium\n\nhttps://user-images.githubusercontent.com/989353/187510494-0416f52a-6b69-4e36-a901-d58aa0747d63.mp4\n\n## Installation\n\nThe installation is a bit more involved. You have to make sure that your terminal is able to render SIXEL characters. The plugin is written in Rust for performance reasons, and interfaced to Vimscript with [libcallex-vim](https://github.com/mattn/libcallex-vim). For this you also need to install toolchains for Rust and C. Imagemagick is also required to convert between different graphic formats and SIXEL.\n\nFirst use a terminal supporting SIXEL characters\n\n * Tested: Alacritty ([PR #4763](https://github.com/alacritty/alacritty/pull/4763) or merged in this [fork](https://github.com/microo8/alacritty-sixel)) \n * Not tested: XTerm, [others](https://saitoha.github.io/libsixel/)\n\nYou have to install imagemagick to render graphics to SIXEL format:\n\n * Archlinux: `pacman -S imagemagick`\n * Ubuntu: package `libmagickwand` too old, see `https://github.com/SoftCreatR/imei`\n * Other: https://imagemagick.org/script/download.php\n\nBefore installing the vim plugin, make sure that toolchains for Rust and C are installed:\n\n * for C install `make` and `gcc`\n * for Rust install a stable toolchain, for example with [rustup](https://rustup.rs/)\n\nFinally add the following section to your vim configuration\n```\nPlug 'mattn/libcallex-vim', { 'do': 'make -C autoload' }\nPlug 'bytesnake/vim-graphical-preview', { 'do': 'cargo build --release' }\n```\n\nand install with `source %|PlugInstall`.\n\nThe plugin is currently not mapped to a file format, but can be manually enabled by setting the `filetype` variable to `graphical-preview` or add the follow preamble to your file:\n\n```vim\nvim: set filetype=markdown.graphics :\n```\n\n## FAQ\n\n \u003e The graphic is overlapping with the command and status line\n\nThis is a limitation of SIXEL as it always scrolls after a line and would do that as well for the last one. Otherwise we could overlap and delete with a raster sequence. There is special mode, disabling this behaviour, but then your image is fixed at the upper, left corner (see [here](https://gitlab.com/AutumnMeowMeow/jexer/-/issues/61)).\n\n \u003e TODO\n\n## Kudos to\n\n - [heapslip](https://github.com/heapslip) for inspiring me with [vimimage](https://www.youtube.com/watch?v=cnt9mPOjrLg)\n - the awesome people at alacritty, [Ayose Cazorla](https://github.com/alacritty/alacritty/pull/4763) and [microo8](https://github.com/microo8/alacritty-sixel)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytesnake%2Fvim-graphical-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytesnake%2Fvim-graphical-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytesnake%2Fvim-graphical-preview/lists"}