Skip to content

Commit

Permalink
Merge branch 'main' of github.com:styx-meiseles/abbreinder.nvim
Browse files Browse the repository at this point in the history
chore: documentation bot
  • Loading branch information
Styx Meiseles committed Dec 17, 2021
2 parents 5e79027 + 595a351 commit 000afbe
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions doc/abbreinder.txt
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/tpope/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',
-- <config> can be empty to stay with defaults
-- or anything can be changed, with anything unspecified
-- retaining the default values
config = function() require'abbreinder'.setup(<config>) 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 <https://github.com/kdheepak/panvimdoc>

vim:tw=78:ts=8:noet:ft=help:norl:

0 comments on commit 000afbe

Please sign in to comment.