Re: vim console?
- John Doe wrote:
>Oh, thank you for your reply:Anything you can type from the command line can go into a script.
>I wanted to know how to _program_ the vim 'console', from a script: the
>general direction on how to do it: I know how to obtain the number of
>columns and rows, but how about how to write a specific char to a
>specific location, also is it possible to access the Internet from a
>script, just as it's possible from awk, for example.
Anything you type in normal mode can be typed from a command line; see
Hence anything from normal mode can also go into a script (just use norm).
I'm not sure about what you mean by obtaining the number of columns and
How to write to a specific location: there are several ways, but one is:
linewise : call setline(lnum,"new line goes here") " lnum is an
writing a character to a specific column in a specific line: (replacing
in line #lnum, column# colnum, with character X)
lnum " put line number in instead of lnum
colnum| " put column number in instead of colnum
Accessing the internet is possible, see :help :! and :help system()
. Alternatively, you may use netrw's url format: