Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vimdev · Vim (Vi IMproved) text editor developers list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 44722 - 44751 of 71395   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#44722 From: "Alexey I. Froloff" <raorn@...>
Date: Fri Sep 1, 2006 1:35 pm
Subject: Re: Bad QUOTESED expression in src/Makefile
raorn@...
Send Email Send Email
 
* Alexey I. Froloff <raorn@> [060831 01:27]:
> I think QUOTESED should look like:

> QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'

Patch attached.

--
Regards,
Sir Raorn.
diff -cdrN ../vim70-orig/src/Makefile src/Makefile
*** ../vim70-orig/src/Makefile Fri Sep  1 17:18:36 2006
--- src/Makefile Fri Sep  1 17:34:02 2006
***************
*** 2206,2212 ****
   auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
  	 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh

! QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
   auto/pathdef.c: Makefile auto/config.mk
  	 -@echo creating $@
  	 -@echo '/* pathdef.c */' > $@
--- 2206,2212 ----
   auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
  	 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh

! QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
   auto/pathdef.c: Makefile auto/config.mk
  	 -@echo creating $@
  	 -@echo '/* pathdef.c */' > $@

#44723 From: "Alexey I. Froloff" <raorn@...>
Date: Fri Sep 1, 2006 1:33 pm
Subject: [PATCH] russian vimtutor is b0rken in UTF-8 locale
raorn@...
Send Email Send Email
 
Quick solution: generate tutor.ru.utf-8 from tutor.ru (KOI8-R).
This will work right now.

Better solution: keep tutor.ru.utf-8, generate .cp1251 and .koi8
from it and detect all encodings in tutor.vim.  vimtutor will
fall back to english in "unsupported" locales (ru_RU.ISO8859-5)
for example.

Attached patch for quick solution.  Better solution can wait till
7.1.  When, by the way?

--
Regards,
Sir Raorn.
diff -cdrN ../vim70-orig/runtime/tutor/Makefile runtime/tutor/Makefile
*** ../vim70-orig/runtime/tutor/Makefile Mon Jun  7 18:32:39 2004
--- runtime/tutor/Makefile Fri Sep  1 17:21:29 2006
***************
*** 3,9 ****
   # The Japanese tutor exists in three encodings.  Use the UTF-8 version as the
   # original and create the others with conversion.

! all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc

   tutor.ja.sjis: tutor.ja.utf-8
  	 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
--- 3,9 ----
   # The Japanese tutor exists in three encodings.  Use the UTF-8 version as the
   # original and create the others with conversion.

! all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc tutor.ru.utf-8

   tutor.ja.sjis: tutor.ja.utf-8
  	 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
***************
*** 13,15 ****
--- 13,18 ----

   tutor.ko.euc: tutor.ko.utf-8
  	 iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
+
+ tutor.ru.utf-8: tutor.ru
+  iconv -f KOI8-R -t UTF-8 tutor.ru > tutor.ru.utf-8
diff -cdrN ../vim70-orig/runtime/tutor/tutor.vim runtime/tutor/tutor.vim
*** ../vim70-orig/runtime/tutor/tutor.vim Sat Mar 18 23:20:36 2006
--- runtime/tutor/tutor.vim Fri Sep  1 17:24:51 2006
***************
*** 103,113 ****
     let s:ext = ".sk.cp1250"
   endif

! " The Russian tutor is available in two encodings, guess which one to use.
! " This segment is from the above lines and modified by
! " Alexey I. Froloff <raorn@...> for Russian vim tutorial
! if s:ext =~? '\.ru' && &enc =~ 1251
!   let s:ext = ".ru.cp1251"
   endif

   " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
--- 103,115 ----
     let s:ext = ".sk.cp1250"
   endif

! " The Russian tutor is available in three encodings, guess which one to use.
! if s:ext =~? '\.ru'
!   if &enc == "utf-8"
!     let s:ext = ".ru.utf-8"
!   elseif &enc =~ 1251
!     let s:ext = ".ru.cp1251"
!   endif
   endif

   " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).

#44724 From: Benji Fisher <benji@...>
Date: Fri Sep 1, 2006 7:10 pm
Subject: Re: Fixing cweb.vim
benji@...
Send Email Send Email
 
On Fri, Sep 01, 2006 at 09:36:55AM +0300, Ilya wrote:
> David Brown wrote:
[...]
> >However, tex.vim frequently will enclose large sections of the document
> >within a region and the cweb.vim which the webCRegion is not part of.
> >
> >I think I can fix this by adding an appropriate containedin=... field to
> >the definition of webCRegion.
> >
> >What I'm having difficulty with is figuring out what to put there.  Is
> >there a way of finding out what region a given part of the buffer is in?
> From :help synID
>
>        Example (echoes the name of the syntax item under the cursor): >
>            :echo synIDattr(synID(line("."), col("."), 1), "name")

      IIUC, synIDattr() always returns a syn-match or syn-keyword group.
It does not tell you whether you are in a syn-region.

HTH 			 --Benji Fisher

#44725 From: Bram Moolenaar <Bram@...>
Date: Fri Sep 1, 2006 8:18 pm
Subject: Re: Bad QUOTESED expression in src/Makefile
Bram@...
Send Email Send Email
 
Alexey Froloff wrote:

> There is QUOTESED expression for creating auto/pathdef.c:
>
> QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
> ...
>   @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' | $(QUOTESED) >>
$@
>
> However:
>
> gcc -c -I. -Iproto -DHAVE_CONFIG_H     -pipe -Wall -O2 -march=pentium4
-DSYS_VIMRC_FILE=\"/etc/vim/vimrc\" -DSYS_GVIMRC_FILE=\"/etc/vim/gvimrc\"
-o objects/pathdef.o auto/pathdef.c
> auto/pathdef.c:7: error: 'etc' undeclared here (not in a function)
> auto/pathdef.c:7: error: 'vim' undeclared here (not in a function)
> auto/pathdef.c:7: error: stray '\' in program
> auto/pathdef.c:7: error: stray '\' in program
> auto/pathdef.c:7: error: 'vimrc' undeclared here (not in a function)
> auto/pathdef.c:7: error: expected ',' or ';' before string constant
> auto/pathdef.c:7: error: stray '\' in program
> auto/pathdef.c:7: error: stray '\' in program
>
> $ grep all_cflags auto/pathdef.c
> char_u *all_cflags = (char_u *)"gcc -c -I. -Iproto -DHAVE_CONFIG_H     -pipe
-Wall -O2 -march=pentium4 -DSYS_VIMRC_FILE=\\"/etc/vim/vimrc\\"
-DSYS_GVIMRC_FILE=\\"/etc/vim/gvimrc\\"
>
> I think QUOTESED should look like:
>
> QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'

That looks like a good solution.

--
    They now pass three KNIGHTS impaled to a tree.  With their feet off the
    ground,  with one lance through the lot of them, they are skewered up
    like a barbecue.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44726 From: "Alexey I. Froloff" <raorn@...>
Date: Fri Sep 1, 2006 9:14 pm
Subject: Re: [PATCH] russian vimtutor is b0rken in UTF-8 locale
raorn@...
Send Email Send Email
 
* Bram Moolenaar <Bram@> [060902 00:28]:
> > Better solution: keep tutor.ru.utf-8, generate .cp1251 and .koi8
> > From it and detect all encodings in tutor.vim.  vimtutor will
> > fall back to english in "unsupported" locales (ru_RU.ISO8859-5)
> > for example.
> I checked the existing Russian tutor files, and they are exactly the
> same when converted to utf-8.  Thus we can use the utf-8 file as the
> master and generate the others from it.
In this case only tutor.ru.utf-8 shall be kept in source tree.  I
guess it can't be done right now since patch will be to big.

New patch attached, should be included in next release.

--
Regards,
Sir Raorn.
diff -cdrN ../vim70-orig/runtime/tutor/Makefile runtime/tutor/Makefile
*** ../vim70-orig/runtime/tutor/Makefile Mon Jun  7 18:32:39 2004
--- runtime/tutor/Makefile Sat Sep  2 01:14:00 2006
***************
*** 3,9 ****
   # The Japanese tutor exists in three encodings.  Use the UTF-8 version as the
   # original and create the others with conversion.

! all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc

   tutor.ja.sjis: tutor.ja.utf-8
  	 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
--- 3,9 ----
   # The Japanese tutor exists in three encodings.  Use the UTF-8 version as the
   # original and create the others with conversion.

! all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc tutor.ru.koi8 tutor.ru.cp1251

   tutor.ja.sjis: tutor.ja.utf-8
  	 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
***************
*** 13,15 ****
--- 13,21 ----

   tutor.ko.euc: tutor.ko.utf-8
  	 iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
+
+ tutor.ru.koi8: tutor.ru.utf-8
+  iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru.koi8
+
+ tutor.ru.cp1251: tutor.ru.utf-8
+  iconv -f UTF-8 -t CP1251 tutor.ru.utf-8 > tutor.ru.cp1251
diff -cdrN ../vim70-orig/runtime/tutor/tutor.vim runtime/tutor/tutor.vim
*** ../vim70-orig/runtime/tutor/tutor.vim Sat Mar 18 23:20:36 2006
--- runtime/tutor/tutor.vim Sat Sep  2 01:08:54 2006
***************
*** 103,113 ****
     let s:ext = ".sk.cp1250"
   endif

! " The Russian tutor is available in two encodings, guess which one to use.
! " This segment is from the above lines and modified by
! " Alexey I. Froloff <raorn@...> for Russian vim tutorial
! if s:ext =~? '\.ru' && &enc =~ 1251
!   let s:ext = ".ru.cp1251"
   endif

   " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
--- 103,117 ----
     let s:ext = ".sk.cp1250"
   endif

! " The Russian tutor is available in three encodings, guess which one to use.
! if s:ext =~? '\.ru'
!   if &enc == "utf-8"
!     let s:ext = ".ru.utf-8"
!   elseif &enc =~ "koi8"
!     let s:ext = ".ru.koi8"
!   elseif &enc =~ 1251
!     let s:ext = ".ru.cp1251"
!   endif
   endif

   " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).

#44727 From: "Yakov Lerner" <iler.ml@...>
Date: Fri Sep 1, 2006 8:22 pm
Subject: Re: session-file problem in presence of 'set acd'
iler.ml@...
Send Email Send Email
 
On 9/1/06, Bram Moolenaar <Bram@...> wrote:
>
> Yakov Lerner wrote:
>
> > When 'acd' is set, 'vim -S' open files in wrong directory.
> > To reproduce:
> >
> > 1. make your ~/.vimrc 1-liner 'set acd'
> >    (Alternatively, use use "vim -u NONE -c 'set acd'" instead of vim
> > in commands below).
> > 2. vim ~/xxx            # or
> > :he options.txt
> >             " now you have two files open: (1) ~/xxx (2)
> > $VIMRUNTIME/doc/options.txt
> > :mksession! /tmp/3
> > :q!
> > 3. vim -S /tmp/3
> > 4. You'll see that buffer 'options.txt' is empty.
> > ':pwd' in window of options.txt shows that current directory is incorrect.
> >
> > The problem is that ':edit' commands in session-file do not
> > contain full paths. Incomplete paths do not work when 'acd' is set.
> > Here are relevant lines from sessionfile, the /tmp/3:
> >
> >    cd /usr/local/share/vim/vim70/doc
> >    edit ~/xxx
> >    edit options.txt
> >
> > This (3rd line)does not work with 'set acd'. I think all filenames
> > must be with full path like
> >
> >    edit ~/xxx
> >    edit /usr/local/share/vim/vim70/doc/options.txt
>
> Don't keep 'autochdir' set all the time, some things won't work.

Hmmm why, I always been having 'set acd' in my .vimrc for years;
and everyhing works just fine. It's convenient. I never had problems.

I also have equivalent lcd autocmd (in .vimrc) in case autocd
is not compiled in. It's convenient.

> I'll see if the option can be switched off in the session file until the
> very end, that should help.

Yakov

#44728 From: Bram Moolenaar <Bram@...>
Date: Fri Sep 1, 2006 8:18 pm
Subject: Vim BOF session
Bram@...
Send Email Send Email
 
Greetings, Vim users.

I am hosting a Vim BOF at the upcoming O'Reilly Open Source Convention:

       Title: Vim 8?
        Date: Tuesday, 19 September 2006
        Time: 20:30 - 21:30
    Location: Salon Versailles

     Summary: Vim 7 was released May 2006. Does it make sense to make
              another major release and add lots of new features? Or
              should priority be given to fix problems and fine tune
              existing features?

              What new features would users really profit from? Talk
              about the pros and cons with the main Vim author.

The conference is held in Brussels, 18 - 21 September.

More information: http://conferences.oreillynet.com/cs/euos2006/view/e_sess/9854

--
Linux is just like a wigwam: no Windows, no Gates and an Apache inside.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44729 From: Bram Moolenaar <Bram@...>
Date: Fri Sep 1, 2006 8:18 pm
Subject: Re: [PATCH] russian vimtutor is b0rken in UTF-8 locale
Bram@...
Send Email Send Email
 
Alexey Froloff wrote:

> Quick solution: generate tutor.ru.utf-8 from tutor.ru (KOI8-R).
> This will work right now.
>
> Better solution: keep tutor.ru.utf-8, generate .cp1251 and .koi8
> From it and detect all encodings in tutor.vim.  vimtutor will
> fall back to english in "unsupported" locales (ru_RU.ISO8859-5)
> for example.

I checked the existing Russian tutor files, and they are exactly the
same when converted to utf-8.  Thus we can use the utf-8 file as the
master and generate the others from it.

I'll include your change to tutor.vim.

> Attached patch for quick solution.  Better solution can wait till
> 7.1.  When, by the way?

No idea when there will be a 7.1 version.  I still have lots of fixes in
the todo list.

--
The greatest lies of all time:
   (1) The check is in the mail.
   (2) We have a really challenging assignment for you.
   (3) I love you.
   (4) All bugs have been fixed.
   (5) This won't hurt a bit.
   (6) Honey, I just need to debug this program and be home in 5 minutes.
   (7) I have just sent you an e-mail about that.
   (8) Of course I'll respect you in the morning.
   (9) I'm from the government, and I'm here to help you.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44730 From: Bram Moolenaar <Bram@...>
Date: Fri Sep 1, 2006 8:18 pm
Subject: Re: session-file problem in presence of 'set acd'
Bram@...
Send Email Send Email
 
Yakov Lerner wrote:

> When 'acd' is set, 'vim -S' open files in wrong directory.
> To reproduce:
>
> 1. make your ~/.vimrc 1-liner 'set acd'
>    (Alternatively, use use "vim -u NONE -c 'set acd'" instead of vim
> in commands below).
> 2. vim ~/xxx            # or
> :he options.txt
>             " now you have two files open: (1) ~/xxx (2)
> $VIMRUNTIME/doc/options.txt
> :mksession! /tmp/3
> :q!
> 3. vim -S /tmp/3
> 4. You'll see that buffer 'options.txt' is empty.
> ':pwd' in window of options.txt shows that current directory is incorrect.
>
> The problem is that ':edit' commands in session-file do not
> contain full paths. Incomplete paths do not work when 'acd' is set.
> Here are relevant lines from sessionfile, the /tmp/3:
>
>    cd /usr/local/share/vim/vim70/doc
>    edit ~/xxx
>    edit options.txt
>
> This (3rd line)does not work with 'set acd'. I think all filenames
> must be with full path like
>
>    edit ~/xxx
>    edit /usr/local/share/vim/vim70/doc/options.txt

Don't keep 'autochdir' set all the time, some things won't work.

I'll see if the option can be switched off in the session file until the
very end, that should help.

--
        When danger reared its ugly head,
        He bravely turned his tail and fled
        Yes, Brave Sir Robin turned about
        And gallantly he chickened out
        Bravely taking to his feet
        He beat a very brave retreat
        Bravest of the brave Sir Robin
        Petrified of being dead
        Soiled his pants then brave Sir Robin
        Turned away and fled.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44731 From: Bram Moolenaar <Bram@...>
Date: Fri Sep 1, 2006 8:18 pm
Subject: Re: vim mailing lists
Bram@...
Send Email Send Email
 
Gautam Iyer wrote:

> On Wed, Aug 30, 2006 at 10:12:44PM +0200, Bram Moolenaar wrote:
>
> > > > Apparently the sorbs blacklist mechanism is still being used, causing
> > > > trouble for some people.  I have asked the mail server maintainer to
> > > > remove sorbs a few times now...
> > >
> > > Twice recently, sorbs has bounced my mails to the list because some
> > > server between my ISP and the vim-dev list is on its blacklist.
> > >
> > > Do you have any plans to move the vim mailing lists to a new server,
> > > where you (or someone more responsive) has administrative control?
> >
> > The plan was to move the maillists to the server that is now already the
> > Vim mail server.  And the one causing this blacklist trouble...
> >
> > There is no progress in moving the maillists.  I suppose it's time to
> > find a better place for the Vim mail server.  Instead of a server that
> > just happens to be available and run by someone who doesn't always
> > respond, or some big and anonymous server park like Yahoo, I think we
> > should look for a small site that does have 24 hour support.
>
> How about the sourceforge mailing lists? I know sourceforge has had
> numerous failures in the past. But I think their mailing lists might be
> OK.

Features missing (at least):
- When someone is not subscribed the message should bounce, not sent to
   the maillist owner.  (I have to manually remove spam stuff from the
   a-a-p lists regularly).
- Messages with just HTML, executable attachments etc. should be
   bounced.  These rules must be configurable.
- Loading all the old messages into the archive, so that searches find
   them.

--
Microsoft's definition of a boolean: TRUE, FALSE, MAYBE
"Embrace and extend"...?

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44732 From: Ilya <ilya@...>
Date: Fri Sep 1, 2006 10:36 pm
Subject: Re: Fixing cweb.vim
ilya@...
Send Email Send Email
 
Benji Fisher wrote:
> On Fri, Sep 01, 2006 at 09:36:55AM +0300, Ilya wrote:
>
>> David Brown wrote:
>>
> [...]
>
>>> However, tex.vim frequently will enclose large sections of the document
>>> within a region and the cweb.vim which the webCRegion is not part of.
>>>
>>> I think I can fix this by adding an appropriate containedin=... field to
>>> the definition of webCRegion.
>>>
>>> What I'm having difficulty with is figuring out what to put there.  Is
>>> there a way of finding out what region a given part of the buffer is in?
>>>
>> From :help synID
>>
>>        Example (echoes the name of the syntax item under the cursor): >
>>            :echo synIDattr(synID(line("."), col("."), 1), "name")
>>
>
>      IIUC, synIDattr() always returns a syn-match or syn-keyword group.
> It does not tell you whether you are in a syn-region.
>
> HTH 			 --Benji Fisher
>
It does return region names for me.

#44733 From: Ilya <ilya@...>
Date: Fri Sep 1, 2006 10:44 pm
Subject: Syntax matching. extend inside normal inside keepend
ilya@...
Send Email Send Email
 
Hello.

I have a question regarding syntax matching.  I have some kind of syntax
and I have some solution to highlight it, but it does not work the way I
expect it to.

What I want:  match syntax that consists of blocks (enclosed in {}),
strings (enclosed in "") and identifiers (starts with ${ and ends with
}).  Block end should also end any string that starts inside this block.

My solution:

:syn cluster Top contains=Block,String,Identifier
:syn region Block start=+{+ end=+}+ keepend extend contains=@Top
:syn region String start=+"+ end=+"+ contains=Identifier
:syn region Identifier start=+\${+ end=+}+ extend

Here is a sample that shows that this solution does not work:

{
   "string ${var} string"
}

For some reason an Identifier region ends a String region and a second
word 'string' is not highlighted as a string (and Vim says that it has
Block match there).

Question: why the String region is not restored after the Identifier
region ends?

P.S. Removing keepend from a Block makes highlighting right in this
example but then an important point that Block should end unmatched
String is lost.

P.P.S.  Solution code is in 1.vim and test code is in 1.vim.test so you
may try it on your vim with

     vim -s 1.vim 1.vim.test

Ilya
{
   "string ${var} string"
}

#44734 From: Hari Krishna Dara <hari_vim@...>
Date: Sat Sep 2, 2006 3:46 am
Subject: Re: buftablist()
hari_vim@...
Send Email Send Email
 
On Thu, 31 Aug 2006 at 11:37am, Charles E Campbell Jr wrote:

> Hello!
>
> Is there any interest in a
>    buftablist([optional])
> function which would return a list of tab numbers that the optional
> argument,
> a buffer number, is in?  If no optional argument, then the current
> buffer would
> number be used.
>
> Regards,
> Chip Campbell

Yes, that will be useful to find the right tab for a buffer and switch
to that tab and window, without needing to scour through
tabpagebuflist() for each tab.

--
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#44735 From: Benji Fisher <benji@...>
Date: Sat Sep 2, 2006 12:04 pm
Subject: Re: Fixing cweb.vim
benji@...
Send Email Send Email
 
On Sat, Sep 02, 2006 at 01:36:06AM +0300, Ilya wrote:
> Benji Fisher wrote:
> >On Fri, Sep 01, 2006 at 09:36:55AM +0300, Ilya wrote:
> >
> >>David Brown wrote:
> >>
> >[...]
> >
> >>>However, tex.vim frequently will enclose large sections of the document
> >>>within a region and the cweb.vim which the webCRegion is not part of.
> >>>
> >>>I think I can fix this by adding an appropriate containedin=... field to
> >>>the definition of webCRegion.
> >>>
> >>>What I'm having difficulty with is figuring out what to put there.  Is
> >>>there a way of finding out what region a given part of the buffer is in?
> >>>
> >>From :help synID
> >>
> >>       Example (echoes the name of the syntax item under the cursor): >
> >>           :echo synIDattr(synID(line("."), col("."), 1), "name")
> >>
> >
> >     IIUC, synIDattr() always returns a syn-match or syn-keyword group.
> >It does not tell you whether you are in a syn-region.
> >
> >HTH 			 --Benji Fisher
> >
> It does return region names for me.

      So it does, but only if there is no active match nor keyword at the
cursor.  What I should have said is that synIDattr() (or maybe I should
say synID()) reports only the "innermost" syntax item at the cursor.
For example,

:help r
:normal 6j0
:echo synIDattr(synID(line("."), col("."), 1), "name")

reports helpLesdBlank but does not mention that this syn-match (defined
with "contained") is inside a helpExample syn-region.  (Verify this by
moving the cursor to the first non-blank on the lins.)

      In brief, synID() *sometimes* reports the current syn-region, and I
do not think this is good enough for David Brown's purposes.

HTH 			 --Benji Fisher

#44736 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 12:25 pm
Subject: Patch 7.0.078
Bram@...
Send Email Send Email
 
Patch 7.0.078
Problem:    There are two error messages E46.
Solution:   Change the number for the sandbox message to E794.
Files:     src/globals.h


*** ../vim-7.0.077/src/globals.h Sun Apr 30 20:32:38 2006
--- src/globals.h Sat Sep  2 13:12:55 2006
***************
*** 1441,1447 ****
   EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to
override)"));
   #ifdef FEAT_EVAL
   EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable
\"%s\""));
! EXTERN char_u e_readonlysbx[] INIT(= N_("E46: Cannot set variable in the
sandbox: \"%s\""));
   #endif
   #ifdef FEAT_QUICKFIX
   EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
--- 1441,1447 ----
   EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to
override)"));
   #ifdef FEAT_EVAL
   EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable
\"%s\""));
! EXTERN char_u e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the
sandbox: \"%s\""));
   #endif
   #ifdef FEAT_QUICKFIX
   EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
*** ../vim-7.0.077/src/version.c Sat Sep  2 13:45:01 2006
--- src/version.c Sat Sep  2 14:08:12 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     78,
   /**/

--
"Intelligence has much less practical application than you'd think."
		   -- Scott Adams, Dilbert.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44737 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 12:25 pm
Subject: Patch 7.0.077
Bram@...
Send Email Send Email
 
Patch 7.0.077
Problem:    ":unlet v:this_session" causes a crash. (Marius Roets)
Solution:   When trying to unlet a fixed variable give an error message.
Files:     src/eval.c


*** ../vim-7.0.076/src/eval.c Tue Aug 29 21:59:25 2006
--- src/eval.c Sat Sep  2 13:43:20 2006
***************
*** 701,706 ****
--- 701,707 ----
   static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type,
char_u *string));
   static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
   static int var_check_ro __ARGS((int flags, char_u *name));
+ static int var_check_fixed __ARGS((int flags, char_u *name));
   static int tv_check_lock __ARGS((int lock, char_u *name));
   static void copy_tv __ARGS((typval_T *from, typval_T *to));
   static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int
copyID));
***************
*** 3364,3369 ****
--- 3365,3372 ----
  	 hi = hash_find(ht, varname);
  	 if (!HASHITEM_EMPTY(hi))
  	 {
+ 	    if (var_check_fixed(HI2DI(hi)->di_flags, name))
+ 	 return FAIL;
  	     if (var_check_ro(HI2DI(hi)->di_flags, name))
  		 return FAIL;
  	     delete_var(ht, hi);
***************
*** 17818,17824 ****
   }

   /*
!  * Return TRUE if di_flags "flags" indicate read-only variable "name".
    * Also give an error message.
    */
       static int
--- 17821,17827 ----
   }

   /*
!  * Return TRUE if di_flags "flags" indicates variable "name" is read-only.
    * Also give an error message.
    */
       static int
***************
*** 17834,17839 ****
--- 17837,17859 ----
       if ((flags & DI_FLAGS_RO_SBX) && sandbox)
       {
  	 EMSG2(_(e_readonlysbx), name);
+  return TRUE;
+     }
+     return FALSE;
+ }
+
+ /*
+  * Return TRUE if di_flags "flags" indicates variable "name" is fixed.
+  * Also give an error message.
+  */
+     static int
+ var_check_fixed(flags, name)
+     int  flags;
+     char_u *name;
+ {
+     if (flags & DI_FLAGS_FIX)
+     {
+  EMSG2(_("E795: Cannot delete variable %s"), name);
  	 return TRUE;
       }
       return FALSE;
*** ../vim-7.0.076/src/version.c Tue Aug 29 22:35:11 2006
--- src/version.c Sat Sep  2 13:39:36 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     77,
   /**/

--
             ### Hiroshima 45, Chernobyl 86, Windows 95 ###

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44738 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 12:25 pm
Subject: Re: [PATCH] russian vimtutor is b0rken in UTF-8 locale
Bram@...
Send Email Send Email
 
Alexey Froloff wrote:

> * Bram Moolenaar <Bram@> [060902 00:28]:
> > > Better solution: keep tutor.ru.utf-8, generate .cp1251 and .koi8
> > > From it and detect all encodings in tutor.vim.  vimtutor will
> > > fall back to english in "unsupported" locales (ru_RU.ISO8859-5)
> > > for example.
> > I checked the existing Russian tutor files, and they are exactly the
> > same when converted to utf-8.  Thus we can use the utf-8 file as the
> > master and generate the others from it.
> In this case only tutor.ru.utf-8 shall be kept in source tree.  I
> guess it can't be done right now since patch will be to big.
>
> New patch attached, should be included in next release.

Thanks.  I notice you rename tutor.ru to tutor.ru.koi8.  Is there
anything against keeping the old name?  Just to avoid a big diff that
doesn't change much.

--
DINGO: Wicked wicked Zoot ... she is a bad person and she must pay the
        penalty.  And here in Castle Anthrax, we have but one punishment
        ... you must tie her down on a bed ... and spank her.  Come!
GIRLS: A spanking!  A spanking!
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44739 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 12:25 pm
Subject: Re: session-file problem in presence of 'set acd'
Bram@...
Send Email Send Email
 
Yakov Lerner wrote:

> > Don't keep 'autochdir' set all the time, some things won't work.
>
> Hmmm why, I always been having 'set acd' in my .vimrc for years;
> and everyhing works just fine. It's convenient. I never had problems.

At least a few plugins don't work with 'acd'.  Some of them got fixed
and/or perhaps you don't use them.

--
DINGO:   And after the spanking ... the oral sex.
GALAHAD: Oh, dear! Well, I...
GIRLS:   The oral sex ...  The oral sex.
GALAHAD: Well, I suppose I could stay a BIT longer.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44740 From: "Yakov Lerner" <iler.ml@...>
Date: Sat Sep 2, 2006 12:38 pm
Subject: Re: Syntax matching. extend inside normal inside keepend
iler.ml@...
Send Email Send Email
 
On 9/2/06, Ilya <ilya@...> wrote:
> Hello.
>
> I have a question regarding syntax matching.  I have some kind of syntax
> and I have some solution to highlight it, but it does not work the way I
> expect it to.
>
> What I want:  match syntax that consists of blocks (enclosed in {}),
> strings (enclosed in "") and identifiers (starts with ${ and ends with
> }).  Block end should also end any string that starts inside this block.
>
> My solution:
>
> :syn cluster Top contains=Block,String,Identifier
> :syn region Block start=+{+ end=+}+ keepend extend contains=@Top
> :syn region String start=+"+ end=+"+ contains=Identifier
> :syn region Identifier start=+\${+ end=+}+ extend
>
> Here is a sample that shows that this solution does not work:
>
> {
>   "string ${var} string"
> }
>
> For some reason an Identifier region ends a String region and a second
> word 'string' is not highlighted as a string (and Vim says that it has
> Block match there).
>
> Question: why the String region is not restored after the Identifier
> region ends?

When I removed both 'keepend' and 'extend', it
started to work as expected.

With ''kepend extend', it
apparently takes identifier-closing brace for a
block-closing brace. I don't know why.

You might also try another solution: the 'syn match'
for identifier  instead of region.

Yakov

#44741 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 12:55 pm
Subject: Patch 7.0.079
Bram@...
Send Email Send Email
 
Patch 7.0.079
Problem:    Russian tutor doesn't work when 'encoding' is "utf-8".
Solution:   Use tutor.ru.utf-8 as the master, and generate the other encodings
	     from it.  Select the right tutor depending on 'encoding'. (Alexey
	     Froloff)
Files:     runtime/tutor/Makefile, runtime/tutor/tutor.vim,
	     runtime/tutor/tutor.ru.utf-8


*** ../vim-7.0.079/runtime/tutor/Makefile Sun Jun 13 20:35:48 2004
--- runtime/tutor/Makefile Fri Sep  1 20:38:20 2006
***************
*** 2,9 ****
   #
   # The Japanese tutor exists in three encodings.  Use the UTF-8 version as the
   # original and create the others with conversion.

! all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc

   tutor.ja.sjis: tutor.ja.utf-8
  	 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
--- 2,13 ----
   #
   # The Japanese tutor exists in three encodings.  Use the UTF-8 version as the
   # original and create the others with conversion.
+ #
+ # Similarly for Russian and Korean

! all: tutor.ja.sjis tutor.ja.euc \
!  tutor.ko.euc \
!  tutor.ru tutor.ru.cp1251

   tutor.ja.sjis: tutor.ja.utf-8
  	 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
***************
*** 13,15 ****
--- 17,25 ----

   tutor.ko.euc: tutor.ko.utf-8
  	 iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
+
+ tutor.ru: tutor.ru.utf-8
+  iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru
+
+ tutor.ru.cp1251: tutor.ru.utf-8
+  iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251
*** ../vim-7.0.079/runtime/tutor/tutor.vim Sat Mar 18 22:36:12 2006
--- runtime/tutor/tutor.vim Sat Sep  2 12:06:47 2006
***************
*** 1,6 ****
   " Vim tutor support file
   " Author: Eduardo F. Amatria <eferna1@...>
! " Last Change: 2006 Mar 18

   " This small source file is used for detecting if a translation of the
   " tutor file exist, i.e., a tutor.xx file, where xx is the language.
--- 1,6 ----
   " Vim tutor support file
   " Author: Eduardo F. Amatria <eferna1@...>
! " Last Change: 2006 Sep 02

   " This small source file is used for detecting if a translation of the
   " tutor file exist, i.e., a tutor.xx file, where xx is the language.
***************
*** 103,113 ****
     let s:ext = ".sk.cp1250"
   endif

! " The Russian tutor is available in two encodings, guess which one to use.
! " This segment is from the above lines and modified by
! " Alexey I. Froloff <raorn@...> for Russian vim tutorial
! if s:ext =~? '\.ru' && &enc =~ 1251
!   let s:ext = ".ru.cp1251"
   endif

   " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
--- 103,117 ----
     let s:ext = ".sk.cp1250"
   endif

! " The Russian tutor is available in three encodings, guess which one to use.
! if s:ext =~? '\.ru'
!   if &enc == 'utf-8'
!     let s:ext = '.ru.utf-8'
!   elseif &enc =~ '1251'
!     let s:ext = '.ru.cp1251'
!   elseif &enc =~ 'koi8'
!     let s:ext = '.ru'
!   endif
   endif

   " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
*** ../vim-7.0.079/runtime/tutor/tutor.ru.utf-8 Sat Sep  2 14:53:18 2006
--- runtime/tutor/tutor.ru.utf-8 Fri Sep  1 20:33:59 2006
***************
*** 0 ****
--- 1,834 ----
+
===============================================================================
+ =    Д о б р о   п о ж а л о в а т ь   в   у ч е б н и
к   VIM  -  Версия 1.5 =
+
===============================================================================
+      Vim --- это очень мощный редактор, имеющий
множество команд, слишком
+      много для того, чтобы их все можно было
описать в таком учебнике, как
+      этот. Этот учебник призван объяснить
достаточное число команд для того,
+      чтобы Вы могли с легкостью использовать
Vim в качестве редактора общего
+      назначения.
+
+      Вам потребуется приблизительно 25-30
минут на освоение данного учебника в
+      зависимости от того, сколько времени Вы
потратите на эксперименты.
+
+      Команды в уроках будут модифицировать
текст. Создайте копию этого файла,
+      чтобы попрактиковаться на ней (если Вы
запустили "vimtutor", то это уже
+      копия).
+
+      Важно помнить, что этот учебник
предназначен для обучения в процессе
+      использования. Это означает, что Вы
должны запускать команды для того,
+      чтобы как следует их изучить. Если Вы
просто прочитаете текст, то
+      забудете команды!
+
+      Теперь убедитесь в том, что клавиша CapsLock
не включена и нажмите
+      клавишу   j   несколько раз, так, чтобы
Урок 1.1 полностью поместился на
+      экране.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		 Урок 1.1:  ПЕРЕМЕЩЕНИЕ КУРСОРА
+
+ ** Для перемещения курсора нажмите клавиши
h,j,k,l так, как показано ниже. **
+ 	     ^
+ 	     k  Советы: Клавиша h находится слева и
перемещает влево.
+        < h  l >  Клавиша l находится справа и
перемещает вправо.
+ 	     j 	 Клавиша j похожа на стрелку `вниз'.
+ 	     v
+   1. Подвигайте курсор по экрану, пока не
почувствуете себя уверенно.
+
+   2. Надавите клавишу `вниз' (j) пока она не
начнет повторяться.
+ ---> Теперь Вы знаете, как перейти к
следующему уроку.
+
+   3. Используя клавишу `вниз' перейдите к
Уроку 1.2.
+
+ Замечание: Если вы пока не уверены в том,
что набираете, нажмите <ESC> для
+ 	   перехода в обычный режим (Normal mode). После
этого перенаберите
+ 	   требуемую команду.
+
+ Замечание: Обычные клавиши управления
курсором (стрелки) также должны
+ 	   работать. Однако, клавиши hjkl позволят
Вам перемещаться
+ 	   значительно быстрее, как только Вы
научитесь ими пользоваться.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		  Урок 1.2: ЗАПУСК И ЗАВЕРШЕНИЕ РАБОТЫ С VIM
+
+ !! ВНИМАНИЕ! Прежде, чем выполнять любой из
описанных ниже шагов, прочтите
+ 			       урок целиком !!
+
+   1. Нажмите клавишу <ESC> (для того, чтобы
удостовериться, что Вы в обычном
+      режиме (Normal mode)).
+
+   2. Наберите: 	 :q! <ENTER>.
+
+ ---> Это позволит Вам выйти из редактора БЕЗ
СОХРАНЕНИЯ любых сделанных
+      изменений. Если Вы хотите сохранить
изменения и выйти:
+ 			 :wq  <ENTER>
+
+   3. Когда Вы увидите приглашение командной
оболочки, наберите команду,
+      которая привела Вас в этот учебник. Это
может быть
+ 			 vimtutor ru <ENTER>
+      Обычно можно использовать: vim tutor.ru <ENTER>
+
+ ---> 'vim' позволяет запустить редактор vim,
'tutor.ru' --- это файл, который
+      Вы будете редактировать.
+
+   4. Если Вы уверены в том, что запомнили эти
шаги, выполните шаги от 1 до 3
+      чтобы выйти снова запустить редактор.
Затем переместите курсор вниз к
+      Уроку 1.3.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		  Урок 1.3: РЕДАКТИРОВАНИЕ ТЕКСТА - УДАЛЕНИЕ
+
+
+ ** Находясь в обычном режиме нажмите x,
чтобы удалить символ под курсором. **
+
+   1. Переместите курсор к строке внизу,
помеченной --->.
+
+   2. Для исправления ошибок, переместите
курсор, пока он не окажется над
+      удаляемым символом.
+
+   3. Нажмите клавишу x для удаления
требуемого символа.
+
+   4. Повторите шаги 2--4 пока строка не будет
исправлена.
+
+ ---> От тттопота копытт пппыль ппо ппполю
леттитт.
+
+   5. Теперь, когда строка откорректирована,
переходите к уроку 1.4.
+
+ ЗАМЕЧАНИЕ: В ходе освоения этого учебника
не пытайтесь запоминать, учите
+ 	   в процессе использования.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		  Урок 1.4: РЕДАКТИРОВАНИЕ ТЕКСТА - ВСТАВКА
+
+
+  ** Находясь в обычном режиме (Normal mode),
нажмите i для вставки текста. **
+
+   1. Переместите курсор к первой строке
внизу, помеченной --->.
+
+   2. Для того, чтобы сделать первую строку
идентичной второй, поместите
+      курсор на символ ПЕРЕД которым следует
вставить текст.
+
+   3. Нажмите i и наберите требуемые
добавления.
+
+   4. После исправления всех ошибок нажмите
<ESC> для возврата в обычный режим.
+      Повторите шаги 2--4, пока фраза не будет
исправлена полностью.
+
+ ---> Часть текста в строке беследно .
+ ---> Часть текста в этой строке бесследно
пропала.
+
+   5. Когда освоите вставку текста,
переходите дальше к Резюме.
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 РЕЗЮМЕ УРОКА 1
+
+   1. Курсор перемещается либо клавишами со
стрелками, либо клавишами hjkl.
+ 	 h (влево) j (вниз)       k (вверх)     l (вправо)
+
+   2. Для запуска Vim (из приглашения %
командной оболочки) наберите:
+      vim ИМЯ_ФАЙЛА <ENTER>
+
+   3. Для завершения работы с Vim наберите:
+      <ESC>   :q!  <ENTER>  чтобы отказаться от
сохранения изменений.
+      Или наберите:
+      <ESC>   :wq  <ENTER>  чтобы сохранить изменения.
+
+   4. Для удаления символа под курсором в
обычном режиме, наберите: x
+
+   5. Чтобы вставить текст перед курсором в
обычном режиме, наберите:
+ 	 i     вводите текст <ESC>
+
+ ЗАМЕЧАНИЕ: Нажатие <ESC> переместит Вас в
обычный режим (Normal mode) либо
+ 	   прервет нежелательную и частично
завершенную команду.
+
+ Теперь переходим к Уроку 2.
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			  Урок 2.1: КОМАНДЫ УДАЛЕНИЯ
+
+
+  ** Наберите dw для удаления участка текста
до конца слова. **
+
+   1. Нажмите <ESC>, чтобы перейти в обычный
режим.
+
+   2. Переместите курсор вниз, к строке,
помеченной --->.
+
+   3. Переместите курсор в начало слова,
которое следует удалить.
+
+   4. Наберите  dw , чтобы удалить это слово.
+
+ ЗАМЕЧАНИЕ: Во время набора буквы dw
появятся в последней строке экрана. Если
+ 	   Вы что-то наберете неправильно, нажмите
<ESC> и начните сначала.
+
+ ---> Несколько слов рафинад в этом
предложении автокран излишни.
+
+   5. Повторите шаги 3 и 4, пока не исправите
все ошибки и переходите к
+      Уроку 2.2.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		  Урок 2.2: ДОПОЛНИТЕЛЬНЫЕ КОМАНДЫ УДАЛЕНИЯ
+
+
+ 	    ** Наберите d$ для удаления текста до
конца строки. **
+
+   1. Нажмите <ESC>, чтобы перейти в обычный
режим.
+
+   2. Переместите курсор вниз, к строке,
помеченной --->.
+
+   3. Переместите курсор к концу правильной
строки (ПОСЛЕ первой . ).
+
+   4. Чтобы удалить остаток строки, наберите 
d$ .
+
+ ---> Кто-то набрал окончание этой строки
дважды. окончание этой строки дважды.
+
+
+   5.Чтобы лучше разобраться в этом,
переходите к Уроку 2.3.
+
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 Урок 2.3: КОМАНДЫ И ОБЪЕКТЫ
+
+
+   Формат команды `удаление' d таков:
+
+ 	 [число]   d объект     ИЛИ      d  [число]   объект
+   Здесь:
+     число  - сколько раз исполнить команду
(необязательно, по умолчанию=1).
+     d      - команда удаления.
+     объект - с чем команда должна быть
выполнена (перечислено ниже).
+
+   Краткий список объектов:
+     w - от курсора до конца слова, включая
завершающий пробел.
+     e - от курсора до конца слова, НЕ включая
завершающий пробел.
+     $ - от курсора до конца строки.
+     ^ - от курсора до начала строки.
+
+ ЗАМЕЧАНИЕ: Простое нажатие на символ
объекта в обычном режиме (Normal mode)
+ 	   без дополнительных команд передвинет
курсор так, как указано в
+ 	   списке объектов.
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 	       Урок 2.4: ИСКЛЮЧЕНИЕ ИЗ ПРАВИЛА
`КОМАНДА-ОБЪЕКТ'
+
+
+ 		 ** Наберите dd для удаления всей строки. **
+
+   Вследствие частого применения операции
удаления всей строки, разработчики
+   Vim решили, что для этого проще всего
просто набрать d дважды.
+
+   1. Переместите курсор вниз, ко второй
строке фразы.
+   2. Наберите dd для удаления строки.
+   3. Теперь переместитесь к четвертой
строке.
+   4. Наберите 2dd (вспомните правило
`число-команда-объект'), чтобы удалить
+      две строки.
+
+       1)  Летом я хожу на стадион,
+       2)  О, как внезапно кончился диван!
+       3)  Я болею за ``Зенит'', ``Зенит'' ---
чемпион!
+       4)  Печально я гляжу на наше поколение!
+       5)  Его грядущее иль пусто иль темно...
+       6)  Я сижу на скамейке в ложе `Б'
+       7)  И играю на большой жестяной трубе.
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			  Урок 2.5: КОМАНДА `ОТКАТ'
+
+
+   ** Нажмите u для отмены результата работы
предыдущей команды, U для отмены
+ 		 исправлений во всей строке. **
+
+   1. Переместите курсор вниз, к строке,
помеченной ---> и установите его на
+      первую ошибку.
+   2. Нажмите x для удаления первого
неправильного символа.
+   3. Теперь нажмите u для отмены (отката)
последней выполненной команды.
+   4. Исправьте все ошибки в строке,
используя команду x .
+   5. Теперь нажмите заглавную U для того,
чтобы вернуть всю строку в исходное
+      состояние.
+   6. Нажмите u несколько раз для отмены
команды U и предыдущих команд.
+   7. Нажмите теперь CTRL-R (удерживайте клавишу
CTRL нажатой в момент нажатия
+   R)     несколько раз для возврата команд
(откат отката).
+
+ ---> Испрравьте оошибки в этойй строке и
вернитте их сс помощьью `отката'.
+
+   8. Это были очень полезные команды. Далее
переходите к Резюме Урока 2.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 РЕЗЮМЕ УРОКА 2
+
+
+   1. Для удаления текста от курсора до конца
слова наберите:    dw
+
+   2. Для удаления текста от курсора до конца
строки наберите:    d$
+
+   3. Для удаления всей строки наберите:    dd
+
+   4. Формат команды в обычном режиме имеет
вид:
+
+        [число]   команда   объект     ИЛИ    
команда [число]   объект
+      где:
+        число   - сколько раз повторить
выполнение команды
+        команда - что выполнить, например d для
удаления
+        объект  - на что должна воздействовать
команда, например w (слово),
+ 	 $ (до конца строки), и т.д.
+
+   5. Для отмены (отката) предшествующих
действий наберите:  u (строчная u)
+      Для отмены (отката) всех изменений в
строке наберите:  U (прописная U)
+      Для отмены отката наберите:  CTRL-R
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			  Урок 3.1: КОМАНДА ВСТАВКИ
+
+
+    ** Наберите p для вставки последнего
удаленного текста после курсора. **
+
+   1. Переместите курсор вниз к последней
строке из набора.
+
+   2. Наберите dd для удаления строки и ее
сохранения в буфере Vim'а.
+
+   3. Переместите курсор к строке НАД тем
местом, куда следует вставить
+      удаленную строку.
+
+   4. Находясь в обычном режиме наберите p для
замены строки.
+
+   5. Повторите шаги 2--4, пока не расставите
все строки в нужном порядке.
+
+      г) И лучше выдумать не мог.
+      б) Когда не в шутку занемог,
+      в) Он уважать себя заставил
+      а) Мой дядя самых честных правил
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		       Урок 3.2: КОМАНДА ЗАМЕНЫ
+
+
+ 	  ** Наберите r и символ, заменяющий символ
под курсором. **
+
+   1. Переместите курсор вниз, к строке,
помеченной --->.
+
+   2. Установите курсор так, чтобы он
находился над первой ошибкой.
+
+   3. Наберите r и затем символ, исправляющий
ошибку.
+
+   4. Повторите шаги 2 и 3, пока первая строка
не будет исправлена.
+
+ --->  В момегт набтра этой чтроки кое0кто с
трудом попвдал по клваишам!
+ --->  В момент набора этой строки кое-кто с
трудом попадал по клавишам!
+
+   5. Теперь переходите к Уроку 3.2.
+
+ ЗАМЕЧАНИЕ: Помните, что вы должны учиться в
процессе работы, а не просто
+ 	   запоминая.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 Урок 3.3: КОМАНДА ИЗМЕНЕНИЯ
+
+
+ 	 ** Для изменения части слова наберите cw . **
+
+   1. Переместите курсор вниз, к строке,
помеченной --->.
+
+   2. Расположите курсор над буквой `o' в слове
`сола'.
+
+   3. Наберите cw и исправьте слово (в данном
случае, наберите `лов'.)
+
+   4. Нажмите <ESC> и переходите к следующей
ошибке (к первому символу, который
+      надо изменить.)
+
+   5. Повторите шаги 3--4 пока первое
предложение не станет идентичным второму.
+
+ ---> Несколько сола в эьгц строке тпгшцбь
редалзкуюиесвх.
+ ---> Несколько слов в этой строке требуют
редактирования.
+
+ Обратите внимание, что cw не только
заменяет слово, но и переводит вас в режим
+ вставки.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		  Урок 3.4: ПРОДОЛЖАЕМ ИЗМЕНЯТЬ С КОМАНДОЙ c
+
+
+ ** Команда замены используется с теми же
объектами, что и команда удаления. **
+
+   1. Команда изменения применяется таким же
образом, как и команда удаления.
+      Ее формат таков:
+
+        [число]   c   объект    ИЛИ     c [число]  
объект
+
+   2. Объекты также совпадают: w (слово), $
(конец строки) и т.п.
+
+   3. Переместите курсор вниз, к строке,
помеченной --->.
+
+   4. Перейдите к первой ошибке.
+
+   5. Наберите c$ и отредактируйте первую
строку так, чтобы она совпадала со
+      второй, после чего нажмите <ESC>.
+
+ ---> Конец этой строки нуждается в помощи,
чтобы стать похожим на второй.
+ ---> Конец этой строки нуждается в помощи
команды c$ .
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 РЕЗЮМЕ УРОКА 3
+
+
+   1. Для вставки текста, который только что
был удален, наберите p . Эта
+      команда вставит удаленный текст ПОСЛЕ
курсора (если была удалена строка,
+      то она будет помещена в строке под
курсором).
+
+   2. Для замены символа под курсором
наберите r и затем заменяющий символ.
+
+   3. Команда изменения позволяет Вам
изменить указанный объект от курсора до
+      конца этого объекта. Например, наберите
cw для замены от курсора до
+      конца слова, c$ для изменения до конца
строки.
+
+   4. Формат команды изменения таков:
+
+ 	 [число]   c объект       ИЛИ c   [число]   объект
+
+ Теперь отправляйтесь к следующему уроку.
+
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 	      Урок 4.1: ИНФОРМАЦИЯ О ФАЙЛЕ И
РАСПОЛОЖЕНИЕ В НЕМ
+
+
+  ** Наберите CTRL-g чтобы увидеть Ваше
месторасположение в файле и информацию
+ 				    о нем.
+  Наберите SHIFT-G для перемещения к заданной
строке в файле. **
+
+   Замечание: Прочитайте весь урок прежде
чем выполнять любые команды!!
+
+   1. Удерживая клавишу Ctrl нажмите g . Внизу
экрана появится строка статуса с
+      именем файла и номером строки, в которой
Вы находитесь. Запомните номер
+      строки, он потребуется на Шаге 3.
+
+   2. Нажмите shift-G для перемещения к концу
файла.
+
+   3. Наберите номер строки, в которой вы
находились и затем shift-G. Это
+      вернет Вас к строке, в которой Вы были,
когда в первый раз нажали Ctrl-g.
+      (Когда Вы будете набирать цифры, они НЕ
отобразятся на экране.)
+
+   4. Если Вы запомнили все вышесказанное,
выполните шаги 1--3.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			   Урок 4.2: КОМАНДА ПОИСКА
+
+ 	      ** Наберите  /  и затем введите искомую
фразу. **
+
+   1. В обычном режиме (Normal mode) наберите
символ  / . Обратите внимание,
+      что он вместе с курсором появится внизу
экрана, как это происходит с
+      командой : .
+
+   2. Теперь наберите 'ошшшибка' <ENTER>. Это то
слово, которое Вы будете
+      искать.
+
+   3. Для того, чтобы повторить поиск, просто
нажмите n .
+      Для поиска этой фразы в обратном
направлении, нажмите Shift-N .
+
+   4. Если Вы желаете сразу искать в обратном
направлении, используйте
+      команду ? вместо / .
+
+ ---> Когда Вы при поиске достигнете конца
файла, поиск будет продолжен с
+      начала.
+
+   "ошшшибка" это не способ произнесения
слова `ошибка';  ошшшибка это ошибка.
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		 Урок 4.3: ПОИСК ПАРНЫХ СКОБОК
+
+
+ 	 ** Наберите % для поиска парных ),] или } . **
+
+   1. Поместите курсор над любой из (, [ или { в
строке внизу, помеченной --->.
+
+   2. Теперь наберите символ % .
+
+   3. Курсор должен перескочить на парную
скобку.
+
+   4. Наберите % для возврата курсора назад к
первой скобке.
+
+ ---> Это ( строка, содержащая такие (, такие [ ]
и такие { } скобки. ))
+
+ Замечание: Это очень удобно при отладке
программ с пропущенными скобками!
+
+
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		      Урок 4.4: СПОСОБ ИСПРАВЛЕНИЯ ОШИБОК
+
+
+ 	 ** Наберите :s/было/стало/g для замены 'было'
на 'стало'. **
+
+   1. Переместите курсор вниз, к строке,
помеченной --->.
+
+   2. Наберите :s/уводю/увожу <ENTER> . Обратите
внимание на то, что эта команда
+      заменит только первое найденное
вхождение в строке.
+
+   3. Теперь наберите :s/уводю/увожу/g ,
означающее подстановку глобально во
+      всей строке. Это заменит все найденные в
строке вхождения.
+
+ ---> Я уводю к отверженным селеньям, я уводю
сквозь вековечный стон, я уводю к
+      забытым поколеньям.
+
+   4. Для замены всех вхождений
последовательности символов между двумя
+      строками,
+      наберите :#,#s/было/стало/g  где #,# --- номера
этих строк.
+      Наберите :%s/было/стало/g    для замены
всех вхождений во всем файле.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 РЕЗЮМЕ УРОКА 4
+   1. Ctrl-g показывает ваше положение в файле и
информацию о нем.
+      Shift-G перемещает Вас в конец файла. Номер,
за которым следует Shift-G
+      позволяет перейти к строке с этим
номером.
+
+   2. Нажатие / и затем ввод строки позволяет
произвести поиск этой строки
+      ВПЕРЕД по тексту.
+      Нажатие ? и затем ввод строки позволяет
произвести поиск этой строки
+      НАЗАД по тексту.
+      После поиска наберите n для перехода к
следующему вхождению искомой
+      строки в том же направлении или Shift-N для
перехода в противоположном
+      направлении.
+
+   3. Нажатие % , когда курсор находится на
(,),[,],{, или } позволяет найти
+      парную скобку.
+
+   4. Для подстановки `стало' вместо первого
`было' в строке, наберите
+      :s/old/new
+      Для подстановки `стало' вместо всех
`было' в строке, наберите
+      :s/old/new/g
+      Для замены в интервале между двумя
строками, наберите
+      :#,#s/old/new/g
+      Для замены всех вхождений `было' на
`стало' в файле, наберите
+      :%s/old/new/g
+      Чтобы редактор каждый раз запрашивал
подтверждение, добавьте 'c'
+      :%s/old/new/gc
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		   Урок 5.1: КАК ВЫПОЛНИТЬ ВНЕШНЮЮ КОМАНДУ
+
+
+     ** Наберите :! и затем внешнюю команду,
которую следует выполнить. **
+
+   1. Наберите уже знакомую Вам команду : для
установки курсора в командную
+      строку редактора. Это позволит Вам
ввести команду.
+
+   2. Теперь наберите символ !
(восклицательный знак). Теперь можно
исполнить
+      внешнюю команду, используя командную
оболочку.
+
+   3. Для примера наберите ls после ! и нажмите
<ENTER>. Эта команда выведет
+      список файлов в текущем каталоге, точно
также, как если бы Вы ввели эту
+      команду в приглашении оболочки. Или
попробуйте :!dir , если предыдущая
+      команда не сработала.
+
+ ---> Замечание: Таким способом можно
выполнить любую внешнюю команду.
+
+ ---> Замечание: Все команды, начинающиеся с :
, должны завершаться нажатием
+      <ENTER>.
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 Урок 5.2: КАК ЗАПИСАТЬ ФАЙЛ
+
+
+ ** Для сохранения изменений, произведенных
в файле, наберите :w ИМЯ_ФАЙЛА. **
+
+   1. Наберите :!dir или :!ls для получения списка
файлов в текущем каталоге.
+      Как Вам уже известно, Вы должны нажать
<ENTER> после ввода этих команд.
+
+   2. Придумайте название для файла, которое
еще не существует, например TEST.
+
+   3. Теперь наберите :w TEST (где TEST --- это имя
файла, придуманное Вами.)
+
+   4. Эта команда сохранит весь файл (Учебник
по Vim) под именем TEST. Чтобы
+      удостовериться в этом, снова наберите
:!dir и просмотрите каталог.
+
+ ---> Заметьте, что если Вы выйдете из Vim и
затем запустите его снова с
+      файлом TEST, этот файл будет точной копией
учебника в тот момент, когда
+      Вы его сохранили.
+
+   5. Теперь удалите этот файл, набрав :!del TEST
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		       Урок 5.3: ВЫБОРОЧНОЕ СОХРАНЕНИЕ
+
+
+ 	 ** Для сохранения части файла, наберите :#,#
w ИМЯ_ФАЙЛА **
+
+   1. Еще раз наберите :!dir или :!ls для
получения списка файлов в текущем
+      каталоге и выберите подходящее имя,
например TEST.
+
+   2. Переместите курсор к началу этой
страницы и нажмите Ctrl-g для нахождения
+      номера строкиto. ЗАПОМНИТЕ ЭТОТ НОМЕР!
+
+   3. Теперь переместитесь в конец страницы и
вновь наберите Ctrl-g. ЗАПОМНИТЕ
+      И ЭТОТ НОМЕР ТОЖЕ!
+
+   4. Для сохранения ТОЛЬКО ЧАСТИ файла
наберите :#,# w TEST , где #,# --- это
+      номера, которые Вы запомнили (начало,
конец), а TEST --- имя вашего файла.
+
+   5. Как и прежде, убедитесь в наличии этого
файла командой :!dir , но НЕ
+      УДАЛЯЙТЕ его.
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		    Урок 5.4: ЧТЕНИЕ И ОБЪЕДИНЕНИЕ ФАЙЛОВ
+
+ 	  ** Для вставки содержимого файла,
наберите  :r FILENAME **
+
+   1. Наберите :!dir для того, чтобы убедиться в
том, что файл TEST все еще
+      существует.
+
+   2. Установите курсор в верхней части этой
страницы.
+
+ Замечание: После выполнения шага 3 Вы
увидите Урок 5.3. После этого
+ 	   перемещайтесь ВНИЗ, снова к этому уроку.
+
+   3. Теперь прочитайте Ваш файл TEST,
используя команду :r TEST , где
+      TEST --- это имя файла.
+
+ Замечание: Прочитанный Вами файл будет
вставлен в том месте, где находится
+ 	   курсор.
+
+   4. Чтобы убедиться в том, что файл
прочитан, переместитесь немного назад по
+      тексту и заметьте, что теперь
существуют две копии Урока 5.3, исходная
+      и полученная из файла.
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 РЕЗЮМЕ УРОКА 5
+
+
+   1.  :!команда  исполняет внешнюю команду.
+
+       Некоторые полезные примеры:
+ 	  :!dir --- выводит список файлов в каталоге.
+ 	  :!del FILENAME --- удаляет файл FILENAME.
+
+   2.  :w FILENAME записывает текущий
редактируемый файл на диск
+       под именем FILENAME.
+
+   3.  :#,#w FILENAME сохраняет строки от # до # в файл
FILENAME.
+
+   4.  :r FILENAME считывает с диска файл FILENAME и
помещает его в текущий
+       файл следом за позицией курсора.
+
+
+
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			  Урок 6.1: КОМАНДА СОЗДАНИЯ
+
+
+  ** Наберите o чтобы создать пустую строку
под курсором и перейти в режим
+ 			   вставки (Insert mode) **
+
+   1. Переместите курсор вниз, к строке,
помеченной --->.
+
+   2. Наберите o (в нижнем регистре) для того,
чтобы создать пустую строку
+      НИЖЕ курсора и перейти в режим вставки
(Insert mode).
+
+   3. Теперь скопируйте помеченную ---> строку
и нажмите <ESC> для выхода из
+      режима вставки.
+
+ ---> После нажатия o курсор перейдет на новую
пустую строку в режиме вставки.
+
+   4. Для создания строки ВЫШЕ курсора,
просто наберите заглавную O, вместо
+      строчной o. Попробуйте проделать это с
нижеследующей строкой.
+ Создайте новую строку над этой, нажав Shift-O,
поместив курсор на эту строку.
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 Урок 6.2: КОМАНДА ДОБАВЛЕНИЯ
+
+ 	    ** Наберите a , чтобы вставить текст ПОСЛЕ
курсора. **
+
+   1. Переместите курсор вниз, в конец первой
строки, помеченной ---> ,
+      набрав $ в обычном режиме (Normal mode).
+
+   2. Наберите a (в нижнем регистре) для
добавления текста ПОСЛЕ символа,
+      находящегося под курсором. (Заглавная A
позволяет добавить в конец
+      строки.)
+
+ Замечание: Это позволяет избежать нажатия
i , последнего символа, текста для
+ 	   вставки, <ESC>, курсор-вправо, и, наконец, x ,
просто для того,
+ 	   чтобы добавить тест в конец строки!
+
+   3. Теперь завершите первую строку.
Заметьте также, что добавление это в
+      точности то же самое, что и режим
вставки, за исключением позиции, в
+      которую будет вставлен текст.
+
+ ---> Эта строчка позволит Вам
попрактиковаться
+ ---> Эта строчка позволит Вам
попрактиковаться в добавлении текста в
конец
+      строки.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		       Урок 6.3: ЕЩЕ ОДИН СПОСОБ ЗАМЕНЫ
+
+
+        ** Наберите заглавную R для замены
более, чем одного символа. **
+
+   1. Переместите курсор вниз, к строке,
помеченной --->.
+
+   2. Расположите курсор в начале первого
слова, отличающегося от
+      соответствующего в следующей строке,
помеченной ---> (слово 'последней').
+
+   3. Теперь наберите R и замените остаток
текста в первой строке, набрав
+      поверх старого текста так, чтобы обе
строки стали одинаковыми.
+
+ ---> Первую строку можно сравнять с
последней, используя клавиши.
+ ---> Первую строку можно сравнять с второй,
используя R и набрав новый текст.
+
+   4. Обратите внимание, что при нажатии <ESC>
для завершения, любой
+      не измененный текст сохранится.
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		 Урок 6.4: УСТАНОВКА ПАРАМЕТРОВ
+
+
+ ** Установим параметры так, чтобы
игнорировать регистр при поиске или замене
**
+
+
+   1. Поищите слово 'игнорировать', набрав:
+      /игнорировать
+      Повторите поиск несколько раз, нажимая
клавишу n
+
+   2. Включите параметр 'ic' (Игнорировать
регистр), набрав:
+      :set ic
+
+   3. Теперь снова сделайте поиск слова
'игнорировать', нажав: n
+      Повторите поиск несколько раз, нажимая
клавишу n
+
+   4. Включите параметры 'hlsearch' и 'incsearch':
+      :set hls is
+
+   5. Теперь опять введите команду поиска и
посмотрите, что получится:
+      /игнорировать
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 			 РЕЗЮМЕ УРОКА 6
+
+
+   1. Нажатие o создает строку НИЖЕ курсора и
перемещает курсор в нее в режиме
+      вставки.
+      Нажатие заглавной O создает строку ВЫШЕ
строки, в которой находится
+      курсор.
+
+   2. Наберите a для вставки текста ПОСЛЕ
символа, на котором находится курсор.
+      Нажатие заглавной A автоматически
перемещает Вас для добавления текста
+      в конец строки.
+
+   3. Нажатие заглавной R переводит Вас в
режим замены до тех пор, пока не
+      будет нажата клавиша <ESC> для завершения.
+
+   4. Набрав ":set xxx" вы сможете включить
параметр "xxx"
+
+
+
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		 Урок 7: КОМАНДЫ ПОЛУЧЕНИЯ ВСТРОЕННОЙ
СПРАВКИ
+
+ 	       ** Используйте встроенную справочную
систему **
+
+   Vim обладает мощной встроенной справочной
системой. Для начала попробуйте
+   один из трех вариантов:
+  - нажмите клавишу <HELP> (если таковая
имеется на клавиатуре)
+  - нажмите клавишу <F1> (если таковая имеется
на клавиатуре)
+  - наберите   :help <ENTER>
+
+   Наберите   :q <ENTER>   чтобы закрыть окно
справки.
+
+   Вы можете найти справку для любого
понятия или команды, просто задав
+   соответствующий аргумент команде ":help".
Попробуйте следующее (не забудьте
+   нажать <ENTER>):
+
+   :help w
+   :help c_<T
+   :help insert-index
+
+
+
+
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 		     Урок 8: СОЗДАНИЕ СТАРТОВОГО СКРИПТА
+
+ 		 ** Включим возможности Vim **
+
+   Vim имеет намного больше возможностей, чем
Vi, однако большинствао из них
+   выключены по умолчанию. Для того, чтобы
начать использовать новые
+   возможности Вам следует создать файл
"vimrc".
+
+   1. Отредактируйте файл "vimrc", его
расположение зависит от используемой
+      системы:
+
+        :edit ~/.vimrc 	 для Unix
+        :edit $VIM/_vimrc  для MS-Windows
+
+   2. Теперь прочитайте пример файла "vimrc":
+
+        :read $VIMRUNTIME/vimrc_example.vim
+
+   3. Запишите файл:
+
+        :write
+
+   Теперь при следующем запуске Vim будет
включена подсветка синтаксиса. Все
+   настройки, предпочитаемые Вами, могут
быть добавлены в файл "vimrc".
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   На этом завершается Учебник Vim. Он был
предназначен для того, чтобы дать
+   общее представление о редакторе Vim,
достаточное для того, чтобы с легкостью
+   использовать его. Учебник далек от
полноты, поскольку Vim имеет очень много
+   команд. Прочитайте теперь руководство
пользователя: ":help user-manual".
+
+   Для дальнейшего чтения рекомендуется
книга:
+  Vim - Vi Improved - Автор: Steve Oualline
+  Издатель: New Riders
+   Эта книга полностью посвящена Vim.
Особенно полезна новичкам. Содержит
+   множество примеров и иллюстраций.
+   Взгляните на See http://iccf-holland.org/click5.html
+
+   Следующая книга более почтенного
возраста и посвящена больше Vi, чем Vim,
+   однако также рекомендуется:
+  Learning the Vi Editor - Автор: Linda Lamb
+  Издатель: O'Reilly & Associates Inc.
+   Это хорошая книга для того, чтобы узнать
все, что только можно проделывать с
+   Vi. Шестое издание также включает
информацию о Vim.
+
+   Этот учебник был написан Michael C. Pierce и Robert K.
Ware, Colorado School
+   of Mines с использованием идей, предложенных
Charles Smith, Colorado State
+   University. E-mail: bware@....
+
+   Доработано для Vim Bram Moolenaar.
+
+   Перевод: Андрей Киселев <a_kissel@...>, 2002.
+   Translator: Andrey Kiselev <a_kissel@...>, 2002.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** ../vim-7.0.079/src/version.c Sat Sep  2 14:53:09 2006
--- src/version.c Sat Sep  2 14:20:15 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     79,
   /**/

--
Eight Megabytes And Continually Swapping.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44742 From: "Alexey I. Froloff" <raorn@...>
Date: Sat Sep 2, 2006 1:24 pm
Subject: Re: [PATCH] russian vimtutor is b0rken in UTF-8 locale
raorn@...
Send Email Send Email
 
* Bram Moolenaar <Bram@> [060902 16:23]:
> Thanks.  I notice you rename tutor.ru to tutor.ru.koi8.  Is there
> anything against keeping the old name?
It's because "tutor.ru" is "default" file.  Now there's no such
thing like "default russian encoding".  I think it's better check
if current locale is supported and fall back to english if not.
Maybe I'm a little paranoid ;-)

> Just to avoid a big diff that doesn't change much.
Well, first version will work now without changing much.  Second
version was supposed to be included in next "tarballed" version.

--
Regards,
Sir Raorn.

#44743 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 2:37 pm
Subject: Patch 7.0.080
Bram@...
Send Email Send Email
 
Patch 7.0.080
Problem:    Generating auto/pathdef.c fails for CFLAGS with a backslash.
Solution:   Double backslashes in the string. (Alexey Froloff)
Files:     src/Makefile


*** ../vim-7.0.079/src/Makefile Sat Sep  2 15:31:29 2006
--- src/Makefile Fri Sep  1 21:00:29 2006
***************
*** 2261,2267 ****
   auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
  	 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh

! QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
   auto/pathdef.c: Makefile auto/config.mk
  	 -@echo creating $@
  	 -@echo '/* pathdef.c */' > $@
--- 2262,2268 ----
   auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
  	 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh

! QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
   auto/pathdef.c: Makefile auto/config.mk
  	 -@echo creating $@
  	 -@echo '/* pathdef.c */' > $@
*** ../vim-7.0.079/src/version.c Sat Sep  2 14:54:17 2006
--- src/version.c Sat Sep  2 16:35:50 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     80,
   /**/

--
E  M  A  C  S
s  e  l  o  h
c  t  t  n  i
a  a     t  f
p        r  t
e        o
          l

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44744 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 3:59 pm
Subject: Patch 7.0.081
Bram@...
Send Email Send Email
 
Patch 7.0.081
Problem:    Command line completion doesn't work for a shell command with an
	     absolute path.
Solution:   Don't use $PATH when there is an absolute path.
Files:     src/ex_getln.c


*** ../vim-7.0.080/src/ex_getln.c Wed Aug 16 16:24:58 2006
--- src/ex_getln.c Sat Sep  2 17:51:03 2006
***************
*** 4521,4527 ****
       flags |= EW_FILE | EW_EXEC;

       /* For an absolute name we don't use $PATH. */
!     if ((pat[0] == '.' && (vim_ispathsep(pat[1])
  			     || (pat[1] == '.' && vim_ispathsep(pat[2])))))
  	 path = (char_u *)".";
       else
--- 4521,4529 ----
       flags |= EW_FILE | EW_EXEC;

       /* For an absolute name we don't use $PATH. */
!     if (mch_isFullName(pat))
!  path = (char_u *)" ";
!     else if ((pat[0] == '.' && (vim_ispathsep(pat[1])
  			     || (pat[1] == '.' && vim_ispathsep(pat[2])))))
  	 path = (char_u *)".";
       else
***************
*** 4534,4539 ****
--- 4536,4544 ----
       ga_init2(&ga, (int)sizeof(char *), 10);
       for (s = path; *s != NUL; s = e)
       {
+  if (*s == ' ')
+ 	    ++s; /* Skip space used for absolute path name. */
+
   #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
  	 e = vim_strchr(s, ';');
   #else
*** ../vim-7.0.080/src/version.c Sat Sep  2 16:36:46 2006
--- src/version.c Sat Sep  2 17:54:35 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     81,
   /**/

--
TALL KNIGHT OF NI: Ni!
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44745 From: Gautam Iyer <gautam@...>
Date: Sat Sep 2, 2006 4:50 pm
Subject: Re: vim mailing lists
gautam@...
Send Email Send Email
 
On Fri, Sep 01, 2006 at 10:18:35PM +0200, Bram Moolenaar wrote:

> > > > > Apparently the sorbs blacklist mechanism is still being used, causing
> > > > > trouble for some people.  I have asked the mail server maintainer to
> > > > > remove sorbs a few times now...
> > > >
> > > > Twice recently, sorbs has bounced my mails to the list because some
> > > > server between my ISP and the vim-dev list is on its blacklist.
> > > >
> > > > Do you have any plans to move the vim mailing lists to a new server,
> > > > where you (or someone more responsive) has administrative control?
> > >
> > > The plan was to move the maillists to the server that is now already the
> > > Vim mail server.  And the one causing this blacklist trouble...
> > >
> > > There is no progress in moving the maillists.  I suppose it's time to
> > > find a better place for the Vim mail server.  Instead of a server that
> > > just happens to be available and run by someone who doesn't always
> > > respond, or some big and anonymous server park like Yahoo, I think we
> > > should look for a small site that does have 24 hour support.
> >
> > How about the sourceforge mailing lists? I know sourceforge has had
> > numerous failures in the past. But I think their mailing lists might be
> > OK.
>
> Features missing (at least):
> - When someone is not subscribed the message should bounce, not sent to
>   the maillist owner.  (I have to manually remove spam stuff from the
>   a-a-p lists regularly).
> - Messages with just HTML, executable attachments etc. should be
>   bounced.  These rules must be configurable.
> - Loading all the old messages into the archive, so that searches find
>   them.

Bram,

I just set up a new mailing list on SF. I think the above features are
there on the version of mailman they just installed.

Gautam

--
'Fortissimoe' -- The musical moment produced when someone serially slaps
the faces of the first violin section.

#44746 From: Bram Moolenaar <Bram@...>
Date: Sat Sep 2, 2006 6:45 pm
Subject: Re: vim mailing lists
Bram@...
Send Email Send Email
 
Gautam Iyer wrote:

> On Fri, Sep 01, 2006 at 10:18:35PM +0200, Bram Moolenaar wrote:
>
> > > > > > Apparently the sorbs blacklist mechanism is still being used,
causing
> > > > > > trouble for some people.  I have asked the mail server maintainer to
> > > > > > remove sorbs a few times now...
> > > > >
> > > > > Twice recently, sorbs has bounced my mails to the list because some
> > > > > server between my ISP and the vim-dev list is on its blacklist.
> > > > >
> > > > > Do you have any plans to move the vim mailing lists to a new server,
> > > > > where you (or someone more responsive) has administrative control?
> > > >
> > > > The plan was to move the maillists to the server that is now already the
> > > > Vim mail server.  And the one causing this blacklist trouble...
> > > >
> > > > There is no progress in moving the maillists.  I suppose it's time to
> > > > find a better place for the Vim mail server.  Instead of a server that
> > > > just happens to be available and run by someone who doesn't always
> > > > respond, or some big and anonymous server park like Yahoo, I think we
> > > > should look for a small site that does have 24 hour support.
> > >
> > > How about the sourceforge mailing lists? I know sourceforge has had
> > > numerous failures in the past. But I think their mailing lists might be
> > > OK.
> >
> > Features missing (at least):
> > - When someone is not subscribed the message should bounce, not sent to
> >   the maillist owner.  (I have to manually remove spam stuff from the
> >   a-a-p lists regularly).
> > - Messages with just HTML, executable attachments etc. should be
> >   bounced.  These rules must be configurable.
> > - Loading all the old messages into the archive, so that searches find
> >   them.
>
> Bram,
>
> I just set up a new mailing list on SF. I think the above features are
> there on the version of mailman they just installed.

I do notice there is now an option to reject posts from non-members,
instead of sending them to the list owner for approval.

I don't see a setting for rejecting HTML-only messages or messages with
executable attachments.

I don't see how to fill the archive from an existing archive.

--
    An extraordinary TALL KNIGHT in all black (possibly John with Mike on his
    shoulders) walks out from the dark trees.  He is extremely fierce and
    gruesome countenance.  He walks towards KING ARTHUR and PATSY, who are
    wazzing like mad.  (Salopian slang, meaning very scared.  almost to the
    point of wetting oneself, e.g. before an important football match or
    prior to a postering.  Salopian slang meaning a beating by the school
    praeposters.  Sorry about the Salopian slant to this stage direction - Ed.)
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44747 From: "Yegappan Lakshmanan" <yegappanl@...>
Date: Sun Sep 3, 2006 6:23 am
Subject: BufWinEnter autocmd is not invoked when splitting a window
yegappanl@...
Send Email Send Email
 
Hi all,

The BufWinEnter autocmd is not invoked when splitting a window.
According to the help for the BufWinEnter autocmd, this autocmd
is invoked when a buffer is displayed in a window.

For example, use the following autocmd:

    au BufWinEnter * echomsg "Entering buffer " . expand("<afile>")

With the above autocmd, if you execute the following commands:

     :e <somefile>
     :split

The BufWinEnter autocmd is not invoked for the new window.

But if you use the following commands, then the BufWinEnter autocmd
is invoked:

     :e <somefile>
     :split <somefile>

- Yegappan

#44748 From: Bram Moolenaar <Bram@...>
Date: Sun Sep 3, 2006 10:53 am
Subject: Re: BufWinEnter autocmd is not invoked when splitting a window
Bram@...
Send Email Send Email
 
Yegappan Lakshmanan wrote:

> The BufWinEnter autocmd is not invoked when splitting a window.
> According to the help for the BufWinEnter autocmd, this autocmd
> is invoked when a buffer is displayed in a window.
>
> For example, use the following autocmd:
>
>    au BufWinEnter * echomsg "Entering buffer " . expand("<afile>")
>
> With the above autocmd, if you execute the following commands:
>
>     :e <somefile>
>     :split
>
> The BufWinEnter autocmd is not invoked for the new window.

The BufWinEnter event is normally used to set window-local options for
the file being edited.  When you split a window you get all the option
settings from the existing window.  Thus it's really a split, you don't
get another buffer in a window.

> But if you use the following commands, then the BufWinEnter autocmd
> is invoked:
>
>     :e <somefile>
>     :split <somefile>

Vim doesn't check if the filename argument of :split happens to be the
same as what is already being edited, thus it assumes it is another
file and BufWinEnter is triggered.  The file is reloaded too.

--
TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
ARTHUR:      All right!  What do you want?
TALL KNIGHT: We want ... a shrubbery!
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44749 From: Bram Moolenaar <Bram@...>
Date: Sun Sep 3, 2006 1:41 pm
Subject: Patch 7.0.082
Bram@...
Send Email Send Email
 
Patch 7.0.082
Problem:    Calling a function that waits for input may cause List and
	     Dictionary arguments to be freed by the garbage collector.
Solution:   Keep a list of all arguments to internal functions.
Files:     src/eval.c


*** ../vim-7.0.081/src/eval.c Sat Sep  2 13:45:01 2006
--- src/eval.c Sun Sep  3 15:36:10 2006
***************
*** 248,253 ****
--- 248,264 ----
   };

   /*
+  * Struct used to make a list of all arguments used in internal functions.
+  */
+ typedef struct av_list_item_S av_list_item_T;
+ struct av_list_item_S {
+     av_list_item_T  *avl_next;
+     typval_T     *avl_argvars;
+ };
+
+ av_list_item_T *argvars_list = NULL;
+
+ /*
    * Info used by a ":for" loop.
    */
   typedef struct
***************
*** 6058,6063 ****
--- 6069,6075 ----
       int  i;
       funccall_T *fc;
       int  did_free = FALSE;
+     av_list_item_T *av;
   #ifdef FEAT_WINDOWS
       tabpage_T *tp;
   #endif
***************
*** 6094,6099 ****
--- 6106,6116 ----
  	 set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID);
       }

+     /* arguments for internal functions */
+     for (av = argvars_list; av != NULL; av = av->avl_next)
+  for (i = 0; av->avl_argvars[i].v_type != VAR_UNKNOWN; ++i)
+ 	    set_ref_in_item(&av->avl_argvars[i], copyID);
+
       /*
        * 2. Go through the list of dicts and free items without the copyID.
        */
***************
*** 7537,7545 ****
--- 7554,7574 ----
  		     error = ERROR_TOOMANY;
  		 else
  		 {
+ 		    av_list_item_T  av_list_item;
+
+ 		    /* Add the arguments to the "argvars_list" to avoid the
+ 		     * garbage collector not seeing them.  This isn't needed
+ 		     * for user functions, because the arguments are available
+ 		     * in the a: hashtab. */
+ 		    av_list_item.avl_argvars = argvars;
+ 		    av_list_item.avl_next = argvars_list;
+ 		    argvars_list = &av_list_item;
+
  		     argvars[argcount].v_type = VAR_UNKNOWN;
  		     functions[i].f_func(argvars, rettv);
  		     error = ERROR_NONE;
+
+ 		    argvars_list = av_list_item.avl_next;
  		 }
  	     }
  	 }
*** ../vim-7.0.081/src/version.c Sat Sep  2 17:58:36 2006
--- src/version.c Sun Sep  3 15:35:16 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     82,
   /**/

--
Just think of all the things we haven't thought of yet.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44750 From: Bram Moolenaar <Bram@...>
Date: Sun Sep 3, 2006 2:40 pm
Subject: Patch 7.0.083
Bram@...
Send Email Send Email
 
Patch 7.0.083
Problem:    Clicking with the mouse on an item for inputlist() doesn't work
	     when 'compatible' is set and/or when 'cmdheight' is more than one.
	     (Christian J.  Robinson)
Solution:   Also decrement "lines_left" when 'more' isn't set.  Set
	     "cmdline_row" to zero to get all mouse events.
Files:     src/message.c, src/misc1.c


*** ../vim-7.0.082/src/message.c Sat May 13 13:12:49 2006
--- src/message.c Sun Sep  3 14:32:00 2006
***************
*** 1925,1931 ****
  	      * If screen is completely filled and 'more' is set then wait
  	      * for a character.
  	      */
! 	    if (p_more && --lines_left == 0 && State != HITRETURN
  					     && !msg_no_more && !exmode_active)
  	     {
   #ifdef FEAT_CON_DIALOG
--- 1925,1932 ----
  	      * If screen is completely filled and 'more' is set then wait
  	      * for a character.
  	      */
! 	    --lines_left;
! 	    if (p_more && lines_left == 0 && State != HITRETURN
  					     && !msg_no_more && !exmode_active)
  	     {
   #ifdef FEAT_CON_DIALOG
*** ../vim-7.0.082/src/misc1.c Tue Aug 15 22:26:04 2006
--- src/misc1.c Sun Sep  3 16:33:48 2006
***************
*** 3196,3209 ****
       else
  	 MSG_PUTS(_("Choice number (<Enter> cancels): "));

!     /* Set the state such that text can be selected/copied/pasted. */
       save_cmdline_row = cmdline_row;
!     cmdline_row = Rows - 1;
       save_State = State;
!     if (mouse_used == NULL)
!  State = CMDLINE;
!     else
!  State = NORMAL;

       i = get_number(TRUE, mouse_used);
       if (KeyTyped)
--- 3196,3207 ----
       else
  	 MSG_PUTS(_("Choice number (<Enter> cancels): "));

!     /* Set the state such that text can be selected/copied/pasted and we still
!      * get mouse events. */
       save_cmdline_row = cmdline_row;
!     cmdline_row = 0;
       save_State = State;
!     State = CMDLINE;

       i = get_number(TRUE, mouse_used);
       if (KeyTyped)
*** ../vim-7.0.082/src/version.c Sun Sep  3 15:38:02 2006
--- src/version.c Sun Sep  3 16:36:58 2006
***************
*** 668,669 ****
--- 668,671 ----
   {   /* Add new patch number below this line */
+ /**/
+     83,
   /**/

--
        "To whoever finds this note -
        I have been imprisoned by my father who wishes me to marry
        against my will.  Please please please please come and rescue me.
        I am in the tall tower of Swamp Castle."
    SIR LAUNCELOT's eyes light up with holy inspiration.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

#44751 From: Bram Moolenaar <Bram@...>
Date: Sun Sep 3, 2006 2:48 pm
Subject: Re: Patch 7.0.082
Bram@...
Send Email Send Email
 
I wrote:

> Patch 7.0.082
> Problem:    Calling a function that waits for input may cause List and
> 	    Dictionary arguments to be freed by the garbage collector.
> Solution:   Keep a list of all arguments to internal functions.
> Files:     src/eval.c

I vaguely recall that some people were having unreproducible crashes
when using input() or inputlist().  This patch should solve that.

What happened was that the garbage collector didn't see the arguments to
internal functions, thus would free List and Dict arguments that are
still in use.  That leads to a double free later.  The garbage collector
only does it's work when the user doesn't type for a little while, that
made it unpredictable when it would happen.

--
Even got a Datapoint 3600(?) with a DD50 connector instead of the
usual DB25...  what a nightmare trying to figure out the pinout
for *that* with no spex...

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Messages 44722 - 44751 of 71395   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help