-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:styx-meiseles/abbreinder.nvim
chore: documentation bot
- Loading branch information
Showing
1 changed file
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |