Fix readme and add demo

This commit is contained in:
2025-01-24 01:38:46 +03:00
parent bb3fdb1ede
commit 6563120cf5
3 changed files with 16 additions and 3 deletions

View File

@@ -1,7 +1,19 @@
# PicVim
# 🖼️ PicVim
PicVim is a Neovim plugin that allows you to view and interact with images directly in Neovim. It supports various image formats such as PNG, JPG, GIF, BMP, and more, offering basic functionality like zooming, rotating, and panning.
- It is meant as a quick way to view and interact with images in Neovim.
- It is not intended as a replacement to image.nvim (Can't render images in README.md).
- It provides a powerful way to interact with viewing images allowing for zooming, panning etc.
## Demo
https://github.com/Toprun123/picvim/blob/main/demo.mp4
## Usage
To use PicVim, simply open an image file in Neovim and the image will be displayed in the buffer. You can interact with the image using the provided keybindings.
## Features
- View images in Neovim.
@@ -9,6 +21,7 @@ PicVim is a Neovim plugin that allows you to view and interact with images direc
- Rotate the image with configurable keybindings.
- Pan the image using arrow keys or specific keybindings.
- Automatically scale and adjust images for optimal viewing.
- For now it only supports Kitty Graphics Protocol, but will soon support ueberzugpp too.
## Installation
@@ -20,7 +33,7 @@ If you use [lazy.nvim](https://github.com/folke/lazy.nvim), you can install PicV
```lua
{
'your-username/picvim',
'Toprun123/picvim',
}
```

BIN
demo.mp4 Normal file

Binary file not shown.

View File

@@ -160,7 +160,7 @@ function M.setup()
-- table.insert(lines, border_top_bottom)
-- vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines)
-- vim.api.nvim_win_set_cursor(win, { 1, 0 })
vim.api.nvim_buf_set_lines(buf, 0, -1, false, {})
vim.api.nvim_buf_set_lines(buf, 0, -1, false, { " Welcome to PicVim! Displaying image: " .. vim.fn.expand "%:p" })
vim.cmd "setlocal nomodifiable"
vim.cmd "setlocal nowrap"
vim.cmd "setlocal nolist"