=head1 ideas for extending if_perl.xs n:/local/projects/vim7/src/if_perl.xs =head2 improve execution context =item set $. to current linenr curline_sv = GvSV(gv_fetchpv(".", TRUE, SVt_PV)); sv_setiv_mg(curline_sv, curwin->w_cursor.lnum); =item set $ARGV to the current filename argv_sv = GvSV(gv_fetchpv("ARGV", TRUE, SVt_PV)); sv_setpv(argv_sv, curbuf->b_fname); =item set $_ and $. to the current line/linenr in 'perl' too see above. =item in perldo, when $_ contains newlines, split it over multiple lines =item better support for columnblock selections =item make STDOUT+STDERR more useful print STDOUT should do the same as Msg($_) print STDERR should do the same as Msg($_, 'Error') options for implementation: * TIEHANDLE * see mod_perl from apache * PerlIO layer =item update perl CWD when the vim CWD changes * take the window-current cd - set with 'lcd' =head2 add more vim objects =item add support for VIMARK - marks =item add support for VIMREG - access vim registers =item add support for VIMUNDO - access vim undo history =item add support for VIMHIST - access vim command history =item add support for VIM::var - access vim variables see list in C:\local\vim\vim70\doc\eval.txt =item add support for VIM::func - call vim functions see list in C:\local\vim\vim70\doc\eval.txt =item add support for VIM::ex - execute ex commands see list in C:\local\vim\vim70\doc\index.txt =item add support for VIM::has- access the feature list see list in C:\local\vim\vim70\doc\eval.txt =item add support for VIMSEARCH - access vim search history =item add support for VITAB - tabs =head2 add more vim functions =item add VIM::Beep =head2 extend existing vim objects =item VIBUF::Append(text) should insert after the cursor line currently it requires the first param to be a linenr. =item VIBUF::Save(filename) =item VIBUF::Load(filename) to create a new buffer from file. =item VIWIN::LoadBuffer to show buffer in window =item VIM::NewWindow =item VIM::NewBuffer =head2 new toplevel ex commands add command to run perlscript in one buffer, on contents of second buffer, outputting in third buffer. this can be done in vim-script i think. =head2 extending toplevel ex commands =item add perl options -i .. insert return value after the cursor line -a .. append return value to the current buffer =item add perldo options -f .. do for all files -b .. do for all buffers -w .. do for all windows -t .. do for all tabs, all windows =item display error from perl_eval =head1 bugs in vim70 =item opening a file from the dir browser should not reset the browse window. =item it would be nice if you could easily switch from \ to / in commands. "\Program\ Files" is a strange way of representing the filename. =head1 current vim-perl interface VIM::Msg(char *text[, char *hl]) - display msg with highlight VIM::SetOption(char *line) -> calls do_set see list in C:\local\vim\vim70\doc\options.txt VIM::DoCommand(char *line) -> calls do_cmdline_cmd VIM::Eval(char *str) -> calls eval_to_string scalar VIM::Buffers() -> return number of buffers array VIM::Buffers() -> return list of buffers VIM::Buffers(pattern,..) -> return buffer matching pattern VIM::Buffers(number,...) -> return buffer with number scalar VIM::Windows() -> return number of windows array VIM::Windows() -> return list of windows VIM::Windows(nr,...) -> return window with number VIWIN::DESTROY() VIWIN::Buffer() -> returns buffer from window VIWIN::SetHeight(h) -> resizes window VIWIN::Cursor() -> returns cursor (line,col) VIWIN::Cursor(l,c) -> sets cursor (line,col) VIBUF::DESTROY() VIBUF::Name() -> returns buffer name VIBUF::Number() -> returns buffer number VIBUF::Count() -> returns nr of lines in buffer VIBUF::Get(nr,...) -> returns list of lines VIBUF::Set(nr,str,...)-> sets lines starting at nr VIBUF::Delete(nr) -> delete line VIBUF::Delete(start,end) -> deletes range of lines VIBUF::Append(nr,str,...) -> insert after linenr VIM::bootstrap $main::curwin - returns current window object $main::curbuf - returns current buffer object VIM::perldo - function constructed for ex_perldo VIM::safe - function constructed for ex_perl ex_perl - called by vim ex_perldo - called by vim