Is there an option to make vim expand an abbreviaiation at the end of a word? In other words let's say I map :iab bb bar, how can I get the expansion:

foobb<space> = foobar?

  • 2
    This answer might help: vi.stackexchange.com/a/6400/6960 With this code, if you type foofo<space>, it will be expanded into fooFOOBAR. All you would have to do, is put your abbreviations inside the dictionary s:anywhere_abbreviations. For example, to add your abbreviation iab bb bar, you would add in the dictionary 'bb': 'bar'. Apr 10 '16 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.