According to http://vimdoc.sourceforge.net/htmldoc/usr_41.html#function-list vim script has functions setline() and append() to modify the current buffer but how do i delete a line from within a script? With setline(1, "") the line is only emptied but I want to get rid of it.
I'm still a bit puzzled why there is no API function for doing something so important but apart from that'exe ":1," . lastline . "d"'does everything I want (actually I wanted to delete a whole range of lines).
ahe
2010-03-28 22:14:55
Because there's no need for a function to do that. You have a command that can do it. Vimscript is a base of all the ex commands normally available plus additional functions to provide functionality that isn't available (or easily available) through the ex commands.
jamessan
2010-03-29 11:56:34