From 595a351a4dd4a3c6d8dd67e8d721d05dee3b284d Mon Sep 17 00:00:00 2001 From: 0styx0 <0styx0@users.noreply.github.com> Date: Thu, 16 Dec 2021 20:46:39 +0000 Subject: [PATCH] Auto generate docs --- doc/abbreinder.txt | 118 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/doc/abbreinder.txt b/doc/abbreinder.txt index e69de29..15bb649 100644 --- a/doc/abbreinder.txt +++ b/doc/abbreinder.txt @@ -0,0 +1,118 @@ +*abbreinder.txt* Abbreviation reminder + +============================================================================== +Table of Contents *abbreinder-table-of-contents* + + +TABLE OF CONTENTS ~ + + +- |abbreinder-usecase| +- |abbreinder-installation| +- |abbreinder-commands| +- |abbreinder-exports| + + +------------------------------------------------------------------------------ + +USECASE ~ + +I often come up with abbreviations that _should_ make typing faster, but I also +forget they exist. This dilemma especially comes up when I create abbreviations +using Tim Pope’s vim-abolish - I +create hundreds of abbreviations, but can’t take full advantage of them. To +solve this, Abbreinder works by notifying you when you’ve typed the expanded +form of an abbreviation instead of using the abbreviation functionality. + + *abbreinder-Usage* + + +- Define abbreviations (eg, `iabbrev nvim Neovim`, `iabbrev rsvp Répondez, s'il vous plait`, `Abolish alg{,s,y} algorithm{,s,ically}`) +- Start typing +- If you type an abbreviation’s value (eg, `Neovim`) instead of using the trigger, you will get a message reminding you of the abbreviation + + +------------------------------------------------------------------------------ + +INSTALLATION ~ + + *abbreinder-Packer:* + +> + use { + '0styx0/abbreinder.nvim', + -- can be empty to stay with defaults + -- or anything can be changed, with anything unspecified + -- retaining the default values + config = function() require'abbreinder'.setup() end + } +< + + +------------------------------------------------------------------------------ + +CONFIG + +> + config_defaults = { + output = { + as = { + echo = false, + tooltip = true, + }, + msg = { + format = function(key, val) -- format to print reminder in + return 'abbrev: "'..key..'"->'..'"'..val..'"' + end, + highlight = 'Special', -- highlight to use + -- if want highlight to stop after x ms. -1 for permanent highlight + highlight_time = 4000 + }, + tooltip = { -- only takes effect if output_as.tooltip = true + time_open = 4000, -- time before tooltip closes + opts = {}, -- see :help nvim_open_win + highlight = 'Special' + }, + }, + -- vim-abolish prefixes each abbreviation value. + -- adding prefixes here accounts for them + value_prefixes = {'*@'} + } +< + + +While the config here will most likely be kept up to date, feel free to check +out ./lua/abbreinder/config.lua <./lua/abbreinder/config.lua> for the actual +version. + +------------------------------------------------------------------------------ + +COMMANDS ~ + + +- `:AbbreinderEnable` +- `:AbbreinderDisable` + + +------------------------------------------------------------------------------ + +EXPORTS ~ + + +- Two autocmds are exported: + - `AbbreinderAbbrExpanded`, called when an abbreviations is expanded (ie, used correctly) + - `AbbreinderAbbrNotExpanded`, called when an abbreviation is _not_ expanded (ie, abbreviation functionality was not used) + + +------------------------------------------------------------------------------ + +TODO ~ + + +- Add `:help` +- Add screenshots + + +Generated by panvimdoc + +vim:tw=78:ts=8:noet:ft=help:norl: