Sunday, July 18, 2010

Re: Planning Vim 7.3

python << EOF
import vim
attr = vim.screen.getHighlightAttr("ErrorMsg")
enc = vim.eval("&encoding")
text = u" Direct Write "
win = vim.current.window
vim.screen.puts(win.top + win.height/2, win.left+4, attr, text.encode(enc, "replace"))
EOF
On 17. 07. 2010 21:26, Bram Moolenaar wrote:
>
> I had a look at the patch. It doesn't include documentation, thus it's
> not easy to see how to use it.
>

Here is an example:

python << EOF
import vim
attr = vim.screen.getHighlightAttr("ErrorMsg")
enc = vim.eval("&encoding")
text = u" Direct Write "
win = vim.current.window
vim.screen.puts(win.top + win.height/2, win.left+4, attr,
text.encode(enc, "replace"))
EOF

--
You received this message from the "vim_use" 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

No comments: