Hello, "Archibald Chase" <[email protected]> a écrit : > In a french magazine an article presents a lot of vim features. For a > simple use of templates it says that html template could be use this > abbrev : > iabbrev <img> <img src='!cursor!' alt='<+Message de remplacement+>' > /><CR><ESC> > :call search('!cursor!', 'b')<CR>cf!
When written on two lines, mappings/abbreviations/... must use a '\' in front on each new line. :h line-continuation BTW: there already exist frameworks that help define such mappings, like mine for instance: http://code.google.com/p/lh-vim/wiki/lhBrackets#The_VimL_library With InsertSeq(), your mapping will be written as follow: inoremap <buffer> <img> \ <c-r>=InsertSeq('<img>', "<img src=!cursorhere! alt='!mark!'/>")<cr> (I suppose it will be defined into {rtp}/ftplugin/html_snippets.vim as you probably won't like to see the mapping exists when editing C++ files, see :h map-<buffer>, :h ftplugin) -- Luc Hermitte http://lh-vim.googlecode.com/ http://hermitte.free.fr/vim/ --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
