- ... Right. Yank some lines then :@ those lines is perhaps better. As Bram has suggested the best way is to save a range as a temp file and then :source theMessage 1 of 72 , Dec 31, 2004View SourceJens Paulus wrote:
> Hi Bram,Right. Yank some lines then :@" those lines is perhaps
> On Thu, Dec 30, 2004 at 16:44:08 +0100, Bram Moolenaar wrote:
> > > 9. Putting text in the command line
> > > When writng a function in a buffer and trying to source the yanked lines
> > > with :<C-R>" or :<C-R><C-R>" what I see is that it does not work because
> > > the linebreaks are not correctly understood.
> > Right, you are editing a line, not a script. It's too dangerous to
> > execute each line-break separated line without hitting Enter.
> > Especially if you accidentally use the wrong register.
> > You need to use another way to enter multiple lines. I mostly use a
> > separate buffer, so that you can edit the lines comfortably. You do
> > need to write the lines into a file to be able to source them though.
> > Perhaps we can allow a range to the ":execute" command to execute lines
> > from a buffer.
> a workaround is to do the following thing.
> If no function is written but only a list of commands like
> put the cursor on the beginning of the first command line and do
> qay$:<C-R>0<CR>jq3@a and these lines are executed.
As Bram has suggested the best way is to save a range as a
temp file and then :source the file. I have a script that
does that if you are interested. If you write to a file
first then leading tabs and other subtleties can cause
problems. I think that allowing :execute to take a range
would be both a nice and a natural enhancement.
- Hi Bram, ... actually this is surprising. Here is again what causes problems. q:icolorscheme blue q:icolorscheme default q:icolorschemeMessage 72 of 72 , Jan 14, 2005View SourceHi Bram,
On Fri, Jan 14, 2005 at 12:30:35 +0100, Bram Moolenaar wrote:
> > On Tue, Jan 11, 2005 at 20:04:11 +0100, Jens Paulus wrote:
> > > > > When changing the color scheme in gvim and maybe also in vim with q:so
> > > > > $VIMRUNTIME/colors/file.vim the text background is not set correctly and
> > > > > ggVGV needs to be done to set it right.
> > > >
> > > > Works fine for me. Please be more specific.
> > > >
> > > > Note that you are supposed to use the ":colorscheme" command to select a
> > > > color scheme.
> > >
> > > now after trying the same with the :colorscheme command it is obvious
> > > that there is the same problem like when using the :source command. Try
> > > it out, open the command line window with the q: command and load
> > > different color schemes in a row, load each of them using the command
> > > line window.
> > please let me know if this is reproduceable when you do it.
> No, I don't see any problems with colors.
actually this is surprising. Here is again what causes problems.
This can be continued.