John Doe wrote:
Oh, thank you for your reply:
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 can type from the command line can go into a script.
Anything you type in normal mode can be typed from a command line; see
:help :norm
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
rows.
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
integer
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
norm! rX
Accessing the internet is possible, see :help :! and :help system()
. Alternatively, you may use netrw's url format:
r scp://hostname/path/to/a/file
w ftp://hostname/path/to/a/file
so scp://hostname/path/to/a/file
Regards,
Chip Campbell