Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vim · Vim (Vi IMproved) text editor users list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 49781 - 49810 of 137733   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#49781 From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
Date: Sat May 1, 2004 7:40 am
Subject: Proposed bugfix for help
antoine.mechelynck@...
Send Email Send Email
 
From: "Antoine J. Mechelynck" < antoine.mechelynck@... >
To: bram@... (recipient for action)
Cc: vim@... (recipients for info)

Bug: Code examples given in help should in many cases go through all the
directories in 'runtimepath' rather than only $VIMRUNTIME.

Fix: Replace (where needed) ":source $VIMRUNTIME/" by ":runtime! "

NB: I constructed the following "patch" by hand, using helpgrep but not
diff. Its format might be slightly different from what your patch program
expects. My distribution is 6.2.494, which is recent, but not quite the
latest, so in some cases you might have to adjust line numbers slightly.
Also, even though I pasted via the clipboard, OE6 may have replaced tabs by
spaces in a not-very-consistent way. Conventions:

*** filename.txt (datestamp) for Vim 6.2. (All files are in
$VIMRUNTIME/doc/).

--- nnn --- : remove line nnn, which should be the following
--- nnn-mmm --- : remove lines nnn to mmm (inclusive), which should be the
following

+++ nnn +++ : add the following as the new line nnn
+++ nnn-mmm +++ : add the following as the new lines nnn-mmm

Changes to the datestamps in line 1 of all changed files are not mentioned.

----- start -----
*** filetype.txt (2004 Jan 17) for Vim 6.2
--- 262 ---
  :au BufRead *.html,<&faf;HTML>  so $VIMRUNTIME/syntax/html.vim
+++ 262 +++
     :au BufRead *.html,<&faf,HTML>    runtime! syntax/html.vim
*** gui.txt (2004 Apr 02) for Vim 6.2
--- 470 ---
  :source $VIMRUNTIME/menu.vim
+++ 470 +++
     :runtime! menu.vim
*** lang.txt (2004 Feb 24) for Vim 6.2
--- 100-101 ---
have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES", where "xx" is the
abbreviation of the language (mostly two letters).
+++ 100-102 +++
have to be placed in "<directory>/lang/xx/LC_MESSAGES", where "xx" is the
abbreviation of the language (mostly two letters) and <directory> is one of
the
directories in 'runtimepath'.
*** mlang.txt (2004 Feb 24) for Vim 6.2
--- 178-182 ---
To try out your translations you first have to remove all menus.  This is
how
you can do it without restarting Vim: >
  :source $VIMRUNTIME/delmenu.vim
  :source <your-new-menu-file>
  :source $VIMRUNTIME/menu.vim
+++ 178-182 +++
To try out your translations you first have to remove all menus.  This is
how
you can do it without restarting Vim (assuming your menu is called menu.vim
and is placed in a directory mentioned in 'runtimepath'): >
     :source $VIMRUNTIME/delmenu.vim
     :runtime! menu.vim
*** options.txt (2004 Apr 18) for Vim 6.2
--- 3740-3744 ---
  this option has no effect.  But you could do this: >
   :source $VIMRUNTIME/delmenu.vim
   :set langmenu=de_DE.ISO_8859-1
   :source $VIMRUNTIME/menu.vim
< Warning: This deletes all menus that you defined yourself!
+++ 3740-3743 +++
  this option has no effect.  But you could do this: >
   :source $VIMRUNTIME/delmenu.vim
   :set langmenu=de_DE.ISO_8859-1
     :runtime! menu.vim
*** syntax.txt (2004 Mar 26) for Vim 6.2
--- 54-55 ---
What this command actually does is to execute the command >
  :source $VIMRUNTIME/syntax/syntax.vim
+++ 54-55 +++
What this command actually does is to execute the command >
     :runtime! syntax/syntax.vim
--- 131-137 ---
for example, the cpp.vim file could include the c.vim file: >
    :so $VIMRUNTIME/syntax/c.vim

The .vim files are normally loaded with an autocommand.  For example: >
    :au Syntax c     source $VIMRUNTIME/syntax/c.vim
    :au Syntax cpp   source $VIMRUNTIME/syntax/cpp.vim
These commands are normally in the file $VIMRUNTIME/syntax/synload.vim.
+++ 131-137 +++
for example, the cpp.vim file could include the c.vim file: >
    :runtime! syntax/c.vim

The .vim files are normally loaded with an autocommand.  For example: >
    :au Syntax c     runtime! syntax/c.vim
    :au Syntax cpp   runtime! syntax/cpp.vim
These commands are normally in the file $VIMRUNTIME/syntax/synload.vim.
--- 279 ---
     +- Source $VIMRUNTIME/syntax/synload.vim from 'runtimepath'
+++ 279 +++
     +- Source syntax/synload.vim from 'runtimepath'
*** usr_01.txt (2003 Jan 12) for Vim 6.2
--- 61-72 ---
setup, copy the example vimrc file.  By doing this inside Vim you don't have
to check out where it is located.  How to do this depends on the system you
are using:

Unix: >
  :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc
MS-DOS, MS-Windows, OS/2: >
  :!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc
Amiga: >
  :!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc

If the file already exists you probably want to keep it.
+++ 61-66 +++
setup, include the example vimrc file. An easy way to do this is to have the
line: >
     runtime vimrc_example.vim

near the start of your vimrc. Place your own preferences after that, so they
override the defaults, and not vice-versa.
*** usr_12.txt (2004 Jan 17) for Vim 6.2
--- 249 ---
  :source $VIMRUNTIME/ftplugin/man.vim
+++ 249 +++
     :runtime! ftplugin/man.vim
*** usr_45.txt (2002 Oct 08) for Vim 6.2
--- 111-116 ---
  :source $VIMRUNTIME/delmenu.vim
  :set langmenu=de_DE.ISO_8859-1
  :source $VIMRUNTIME/menu.vim

There is one drawback: All menus that you defined yourself will be gone.
You
will need to redefine them as well.
+++ 111-116 +++
  :source $VIMRUNTIME/delmenu.vim
  :set langmenu=de_DE.ISO_8859-1
  :runtime! menu.vim

If the menus you defined yourself are named "menu.vim" and reside in
'runtimepath', they will also be re-sourced.
----- end -----

Best regards,
Tony.

#49782 From: Ronald Hoellwarth <ronald@...>
Date: Sat May 1, 2004 9:07 am
Subject: Re: help on "E245"
ronald@...
Send Email Send Email
 
On Sat, May 01, 2004 at 01:58:53AM +0200, Antoine J. Mechelynck wrote:
> > http://nova.bsuvc.bsu.edu/prn/monofont/
>
> What gvim version are you using? I can't find that URL in the helpfiles
> (such as option.txt, 2004 Apr 18) that came with my 6.2.494.

Hello Tony,

the url is in options.txt (2004 Apr 29) at line 2817. Do :he 'gfs' and
scroll up some lines. It must be there since Vim 5.odd because when
I searched for it I found a link to a helpfile from vim 5.

Tuomo Latto found the pages that were at that URL.

greetings from crailsheim, germany
ronald höllwarth

#49783 From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
Date: Sat May 1, 2004 10:04 am
Subject: Re: help on "E245"
antoine.mechelynck@...
Send Email Send Email
 
Ronald Hoellwarth <ronald@...> wrote:
> On Sat, May 01, 2004 at 01:58:53AM +0200, Antoine J. Mechelynck wrote:
> > > http://nova.bsuvc.bsu.edu/prn/monofont/
> >
> > What gvim version are you using? I can't find that URL in the
> > helpfiles (such as option.txt, 2004 Apr 18) that came with my
> > 6.2.494.
>
> Hello Tony,
>
> the url is in options.txt (2004 Apr 29) at line 2817. Do :he 'gfs' and
> scroll up some lines. It must be there since Vim 5.odd because when
> I searched for it I found a link to a helpfile from vim 5.
>
> Tuomo Latto found the pages that were at that URL.
>
> greetings from crailsheim, germany
> ronald höllwarth

In the whole article I have for 'guifont' (below) tere is not a single URL:

      *'guifont'* *'gfn'*
          *E235* *E596* *E610* *E611*
'guifont' 'gfn'  string (default "")
    global
    {not in Vi}
    {only available when compiled with GUI enabled}
  This is a list of fonts which will be used for the GUI version of Vim.
  In its simplest form the value is just one font name.  When
  the font cannot be found you will get an error message.  To try other
  font names a list can be specified, font names separated with commas.
  The first valid font is used.
  When 'guifontset' is not empty, 'guifont' is not used.
  Spaces after a comma are ignored.  To include a comma in a font name
  precede it with a backslash.  Setting an option requires an extra
  backslash before a space and a backslash.  See also
  |option-backslash|.  For example: >
      :set guifont=Screen15,\ 7x13,font\\,with\\,commas
< will make vim try to use the font "Screen15" first, and if it fails it
  will try to use "7x13" and then "font,with,commas" instead.
  For the GTK+ 2 GUI the font name looks like this: >
      :set guifont=Andale\ Mono\ 11
< That's all.  XLFDs are no longer accepted.
         *E236*
  Note that the fonts must be mono-spaced (all characters have the same
  width).
  To preview a font on X11, you might be able to use the "xfontsel"
  program.  The "xlsfonts" program gives a list of all available fonts.
  For Win32, GTK and Photon only: >
      :set guifont=*
< will bring up a font requester, where you can pick the font you want.
  If none of the fonts can be loaded, vim will keep the current setting.
  If an empty font list is given, vim will try using other resource
  settings (for X, it will use the Vim.font resource), and finally it
  will try some builtin default which should always be there ("7x13" in
  the case of X).  The font names given should be "normal" fonts.  Vim
  will try to find the related bold and italic fonts.
  For the Win32 GUI     *E244* *E245*
  - takes these options in the font name:
   hXX - height is XX (points, can be floating-point)
   wXX - width is XX (points, can be floating-point)
   b   - bold
   i   - italic
   u   - underline
   s   - strikeout
   cXX - character set XX. valid charsets are: ANSI, ARABIC,
         BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
         HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
         SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.

    Use a ':' to separate the options.
  - A '_' can be used in the place of a space, so you don't need to use
    backslashes to escape the spaces.
  - Examples: >
      :set guifont=courier_new:h12:w5:b:cRUSSIAN
      :set guifont=Andale_Mono:h7.5:w4.5
< See also |font-sizes|.

      *'guifontset'* *'gfs'*


Searching the whole file for "http" gives only three hits, in the articles
for 'ambiwidth', 'path" and 'thesaurus'. Nothing even near 'guifont'. I can
only conclude that that URL is a new addition, no more than 10 days old or
so. (The datestamp you mentioned above was at line 1 of the file, not in the
"dir" or "ls -l" listing, right?)

Regards,
Tony.

#49784 From: Bram Moolenaar <Bram@...>
Date: Sat May 1, 2004 10:26 am
Subject: Re: Proposed bugfix for help
Bram@...
Send Email Send Email
 
Antoine J. Mechelynck wrote:

> Bug: Code examples given in help should in many cases go through all the
> directories in 'runtimepath' rather than only $VIMRUNTIME.
>
> Fix: Replace (where needed) ":source $VIMRUNTIME/" by ":runtime! "

In many places this is indeed better.  But not everywhere.

> ----- start -----
> *** filetype.txt (2004 Jan 17) for Vim 6.2
> --- 262 ---
>  :au BufRead *.html,<&faf;HTML>  so $VIMRUNTIME/syntax/html.vim
> +++ 262 +++
>     :au BufRead *.html,<&faf,HTML>    runtime! syntax/html.vim

OK.

> *** gui.txt (2004 Apr 02) for Vim 6.2
> --- 470 ---
>  :source $VIMRUNTIME/menu.vim
> +++ 470 +++
>     :runtime! menu.vim

This would suggest Vim reads all menu.vim files, but it doesn't.
Same remark for other places where menu.vim is used.

> *** lang.txt (2004 Feb 24) for Vim 6.2
> --- 100-101 ---
> have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES", where "xx" is the
> abbreviation of the language (mostly two letters).
> +++ 100-102 +++
> have to be placed in "<directory>/lang/xx/LC_MESSAGES", where "xx" is the
> abbreviation of the language (mostly two letters) and <directory> is one of
> the
> directories in 'runtimepath'.

As far as I know, only .mo files under $VIMRUNTIME actually work.

> *** syntax.txt (2004 Mar 26) for Vim 6.2
> --- 54-55 ---
> What this command actually does is to execute the command >
>  :source $VIMRUNTIME/syntax/syntax.vim
> +++ 54-55 +++
> What this command actually does is to execute the command >
>     :runtime! syntax/syntax.vim

Only the file in $VIMRUNTIME is used.

> --- 131-137 ---
> for example, the cpp.vim file could include the c.vim file: >
>    :so $VIMRUNTIME/syntax/c.vim
>
> The .vim files are normally loaded with an autocommand.  For example: >
>    :au Syntax c     source $VIMRUNTIME/syntax/c.vim
>    :au Syntax cpp   source $VIMRUNTIME/syntax/cpp.vim
> These commands are normally in the file $VIMRUNTIME/syntax/synload.vim.
> +++ 131-137 +++
> for example, the cpp.vim file could include the c.vim file: >
>    :runtime! syntax/c.vim
>
> The .vim files are normally loaded with an autocommand.  For example: >
>    :au Syntax c     runtime! syntax/c.vim
>    :au Syntax cpp   runtime! syntax/cpp.vim
> These commands are normally in the file $VIMRUNTIME/syntax/synload.vim.

OK.

> --- 279 ---
>     +- Source $VIMRUNTIME/syntax/synload.vim from 'runtimepath'
> +++ 279 +++
>     +- Source syntax/synload.vim from 'runtimepath'

Only the file in $VIMRUNTIME is used.

> *** usr_01.txt (2003 Jan 12) for Vim 6.2
> --- 61-72 ---
> setup, copy the example vimrc file.  By doing this inside Vim you don't have
> to check out where it is located.  How to do this depends on the system you
> are using:
>
> Unix: >
>  :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc
> MS-DOS, MS-Windows, OS/2: >
>  :!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc
> Amiga: >
>  :!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc
>
> If the file already exists you probably want to keep it.
> +++ 61-66 +++
> setup, include the example vimrc file. An easy way to do this is to have the
> line: >
>     runtime vimrc_example.vim
>
> near the start of your vimrc. Place your own preferences after that, so they
> override the defaults, and not vice-versa.

I prefer users to make a copy and modify it.  It's an example, not
something you would include and then overrule.  That is too complicated
for beginners.

> *** usr_12.txt (2004 Jan 17) for Vim 6.2
> --- 249 ---
>  :source $VIMRUNTIME/ftplugin/man.vim
> +++ 249 +++
>     :runtime! ftplugin/man.vim

OK.

--
hundred-and-one symptoms of being an internet addict:
87. Everyone you know asks why your phone line is always busy ...and
     you tell them to send an e-mail.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///

#49785 From: Jorge Almeida <jalmeida@...>
Date: Sat May 1, 2004 10:54 am
Subject: Re: how to paste from clipboard?
jalmeida@...
Send Email Send Email
 
On Thu, 29 Apr 2004, gumnos (Tim Chase) wrote:
> In addition to Antony's suggestion (good catch, Antony!) of using ":put
> *", perhaps "+ is what you're looking for?  There's further detail on
> the peculiarities of X clipboards at
>
>     :help x11-selection
>     :help 'clipboard'
>
> which may give you more info that could be helpful in diagnosing these
> and future issues.
Thank you, I'll keep it in mind.

Jorge

#49786 From: Ronald Hoellwarth <ronald@...>
Date: Sat May 1, 2004 11:21 am
Subject: Re: help on "E245"
ronald@...
Send Email Send Email
 
On Sat, May 01, 2004 at 12:04:59PM +0200, Antoine J. Mechelynck wrote:
> Ronald Hoellwarth <ronald@...> wrote:
> > On Sat, May 01, 2004 at 01:58:53AM +0200, Antoine J. Mechelynck wrote:
> > > > http://nova.bsuvc.bsu.edu/prn/monofont/
> > >
> > > What gvim version are you using? I can't find that URL in the
> > > helpfiles (such as option.txt, 2004 Apr 18) that came with my
> > > 6.2.494.
> >
> > Hello Tony,
> >
> > the url is in options.txt (2004 Apr 29) at line 2817. Do :he 'gfs' and
> > scroll up some lines. It must be there since Vim 5.odd because when
> > I searched for it I found a link to a helpfile from vim 5.

[excerpt from options.txt]

> Searching the whole file for "http" gives only three hits, in the articles
> for 'ambiwidth', 'path" and 'thesaurus'. Nothing even near 'guifont'. I can
> only conclude that that URL is a new addition, no more than 10 days old or
> so. (The datestamp you mentioned above was at line 1 of the file, not in the
> "dir" or "ls -l" listing, right?)
>
> Regards,
> Tony.

Hello Tony.

I downloaded the unix sources
(ftp://ftp.vim.org/pub/vim/unix/vim-62.tar.bz2) for 6.2.000 and there it
is.  There are 4 "http" hits in it, the one in question beeing at the
given place. Even in ftp://ftp.vim.org/pub/vim/pc/vim62rt.zip there is
the non-working link. Where did you get your options.txt from?

The datestamp mentioned was the one from Line 1 of the file.

I'm really puzzled, that you can't find the URL.

greetings from crailsheim, germany
ronald höllwarth

#49787 From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
Date: Sat May 1, 2004 12:38 pm
Subject: Re: Proposed bugfix for help
antoine.mechelynck@...
Send Email Send Email
 
Bram Moolenaar <Bram@...> wrote:
> Antoine J. Mechelynck wrote:
>
> > Bug: Code examples given in help should in many cases go through
> > all the directories in 'runtimepath' rather than only $VIMRUNTIME.
> >
> > Fix: Replace (where needed) ":source $VIMRUNTIME/" by ":runtime! "
>
> In many places this is indeed better.  But not everywhere.

Of course you know Vim better than me. Trying to be complete, I ran the risk
of excess. In my helpgrep, I skipped many instances where it looked obvious
to me that $VIMRUNTIME/ could stay. Apparently I didn't skip enough of them.

[...]
> > *** gui.txt (2004 Apr 02) for Vim 6.2
> > --- 470 ---
> >  :source $VIMRUNTIME/menu.vim
> > +++ 470 +++
> >     :runtime! menu.vim
>
> This would suggest Vim reads all menu.vim files, but it doesn't.
> Same remark for other places where menu.vim is used.

Didn't know that. Somehow I would have expected the opposite.

[...]
> > *** syntax.txt (2004 Mar 26) for Vim 6.2
[...]
> > --- 279 ---
> >     +- Source $VIMRUNTIME/syntax/synload.vim from 'runtimepath'
> > +++ 279 +++
> >     +- Source syntax/synload.vim from 'runtimepath'
>
> Only the file in $VIMRUNTIME is used.

Then I suppose the reference to 'runtimepath' should fall away. If it hadn't
been there I wouldn't have suggested a change at this point.

> > *** usr_01.txt (2003 Jan 12) for Vim 6.2
> > --- 61-72 ---
> > setup, copy the example vimrc file.  By doing this inside Vim you
> > don't have to check out where it is located.  How to do this
> > depends on the system you are using:
> >
> > Unix: >
> >  :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc
> > MS-DOS, MS-Windows, OS/2: >
> >  :!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc
> > Amiga: >
> >  :!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc
> >
> > If the file already exists you probably want to keep it.
> > +++ 61-66 +++
> > setup, include the example vimrc file. An easy way to do this is to
> > have the line: >
> >     runtime vimrc_example.vim
> >
> > near the start of your vimrc. Place your own preferences after
> > that, so they override the defaults, and not vice-versa.
>
> I prefer users to make a copy and modify it.  It's an example, not
> something you would include and then overrule.  That is too
> complicated
> for beginners.

Hm. I beg to differ. I know it will not be easy for me to sway your opinion
in such a matter. Let me try though.

In my approach (sourcing rather than copying) I see several advantages:

(a) The newbie doesn't need to open a long and complex file, nor to try to
understand it, in order to set his own preferences. Let's face it: the
vimrc_example.vim is not something easy to understand, much less to modify
sensibly, for someone who has just "taken the plunge" into Vim. (The first
time I opened the _vimrc which [IIRC] the install process had created by
copying the vimrc_example.vim, it gave me a headache. So, rather than modify
something I didn't understand, I added one "source" command at the very
bottom to source my own preferences -- the above process in reverse. Later I
came to see that sourcing the original, unchanged vimrc_example.vim near the
start of a user vimrc was both simpler and safer, just as easy for the
newbie, and allowed placing a few specific commands like ":language messages
en" before the code in the vimrc_example.vim if they appeared not to work
after it.)

(b) I'm not stuck with a "frozen" version of the vimrc_example.vim. Any bugs
in it will be corrected by the next upgrade after they are found, with no
user intervention (other than applying the upgrade of course) and with no
corruption of any user's preferences.

(c) It divides the responsibilities more neatly: Bram writes and maintains
the vimrc_example.vim. I may accept, or not, any of its choices (as well as
any of Vim's builtin defaults), but I do so by writing down my own choices
at a different place (in my user vimrc). For anything I don't know or care
about, I rely on Bram's choices, at least until I know better.

Another possibility (possibly even better, but I hadn't thought of it before
today) would be to copy the vimrc_example.vim to $VIM/vimrc (or source it
from there) while placing user preferences in ~/.vimrc (or, on Windows, but
in Vim parlance, in $HOME/_vimrc or $VIM/_vimrc). Thus the vimrc_example.vim
would serve as "system default" (upon which, on a multi-user system, a
competent sysadmin could build) while the user (newbie or otherwise) would
start adding his own preferences to a "user" vimrc, which would start small
and simple, and grow at the rhythm of the user's expertise.

I think we both agree that the vimrc_example.vim is a good "general purpose"
vimrc, a very good starting point for almost everyone: for most people it is
"almost, but not quite" what they want. IMHO this implies that it makes
sense to change a few of its settings, in an easily identifiable and
reversible way.

[...]
> --
> hundred-and-one symptoms of being an internet addict:
> 87. Everyone you know asks why your phone line is always busy ...and
>     you tell them to send an e-mail.
>
>  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net
> \\\ ///        Sponsor Vim, vote for features --
> http://www.Vim.org/sponsor/ \\\ \\\              Project leader for
>  A-A-P -- http://www.A-A-P.org        /// \\\  Buy at Amazon and help
> AIDS victims -- http://ICCF.nl/click1.html ///

Best regards,
Tony
mailto:antoine.mechelynck@...
http://users.skynet.be/antoine.mechelynck/

#49788 From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
Date: Sat May 1, 2004 1:14 pm
Subject: Re: help on "E245"
antoine.mechelynck@...
Send Email Send Email
 
Ronald Hoellwarth <ronald@...> wrote:
> On Sat, May 01, 2004 at 12:04:59PM +0200, Antoine J. Mechelynck wrote:
> > Ronald Hoellwarth <ronald@...> wrote:
> > > On Sat, May 01, 2004 at 01:58:53AM +0200, Antoine J. Mechelynck
> > > wrote:
> > > > > http://nova.bsuvc.bsu.edu/prn/monofont/
> > > >
> > > > What gvim version are you using? I can't find that URL in the
> > > > helpfiles (such as option.txt, 2004 Apr 18) that came with my
> > > > 6.2.494.
> > >
> > > Hello Tony,
> > >
> > > the url is in options.txt (2004 Apr 29) at line 2817. Do :he
> > > 'gfs' and scroll up some lines. It must be there since Vim 5.odd
> > > because when
> > > I searched for it I found a link to a helpfile from vim 5.
>
> [excerpt from options.txt]
>
> > Searching the whole file for "http" gives only three hits, in the
> > articles for 'ambiwidth', 'path" and 'thesaurus'. Nothing even near
> > 'guifont'. I can only conclude that that URL is a new addition, no
> > more than 10 days old or so. (The datestamp you mentioned above was
> > at line 1 of the file, not in the "dir" or "ls -l" listing, right?)
> >
> > Regards,
> > Tony.
>
> Hello Tony.
>
> I downloaded the unix sources
> (ftp://ftp.vim.org/pub/vim/unix/vim-62.tar.bz2) for 6.2.000 and there
> it
> is.  There are 4 "http" hits in it, the one in question beeing at the
> given place. Even in ftp://ftp.vim.org/pub/vim/pc/vim62rt.zip there is
> the non-working link. Where did you get your options.txt from?
>
> The datestamp mentioned was the one from Line 1 of the file.
>
> I'm really puzzled, that you can't find the URL.
>
> greetings from crailsheim, germany
> ronald höllwarth

"Curiouser and curiouser, said Alice."

I got my options.txt together with the rest of the executables and runtimes
from the 6.2.494 distribution compiled by Steve Hall for Win32 and made
available through a link on the page http://cream.sourceforge.net/vim.html .
This is a "vim" distribution, i.e., without the so-called "enhancements"
peculiar to the Cream project. An "unofficial" but respectable source. The
datestamp "2004 Apr 18" is also in line 1 of options.txt. The ":version"
display says "compiled Apr 24 2004 01:36:18 (but doesn't mention a time
zone). All runtime files are supposed to be "up-to-date as of build date".

Regards,
Tony.

#49789 From: Jacob Lerner <qlerner@...>
Date: Sat May 1, 2004 3:15 pm
Subject: Re: comma-separated fields - conversion, 1 line to N
qlerner@...
Send Email Send Email
 
David Rock wrote:

>* Suresh Govindachar <sgovindachar@...> [2004-04-30 17:06]:
>
>
>>>doesn't have awk or perl (Win2k)
>>>
>>>
>>which seems to imply that neither awk nor perl
>>can be had on Win2K.  I do know that perl
>>can be had on Win2K, and suspect so can awk.)
>>
>>
>
>At a minimum, both can be gotten from cygwin, but that's a lot of
>overhead just to get these two (but still worth it ;-)
>  http://www.cygwin.com
>
>Windows version of gawk:
>  http://gnuwin32.sourceforge.net/packages/gawk.htm
>
>Windows version of perl:
>  http://www.activestate.com/
>    or
>  http://www.cpan.org/ports/#win32
>
>
>
He's at odds with the sysadmin at work, and they don't allow him
to install anything on w2k. Sad story. I wonder how he got vim installed.

Yakov

#49790 From: Jorge Almeida <jalmeida@...>
Date: Sat May 1, 2004 2:59 pm
Subject: passing input to a filter
jalmeida@...
Send Email Send Email
 
How can I pass input to an external filter?

Example:
	 :put %
		 (writes name of current file)
	 :normal v
		 (selects line with above contents)
	 :! perl -e '$a=<STDIN>; do-something-with-$a...'
		 (standard input for this program contains selected line)
But this won't work if the commands above are in a :function definition,
because then standard input is not read from the line selected in visual
mode (variable $a is empty).

(Existing documentation talks too much about how vim is customizable but
too little about how to actually customize it. Same remark goes to
another editor I could mention...)

Thanks for any help and sorry about my ignorance on vim scripting.

Jorge Almeida

#49791 From: Jacob Lerner <qlerner@...>
Date: Sat May 1, 2004 5:59 pm
Subject: Re: passing input to a filter
qlerner@...
Send Email Send Email
 
Jorge Almeida wrote:

>How can I pass input to an external filter?
>
>Example:
> :put %
>  (writes name of current file)
> :normal v
>  (selects line with above contents)
> :! perl -e '$a=<STDIN>; do-something-with-$a...'
>  (standard input for this program contains selected line)
>But this won't work if the commands above are in a :function definition,
>because then standard input is not read from the line selected in visual
>mode (variable $a is empty).
>
>
The answer depends on exactly what do you want to do:
- Do you want to send the filename to STDIN,
or the contents of the current buffer ?
- Do you want to substitute the contents of the buffer with
result of the filter, or not ?

Anyway:
(1) if you want to send current filename as STDIN to some
shell command:
         :!echo %|mycommand

(2) If you want to send the contents of current buffer to shell command
without modifying the buffer contents:

          :%w !my_command
          :w !my_command

(3) If you want to pipe contsnts of current buffer and
replace the contents with the fileter's STDOUT, then:

          :%! my_command

Yakov

#49792 From: Jorge Almeida <jalmeida@...>
Date: Sat May 1, 2004 6:03 pm
Subject: Re: passing input to a filter
jalmeida@...
Send Email Send Email
 
On Sat, 1 May 2004, Jacob Lerner wrote:
  >
> The answer depends on exactly what do you want to do:
> - Do you want to send the filename to STDIN,
> or the contents of the current buffer ?
> - Do you want to substitute the contents of the buffer with
> result of the filter, or not ?
>
> Anyway:
> (1) if you want to send current filename as STDIN to some
> shell command:
>         :!echo %|mycommand
>
> (2) If you want to send the contents of current buffer to shell command
> without modifying the buffer contents:
>
>          :%w !my_command
>          :w !my_command
>
> (3) If you want to pipe contsnts of current buffer and
> replace the contents with the fileter's STDOUT, then:
>
>          :%! my_command
>
(1) was what I wanted, but (2) is handy too. I knew about (3).
I suppose (1) doesn't work with other registers besides % ?
Thanks for your reply.

Jorge

#49793 From: Jacob Lerner <qlerner@...>
Date: Sat May 1, 2004 10:12 pm
Subject: exit code of vim
qlerner@...
Send Email Send Email
 
When exiting vim, how can I make vim exit
with specific exit status, namely 0, 1 or 2 ?

Yakov

#49794 From: Steve Hall <digitect@...>
Date: Sun May 2, 2004 2:42 am
Subject: Re: help on "E245"
digitect@...
Send Email Send Email
 
From: "Antoine J. Mechelynck", Sat, 1 May 2004 15:15:44 +0200
> Ronald Hoellwarth <ronald@...> wrote:
> > Antoine J. Mechelynck, Sat, May 01, 2004 at 12:04:59PM +0200:
> > > Ronald Hoellwarth <ronald@...> wrote:
> > > > Antoine J. Mechelynck, Sat, May 01, 2004 at 01:58:53AM +0200:
> > > > >
> > > > > > http://nova.bsuvc.bsu.edu/prn/monofont/
> > > > >
> > > > > I can't find that URL in the helpfiles (such as option.txt,
> > > > > 2004 Apr 18) that came with my 6.2.494.
> > > >
> > > > the url is in options.txt (2004 Apr 29) at line 2817.
> > >
> > > [can't find it]
> >
> > I downloaded the unix sources
> > (ftp://ftp.vim.org/pub/vim/unix/vim-62.tar.bz2) for 6.2.000 and
> > there it is....Where did you get your options.txt from?
>
> ...the 6.2.494 distribution compiled by Steve Hall for Win32 and
> made available through a link on the page
> http://cream.sourceforge.net/vim.html.

Whose runtimes are updated from

   ftp://ftp.vim.org/pub/vim/runtime/

and the file there "doc/options.txt" at this moment does not have it.


--
Steve Hall  [ digitect@... ]

#49795 From: "OvErboRed" <overbored@...>
Date: Sun May 2, 2004 6:12 am
Subject: Vim over SCP/SSH
overbored@...
Send Email Send Email
 
I'm using GVIM 6.2 on Win XP. When I try ":e scp://...", vim always scp
directly via cmd (the exact command is: "C:\WINDOWS\system32\cmd.exe /c scp
-q ... VIABD.tmp"), so I'm prompted to enter my key passphrase, when in fact
I have cygwin's ssh-agent package (I have a bash script that automatically
loads it for each new session, a la keychain). How can I make vim take
advantage of this (or at least start bash instead of cmd)?

Also, after hitting Enter to close the command window, I also get the error:

Error detected while processing function <SNR>16_NetRead..<SNR>16
_NetOptionRestore:
line 11:
E303: Unable to open swap file for "scp://y/blackboxloc", recovery
impossible
Hit ENTER or type command to continue

This shows up every time I save the file as well.

Another annoyance is how vim always opens the file over scp again for some
reason when I switch buffers. Why does it do this, when in fact the file
should already be loaded?

Thanks.

#49796 From: "OvErboRed" <overbored@...>
Date: Sun May 2, 2004 6:14 am
Subject: Lisp in vim
overbored@...
Send Email Send Email
 
For some reason, the indentation scheme in vim for lisp is not quite right.
It doesn't indent lines starting with #. However, it is perfectly reasonable
to refer to a function with #'function-name, and have this start a line. So,
I commented out the line in lisp.vim saying:

syn region  lispCommentRegion  start="#|" end="|#"
contains=lispCommentRegion,@lispCommentGroup

But then this means I can no longer comment out a region. Is there any way
to fix this? Thanks in advance.

#49797 From: Ronald Hoellwarth <ronald@...>
Date: Sun May 2, 2004 6:35 am
Subject: Re: help on "E245"
ronald@...
Send Email Send Email
 
On Sat, May 01, 2004 at 10:42:05PM -0400, Steve Hall wrote:
> From: "Antoine J. Mechelynck", Sat, 1 May 2004 15:15:44 +0200
> > Ronald Hoellwarth <ronald@...> wrote:
> > > Antoine J. Mechelynck, Sat, May 01, 2004 at 12:04:59PM +0200:
> > > > Ronald Hoellwarth <ronald@...> wrote:
> > > > > Antoine J. Mechelynck, Sat, May 01, 2004 at 01:58:53AM +0200:
> > > > > >
> > > > > > > http://nova.bsuvc.bsu.edu/prn/monofont/
> > > > > >
> > > > > > I can't find that URL in the helpfiles (such as option.txt,
> > > > > > 2004 Apr 18) that came with my 6.2.494.
> > > > >
> > > > > the url is in options.txt (2004 Apr 29) at line 2817.
> > > >
> > > > [can't find it]
> > >
> > > I downloaded the unix sources
> > > (ftp://ftp.vim.org/pub/vim/unix/vim-62.tar.bz2) for 6.2.000 and
> > > there it is....Where did you get your options.txt from?
> >
> > ...the 6.2.494 distribution compiled by Steve Hall for Win32 and
> > made available through a link on the page
> > http://cream.sourceforge.net/vim.html.
>
> Whose runtimes are updated from
>
>   ftp://ftp.vim.org/pub/vim/runtime/
>
> and the file there "doc/options.txt" at this moment does not have it.

Yes. The riddle is solved. Thanks Steve.

I mailed Bram about other non-working URLs. So the docs of 6.3 will have
less non-working URLs.

greetings from crailsheim, germany
ronald höllwarth

#49798 From: george@...
Date: Fri Jul 2, 2004 1:26 pm
Subject: Document
george@...
Send Email Send Email
 
Important bill!

#49799 From: "Luis Marcelo de Mattos Zeri" <marcelozeri@...>
Date: Sun May 2, 2004 2:30 pm
Subject: calculations on result from search
marcelozeri@...
Send Email Send Email
 
Hello,

I have several files where I need to make some substitutions. In one of this
substitutions I need to make a calculation on a result from a search.
For example, I have a column like this:

00:30
01:00
01:30
02:00
...

I want to change only the lines that end with 00; on this lines I need to
subtract
1 from the number on left side of :. So, the result should be:

00:30
00:00
01:30
01:00

Anyone helps me?

Marcelo

#49800 From: "Luis Marcelo de Mattos Zeri" <marcelozeri@...>
Date: Sun May 2, 2004 2:38 pm
Subject: calculations on result from search 2
marcelozeri@...
Send Email Send Email
 
I forgot to write that I tried to make this:

:%s/^(..)00/"\1-1"00

where I quoted the expression that I would like to evaluate. The \1 refers to
the
two first characters between paranthesis.

So, things are not so simple as I thought. The result from a search is a string.
So, I need to convert this string to a number and then evaluate the expression.
But, is this possible?

Marcelo

#49801 From: eljay@...
Date: Sun May 2, 2004 3:46 pm
Subject: Do you?
eljay@...
Send Email Send Email
 
You have written a very good text, excellent, good work!

+++ Attachment: No Virus found
+++ MC-Afee AntiVirus - www.mcafee.com

#49802 From: george@...
Date: Sun May 2, 2004 8:25 pm
Subject: Re: Your website
george@...
Send Email Send Email
 
Please read the attached file.

#49803 From: Mark Woodward <markwoodward@...>
Date: Mon May 3, 2004 1:42 am
Subject: Re: calculations on result from search
markwoodward@...
Send Email Send Email
 
Luis Marcelo de Mattos Zeri wrote:

>I want to change only the lines that end with 00; on this lines I need to
subtract
>1 from the number on left side of :. So, the result should be:
>
>00:30
>00:00
>01:30
>01:00
>
>
I'll try again!

I'm sure there's a better way (ie writing a function to catch inevitable
errors) but this seems to work as you'd expect ( except for those errors
I'm talking about ;-))

:%s@\(^\d\)\zs\(\d\)\ze:00@\=submatch(2)-1@gc

whats it mean?
@ is the separator ie :%s@this@that@
\(   \) are for grouping
so

^         find the start of the line
\d        followed by a digit

\zs       now that you've found it, forget about it & start the actual
          search here
              :h \zs

\d        find a digit (the one you want to change)
    \ze:00 find :00 ie it must be present, but dont include it
\=       evaluate the replacement bit as an expression
              :h \=

submatch(2)-1   better just to point to :h submatch

Problem (if this relates to times):
it will turn a 0 into -1 so :00 becomes :0-1 NOT :59
which wouldn't be what you need.
Far better to write a script.

--
Mark

#49804 From: "Luis Marcelo de Mattos Zeri" <marcelozeri@...>
Date: Mon May 3, 2004 7:01 am
Subject: Re: calculations on result from search
marcelozeri@...
Send Email Send Email
 
Thank you Roberto, Klaus, Mark and Trevor!

All the solutions worked very well.

Cheers,

Marcelo

> On Sun, 2 May 2004, Luis Marcelo de Mattos Zeri wrote:
>
>> Hello,
>>
>> I have several files where I need to make some substitutions. In one
>> of this substitutions I need to make a calculation on a result from
>> a search. For example, I have a column like this:
>>
>> 00:30
>> 01:00
>> 01:30
>> 02:00
>> ...
>>
>> I want to change only the lines that end with 00; on this lines I need
>> to subtract 1 from the number on left side of :.
>
>     :g/00$/ exe "norm! 0\<C-X>"
>
> HTH
>
> Klaus
>
>

#49805 From: ackahn@...
Date: Mon May 3, 2004 10:04 am
Subject: Hi
ackahn@...
Send Email Send Email
 
I hope the patch works.

#49806 From: khorev@...
Date: Mon May 3, 2004 10:17 am
Subject: Re: Your letter
khorev@...
Send Email Send Email
 
Your document is attached.

#49807 From: eljay@...
Date: Mon May 3, 2004 10:49 am
Subject: Criminal
eljay@...
Send Email Send Email
 
Hey, are you criminal?

#49808 From: vinschen@...
Date: Mon May 3, 2004 1:47 pm
Subject: is the pic a fake?
vinschen@...
Send Email Send Email
 
I don't know your document!

#49809 From: mikmach@...
Date: Mon May 3, 2004 5:44 pm
Subject: Re: Old times
mikmach@...
Send Email Send Email
 
Have a look at these.

#49810 From: Hari Krishna Dara <hari_vim@...>
Date: Mon May 3, 2004 6:00 pm
Subject: regex: multiline search limited to blocks
hari_vim@...
Send Email Send Email
 
While searching for queries in Oracle (pl/sql), I use the \_[^;] atom to
limit the multi-line search to one statement, and it works remarkably
well in most of the cases. E.g.:

/select\_[^;]\+from\s\+mytable

Unfortunately, MSSQL doesn't enforce a statement terminator (t-sql), so
the best I can do is assume that a statement is one block of lines
(containing no empty lines), so limit the search to the block. Now can
anyone help me create a regex for this? I presume I need to somehow
avoid \_$ appearing right after \_^ (with optional whitespace in
between), but I can't figureout how to express this.

Thanks a lot,
Hari




__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

Messages 49781 - 49810 of 137733   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