sponsor Vim development Vim logo Vim Book Ad

vim-auto-abbrev : Automate abbreviates for you

 script karma  Rating 0/0, Downloaded by 126  Comments, bugs, improvements  Vim wiki

created by
Omri Sarig
script type
For the full documentation and most updated versions see "https://github.com/omrisarig13/vim-auto-abbrev";\


Automate Abbreviates for you


Abbreviations are a great vim feature to automatically fix common typos.
However, it is very annoying to add them all one by one, and it cuts off
the workflow in the middle every time you are adding a new abbreviate to the

This plugin is here to solve this problem. The plugin enables you to add
abbreviate as you work, without starting to change the files and buffers you
are in. This plugin have API that would let you add the abbreviations as you
encounter them, without more work than the work that you would have invested
just to fix typo in the word.


This plugin have some commands and mapping that can be used to use the features
of the plugin.


* AutoAbbrevAddCurrentWord - Add the word under the cursor as abbreviate lhs,
    ask the user to insert the rhs value of the abbreviate.
* AutoAbbrevAddCurrentLhsWord - Save the current word as lhs abbreviate value,
    to later on add the rhs value of it.
* AutoAbbrevAddCurrentRhsWord - Add the current word as rhs abbreviate value,
    adding it as the abbreviate of the last saved lhs value.
* AutoAbbrevAddAbbrev - Add a new abbreviate. It get both the lhs value and the
    rhs value of the abbreviate.
* AutoAbbrevReload - Reload the abbreviate file, in case it was modified from
    other vim instance.
* AutoAbbrevDelAbbrev - Delete an abbreviate from the abbreviate file.

* '<leader>aa' - call AutoAbbrevAddCurrentWord
* '<leader>al' - call AutoAbbrevAddCurrentLhsWord
* '<leader>ar' - call AutoAbbrevAddCurrentRhsWord
* '<leader>ae' - call AutoAbbrevReload

Farther Reading:
For father reading and explanation about all the plugin usage and possible
configuration read the help of the plugin (install it and then run
`help auto-abbrev.txt`
install details
You can use your favorite plugin manager to install this plugin, as any other

Couple of examples:
Vundle - https://github.com/VundleVim/Vundle.vim
Add this line to one of the files loaded when opening vim:
``` vimscript
Plugin 'omrisarig13/vim-auto-abbrev'

pathogen.vim - https://github.com/tpope/vim-pathogen
``` bash
git clone https://github.com/omrisarig13/vim-auto-abbrev.git ~/.vim/bundle/vim-auto-abbrev
Than reload Vim and run `:helptags ~/.vim/bundle/vim-auto-abbrev/doc/` in it.


rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-auto-abbrev.tar 1.0 2019-07-20 7.0 Omri Sarig Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo