Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: GVIM Editor

From: joel:neely:fedex at: 12-Mar-2002 20:29

Hi, again, Louis Dr. Louis A. Turk wrote:
> Martin, > > At 07:36 AM 3/12/2002 -0500, you wrote: > > I use GVIM almost exclusively when I edit REBOL scripts. It > > sounds like you need to position the cursor at the location > > at which you wish to insert the code and make sure you're in > > "insert" mode...
Nononono! You should be in command mode, not insert mode.
> In either mode I get the same wrong (text inserted at beginning > of file instead of after the cursor) results using the toolbar > paste icon or right clicking on the mouse and selecting paste. >
Try the following, and let me know what happens: - Create a multiple-line file (however you wish) named nlines.txt containing something obviously in that file (e.g. start every line with the same character or word). - Create a single-line file (however you wish) named oneline.txt containing something obviously different (e.g. different word or leading character). - Start up vim. - Open nlines.txt (the handiest way may be to use the command :browse e which will pop up the standard "file open" dialog on your box, allowing you to navigate to the file and open it. - Open oneline.txt (as above). - Enter the following 1G"+yy (Go to line 1, select the + buffer, and yank a copy of the current line into that buffer) then enter :e# and press return (which will take you to the other buffer, containing nlines.txt). Then type G"+p (Go to the end of the file, select the + buffer, and Put that buffer's contents after the current position.) If that inserts the copied line somewhere else than the end of the file, I suspect that your copy of vim may be damaged, and would suggest that you go fetch a fresh copy from and install it over the one you have.
> However, if I am in insert mode typing "+p simply types "+p. >
As it should. Insert mode *means* that your keystrokes will be inserted into the buffer. -jn- -- ; sub REBOL {}; sub head ($) {@_[0]} REBOL [] # despam: func [e] [replace replace/all e ":" "." "#" "@"] ; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"} print head reverse despam "moc:xedef#yleen:leoj" ;