Home

Awesome

Table of Contents


Usecase

I often come up with abbreviations that should make typing faster, but then I 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.

Usage

Plugin in use


Installation

<details> <summary>Packer</summary>
use {
    '0styx0/abbreinder.nvim',
    requires = {
        {
            '0styx0/abbremand.nvim',
            module = 'abbremand' -- if want to lazy load
        }
    },
    config = function()
        -- config can be empty to stay with defaults
        -- or anything can be changed, with anything unspecified
        -- retaining the default values
        require'abbreinder'.setup()
    end,
    event = 'BufRead', -- if want lazy load
}
</details> <details> <summary>Vim-Plug</summary>
call plug#begin()
    Plug '0styx0/abbremand.nvim'
    Plug '0styx0/abbreinder.nvim'
call plug#end()

augroup setup_abbreinder
    autocmd!
    autocmd BufRead * :lua require'abbreinder'.setup()
augroup END
</details>
Config
local config_defaults = {
    value_highlight = {
        enabled = true,
        group = 'Special', -- highlight to use
        time = 4000 -- -1 for permanent
    },
    tooltip = {
        enabled = true,
        time = 4000, -- time before tooltip closes
        opts = {}, -- see :help nvim_open_win
        highlight = {
            enabled = true,
            group = 'Special', -- highlight to use
        },
        format = function(trigger, value) -- format to print reminder in
            return 'abbrev: "' .. trigger .. '"->' .. '"' .. value .. '"'
        end,
    },
}

While the config here will most likely be kept up to date, feel free to check out ./lua/config.lua for the actual version.


Features


Commands

Vim

Lua