On Wed, Jun 30, 2010 at 8:30 AM, ZyX <zyx....@gmail.com> wrote: > Trying to make an abbreviation using > iabbrev <sc test > iabbrev <lt>sc test > iabbrev \<sc test > iabbrev <lt><Char-115>c test > iabbrev <script> <lt>sc test > set cpoptions-=< > iabbrev <sc test > iabbrev <script> <sc test > iabbrev <special> <lt>sc test > Results in > E474: Invalid argument > at least on empty file. Strange, but it succeeds if I open a help window and > define this abbreviation while being in it, though this abbreviation works > only > in help window.
The abbreviation doesn't work in an empty buffer because "<sc" is not a valid abbreviation format. Paraphrasing from ":help abbreviations", there are three valid formats. 1) full-id - All characters in the abbr are listed in the 'iskeyword' option 2) end-id - Only the last character in the abbr is listed in the 'iskeyword' option 3) non-id - Only the last character in the abbr is not listed in the 'iskeyword' option By default, the "<" character is not a keyword character, where as "<" is included in 'iskeyword' for help buffers. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@jamessan.com> -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php