> Here are some rules and guidelines from my personal "Vim scripting guide":
...snip
> -- regards, ingo

Hi Ingo.

Thank you for a very precise description. I must say there much of interesting
even for ~15 years user of vim like me :-) However, it's quite hard to read,
esp. as a FAQ entry. What about the following, wouldn't it be more readable for
beginners? Even I _know_ it is not the simplest or shortest solution for those
who know all details and special characters:

-------------------------------------------------------------------------------
Mapping in normal mode could be executed after Ctrl-O from insert mode as well
but if there are more commands included in the mapping {rhs}, only the first
one will be executed in normal mode and the rest of {rhs} will be printed
literally in insert mode. One of ways to workaround this problem is to make
{rhs} be one command, via wrapping it to the function. For example:

function GetFontNameOfFirstChar()
  normal 0
  echo getfontname()
endfunction

:nmap <F9> :call GetFontNameOfFirstChar()<CR>

For more solutions of this problem look <a href="Ingo's mail">here</a>.
-------------------------------------------------------------------------------

Milan

-- 
Milan Vancura, Prague, Czech Republic, Europe

-- 
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

Raspunde prin e-mail lui