From 4ba0568caa09b61379117799deb2879496482b4b Mon Sep 17 00:00:00 2001 From: r0nsha Date: Fri, 27 Jun 2025 16:08:09 +0300 Subject: [PATCH] add vim doc --- doc/multinput.txt | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 doc/multinput.txt diff --git a/doc/multinput.txt b/doc/multinput.txt new file mode 100644 index 0000000..ac9df8d --- /dev/null +++ b/doc/multinput.txt @@ -0,0 +1,87 @@ +multinput.txt multinput.nvim + +An attempt at creating a `vim.ui.input` that wraps its context *multinput* +in an auto-resizing buffer. + +================================================================================ +Table of Contents *multinput-contents* + +1. Installation |multinput-installation| +2. Configuration |multinput-configuration| +3. Mappings |multinput-mappings| +4. Contributing |multinput-contributing| + +================================================================================ +Installation *multinput-installation* + +Install `multinput.nvim` using your favorite plugin manager. + +lazy.nvim: +>lua + { + 'r0nsha/multinput.nvim', + opts = { + -- Your custom configuration goes here + } + } +< + +packer.nvim: +>lua + use({ + 'r0nsha/multinput.nvim', + config = function() + require('multinput').setup({ + -- Your custom configuration goes here + }) + end + }) +< + +-------------------------------------------------------------------------------- +Configuration *multinput-configuration* + +Here are the default configuration options: +>lua + require('multinput').setup({ + opts = { + -- "always" | "multiline" | "never" + -- "always" will always show line numbers + -- "multiline" will only show line numbers if the buffer's height is > 1 + -- "never" will never show line numbers + numbers = "multiline", + }, + -- How much padding will be added to the end of the buffer + padding = 5, + -- Controls the width limits of the buffer + width = { min = 20, max = 60 }, + -- Controls the height limits of the buffer + height = { min = 1, max = 6 }, + win = { + title = "Input: ", + style = "minimal", + focusable = true, + relative = "cursor", + col = -1, + height = 1, + }, + }) +< + +-------------------------------------------------------------------------------- +Mappings *multinput-mappings* + +| Mode | Key | Description | +| ------- | ----------- | -------------------------------- | +| n, i, v | | Confirms the input | +| i | | Inserts a newline in normal mode | +| n | /q | Closes the buffer | + +-------------------------------------------------------------------------------- +Contributing *multinput-contributing* + +Contributions are always welcome! I'm no neovim expert, so if you find a bug +or have a feature request, you're welcome to open an issue or submit a pull +request. + +vim:tw=80:ts=8:noet:ft=help:norl: -- 2.51.2