Tip #481: abbreviations only on shortcut
tip karma |
Rating 14/11, Viewed by 988
|
created: |
|
June 3, 2003 15:44 |
|
complexity: |
|
basic |
author: |
|
maurice |
|
as of Vim: |
|
6.0 |
Actually, this is just a more flexible completion.
I made the following (example) to have a unique abbreviation:
iabbrev date^A <c-r>=strftime("%F")<cr>
Note that ^A is Control-A (insert with <c-v><c-a>).
This is to avoid the completion if you really want to write 'date'.
And now this mapping:
inoremap <c-b> <c-v><c-a><c-[>a
Now type date<c-b> in insert-mode and you will get the date.
<<editing files on an ftp server listening on a non-standard port |
Use VIM as an organizer of Memos, bookmarks, todo, etc. >>
Additional Notes
|