Re: Error while opening the cscope referenced file in vim

2007-05-07 Thread Gary Johnson
On 2007-05-03, Natesh Kedlaya <[EMAIL PROTECTED]> wrote:
> Hi,
>   I have built a cscope db of a source tree which was mounted on /mnt.
>   Now, I want to use the same cscope db on the same source tree but mounted
>   on a different mount point /scratch.
> 
>   I could achieve this using the standard cscope and EDITOR env variable
>   trick as shown below.
>   1. set the EDITOR to a shell script of my own. The shell script contains
>  the following lines in it.
> 
>  #!/bin/sh
>  offset=$1
>  fname=`echo $2 | sed s@/mnt/@/scratch/@`
>  xterm -e /usr/bin/vim $offset $fname
> 
>   2. Run cscope and when it tries to open a file, it goes through my
> EDITOR script and does the right job.
> 
> 
>   How do I achieve the same in vim6.3?
>   I have the necessary settings in my .vimrc to work with cscope :
> 
>   if has("cscope")
> set cscopeprg=/usr/local/bin/cscope
> set csto=0
> set cst
> set nocsverb
> " add any database in current directory
> if filereadable("cscope.out")
>   cs add cscope.out
>   " else add database pointed to by environment
> elseif $CSCOPE_DB != ""
>   cs add $SRCHOME/$NDE_PRODUCT/utl/ $SRCHOME -U
> endif
> set cspc=5
> set csverb
>   endif

Here's an idea, untested.  Create a wrapper script around cscope, as 
you did before for EDITOR.  The script contains just this line:

   /usr/local/bin/cscope "$@" | sed s@/mnt/@/scratch/@

Change your .vimrc to set cscopeprg to the name of this script.

HTH,
Gary

-- 
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Mobile Broadband Division
 | Spokane, Washington, USA


Re: Error while opening the cscope referenced file in vim

2007-05-07 Thread Natesh Kedlaya
Any pointers please!

Thanks,
Natesh


- Original Message 
From: Natesh Kedlaya <[EMAIL PROTECTED]>
To: vim@vim.org
Sent: Thursday, May 3, 2007 10:28:15 AM
Subject: Error while opening the cscope referenced file in vim

Hi,
  I have built a cscope db of a source tree which was mounted on /mnt.
  Now, I want to use the same cscope db on the same source tree but mounted
  on a different mount point /scratch.

  I could achieve this using the standard cscope and EDITOR env variable
  trick as shown below.
  1. set the EDITOR to a shell script of my own. The shell script contains
 the following lines in it.

 #!/bin/sh
 offset=$1
 fname=`echo $2 | sed s@/mnt/@/scratch/@`
 xterm -e /usr/bin/vim $offset $fname

  2. Run cscope and when it tries to open a file, it goes through my
EDITOR script and does the right job.


  How do I achieve the same in vim6.3?
  I have the necessary settings in my .vimrc to work with cscope :

  if has("cscope")
set cscopeprg=/usr/local/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
  cs add cscope.out
  " else add database pointed to by environment
elseif $CSCOPE_DB != ""
  cs add $SRCHOME/$NDE_PRODUCT/utl/ $SRCHOME -U
endif
set cspc=5
set csverb
  endif


Thanks,
Natesh




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





 

Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather


RE: Error format and quickfix

2007-03-27 Thread Christophe Dupre
> > Here is what I get when I do copen.
> > 
> > || ccsc main.c +FH +P +DC +LO +EA +STDOUT I+="..\Includes"
> > || >>> Warning 201
"C:\Project\Test\OnlineMS\Firmware\Source\rs232.c"
> > Line 48(1,1): Assignment inside relational expression
> > || *** Error 12 "C:\Project\Test\OnlineMS\Firmware\Source\main.c"
Line
> > 97(3,4): Undefined identifier   j
> > ||   1 Errors,  1 Warnings.
> > [...]

> > || >>> Warning 201
"C:\Project\Test\OnlineMS\Firmware\Source\rs232.c"
> > Line 48(1,1): Assignment inside relational expression
> > || *** Error 12 "C:\Project\Test\OnlineMS\Firmware\Source\main.c"
Line
> > 97(3,4): Undefined identifier   j
> > 
> > Here is what I think I should define.
> > \|\|\ \>\>\>\ %t\ %n\ %f\ Line\ %lXXX%m \|\|\ \*\*\*\ %t\ %n\ %f\ 
> > Line\ %lXXX%m Can you spot anything wrong here?

> Yes. 

> The || characters at the beginning of the line are added by vim on
lines it doesn't recognize. You needn't parse them > > because they are
not part of you compiler's output.

> > How do I deal with the (1,1), and the (3,4)?

> That depends what they mean. 
It's means the column number: beginning and end.
So the first digit can be replaced by %c, what about the second one? How
can I represent it? I don't really need it actually, can I just omit it?

Thanks,

Christophe


Re: Error format and quickfix

2007-03-27 Thread Jean-Rene David
* Christophe Dupre [2007.03.27 07:15]:
> Here is what I get when I do copen.
> 
> || ccsc main.c +FH +P +DC +LO +EA +STDOUT I+="..\Includes"
> || >>> Warning 201 "C:\Project\Test\OnlineMS\Firmware\Source\rs232.c"
> Line 48(1,1): Assignment inside relational expression
> || *** Error 12 "C:\Project\Test\OnlineMS\Firmware\Source\main.c" Line
> 97(3,4): Undefined identifier   j
> ||   1 Errors,  1 Warnings.
> [...]

To avoid mistakes, it would be easier if you
provided your *compiler's* output, not what you
see in the quickfix window. For example, in the
above, one has to deduce that the line wrap has
been added by vim, but it may as well have been in
the compiler's output. Another reason will be
apparent below.

> I guess what I need to define is the format for
> only these 2 lines (correct me if I'm wrong) ,
> and can ignore the rest.

Yes, I think this is correct.

> || >>> Warning 201 "C:\Project\Test\OnlineMS\Firmware\Source\rs232.c"
> Line 48(1,1): Assignment inside relational expression
> || *** Error 12 "C:\Project\Test\OnlineMS\Firmware\Source\main.c" Line
> 97(3,4): Undefined identifier   j
> 
> Here is what I think I should define.
> \|\|\ \>\>\>\ %t\ %n\ %f\ Line\ %lXXX%m
> \|\|\ \*\*\*\ %t\ %n\ %f\ Line\ %lXXX%m
> Can you spot anything wrong here?

Yes. 

The || characters at the beginning of the line are
added by vim on lines it doesn't recognize. You
needn't parse them because they are not part of
you compiler's output.

> How do I deal with the (1,1), and the (3,4)?

That depends what they mean. 

-- 
JR


Re: Error In Documentation?

2007-03-25 Thread Vigil

On Sun, 25 Mar 2007, A.J.Mechelynck wrote:

When used after an ex-command which expects a file name, % means the filename 
of the current buffer, and # means the filename of the alternate buffer.


See
:help edit-intro
:help cmdline-special


Thanks - I didn't think of it being used like that. I certainly didn't realise 
that :_% referred to it! I guess in the help system, an underscore means 
'something arbitrary here'.


--

.


Re: Error In Documentation?

2007-03-25 Thread A.J.Mechelynck

Vigil wrote:
[...]

This
option may contain '%' and '#' characters, which are expanded like
when used in a command-line.

I think that needs explaining a bit more. To me, % is used when 
specifying the entire range of the file on the vim command line, and # 
prints lines with their respective line numbers :/




% means 1,$ when used as a range, between the colon and the ex-command. # is 
equivalent to "number" when used as an ex-command (:#). Neither apply here.


When used after an ex-command which expects a file name, % means the filename 
of the current buffer, and # means the filename of the alternate buffer.


See
:help edit-intro
:help cmdline-special


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
138. You develop a liking for cold coffee.




Re: Error In Documentation?

2007-03-25 Thread Bram Moolenaar

Vigil wrote:

> On Sun, 25 Mar 2007, Bram Moolenaar wrote:
> 
> > You apparently really want to pass ${*} to the shell command.  The help
> > for makeprg explains replacing $* with the name of the file, but you use
> > "%" for that.
> 
> My help says that $* is replaced with the arguments, which I take to
> mean -T in my example:
> 
>  The placeholder "$*" can be given (even multiple times) to specify
>  where the arguments will be included
> 
> It doesn't say anything about the filename. Maybe it needs to
> distinguish which arguments it is referring to.

Sorry, "$*" is indeed replaced by the ":make" arguments, not the file name.

> > This probably also works:
> >
> >setlocal makeprg=/usr/share/vim/vim70/tools/efm_perl.pl\ -c\ -w\ $*
> 
> Nope. When I replace efm_perl.pl with efm_perl2.pl, a simple script that 
> outputs the arguments it was called with, and I have
> 
>   set makeprg=~/.vim/tools/efm_perl2.pl\ -c\ -w\ ${*}\ %
> 
> and I call ":make" on the file that I have open ('binary.pl'), efm_perl2.pl 
> outputs
> 
>   Called with: -c -w binary.pl
>
> When I call it with ":make -T", it outputs
> 
>   Called with: -c -w binary.pl -T

What happens here is that ${*} is changed by the shell to an empty
string.  Then % is changed to the file name, and the other arguments
follow, since you don't use $*.  If you leave out ${*} you get the same
result.

> Now, if I change the makeprg thus:
> 
>   set makeprg=~/.vim/tools/efm_perl2.pl\ -c\ -w\ $*
> 
> and call ":make":
> 
>   Called with: -c -w
> 
> and ":make -T":
> 
>   Called with: -c -w -T
> 
> As you can see, the filename of the current buffer is not passed to the 
> makeprg.

No, but the argument is.  Thus these two are equivalent:

set makeprg=~/.vim/tools/efm_perl2.pl\ -c\ -w\ % $*
set makeprg=~/.vim/tools/efm_perl2.pl\ -c\ -w\ %

Because when $* is not used you get the arguments anyway.

> Further experimentation reveals that the order of "%\ ${*}" or "${*}\
> %" makes no difference to the arguments that efm_perl2.pl is passed,
> nor their order.  Indeed, ${*} is superfluous, but it does seem that I
> need % to substitute both the filename AND any arguments I give to
> :make.
> 
> $* and all variations of braces in and around it, just doesn't work.
> 
>   This option may contain '%' and '#' characters, which are
>   expanded like when used in a command-line.
> 
> I think that needs explaining a bit more. To me, % is used when
> specifying the entire range of the file on the vim command line, and #
> prints lines with their respective line numbers :/

This refers to using them in an argument.  That should be mentioned,
I'll adjust the text.

-- 
It is illegal for anyone to give lighted cigars to dogs, cats, and other
domesticated animal kept as pets.
[real standing law in Illinois, United States of America]

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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///


Re: Error In Documentation?

2007-03-25 Thread Vigil

On Sun, 25 Mar 2007, Bram Moolenaar wrote:


You apparently really want to pass ${*} to the shell command.  The help
for makeprg explains replacing $* with the name of the file, but you use
"%" for that.


My help says that $* is replaced with the arguments, which I take to mean -T in 
my example:


The placeholder "$*" can be given (even multiple times) to specify
where the arguments will be included

It doesn't say anything about the filename. Maybe it needs to distinguish which 
arguments it is referring to.



This probably also works:

   setlocal makeprg=/usr/share/vim/vim70/tools/efm_perl.pl\ -c\ -w\ $*


Nope. When I replace efm_perl.pl with efm_perl2.pl, a simple script that 
outputs the arguments it was called with, and I have


set makeprg=~/.vim/tools/efm_perl2.pl\ -c\ -w\ ${*}\ %

and I call ":make" on the file that I have open ('binary.pl'), efm_perl2.pl 
outputs


Called with: -c -w binary.pl

When I call it with ":make -T", it outputs

Called with: -c -w binary.pl -T

Now, if I change the makeprg thus:

set makeprg=~/.vim/tools/efm_perl2.pl\ -c\ -w\ $*

and call ":make":

Called with: -c -w

and ":make -T":

Called with: -c -w -T

As you can see, the filename of the current buffer is not passed to the 
makeprg.


Further experimentation reveals that the order of "%\ ${*}" or "${*}\ %" makes 
no difference to the arguments that efm_perl2.pl is passed, nor their order. 
Indeed, ${*} is superfluous, but it does seem that I need % to substitute both 
the filename AND any arguments I give to :make.


$* and all variations of braces in and around it, just doesn't work.

This
option may contain '%' and '#' characters, which are expanded like
when used in a command-line.

I think that needs explaining a bit more. To me, % is used when specifying the 
entire range of the file on the vim command line, and # prints lines with their 
respective line numbers :/


--

.


Re: Error In Documentation?

2007-03-25 Thread Bram Moolenaar

Vigil wrote:

> On Fri, 23 Mar 2007, Bram Moolenaar wrote:
> 
> >> in :help makeprg, I think the {$*} in the example ought to be ${*}. At
> >> least, it wouldn't work for me unless I did that.
> >
> > No, it's really $*.  This is replaced by Vim before passing the command
> > to the shell.
> 
> $* and {$*} won't work in my ftplugin. This, however, does:
> 
> setlocal makeprg=/usr/share/vim/vim70/tools/efm_perl.pl\ -c\ -w\ ${*}\ %
> 
> Perhaps the braces are to get around ithe command being sourced from a file?

You apparently really want to pass ${*} to the shell command.  The help
for makeprg explains replacing $* with the name of the file, but you use
"%" for that.

This probably also works:

setlocal makeprg=/usr/share/vim/vim70/tools/efm_perl.pl\ -c\ -w\ $*

No idea why you wanted to include the {}.  In the example it's for the
latex command.

-- 
SIGFUN -- signature too funny (core dumped)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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///


Re: Error In Documentation?

2007-03-24 Thread Vigil

On Fri, 23 Mar 2007, Bram Moolenaar wrote:


in :help makeprg, I think the {$*} in the example ought to be ${*}. At
least, it wouldn't work for me unless I did that.


No, it's really $*.  This is replaced by Vim before passing the command
to the shell.


$* and {$*} won't work in my ftplugin. This, however, does:

setlocal makeprg=/usr/share/vim/vim70/tools/efm_perl.pl\ -c\ -w\ ${*}\ %

Perhaps the braces are to get around ithe command being sourced from a file?

--

.


Re: Error In Documentation?

2007-03-23 Thread Bram Moolenaar

Vigil wrote:

> In vim's:
> 
> VIM - Vi IMproved 7.0 (2006 May 7, compiled May 30 2006 13:06:19)
> VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57)
> 
> in :help makeprg, I think the {$*} in the example ought to be ${*}. At
> least, it wouldn't work for me unless I did that.

No, it's really $*.  This is replaced by Vim before passing the command
to the shell.

-- 
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
  then shalt thou count to three, no more, no less.  Three shalt be the
  number thou shalt count, and the number of the counting shalt be three.
  Four shalt thou not count, neither count thou two, excepting that thou
  then proceed to three.  Five is right out.  Once the number three, being
  the third number, be reached, then lobbest thou thy Holy Hand Grenade of
  Antioch towards thou foe, who being naughty in my sight, shall snuff it.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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///


Re: Error

2007-03-23 Thread A.J.Mechelynck

Andreas Bakurov wrote:

felipe fernandez wrote:

I update vim 6.3 to 7.0 on my debian.  The error is
Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim:
línea  150
E121: Variable sin definir: paste#paste_cmd.
E15: Expresión no válida: 'vnoremenu 

Re: Error

2007-03-23 Thread A.J.Mechelynck

felipe fernandez wrote:

I update vim 6.3 to 7.0 on my debian.  The error is
Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim:
línea  150
E121: Variable sin definir: paste#paste_cmd.
E15: Expresión no válida: 'vnoremenu 

Re: Error

2007-03-22 Thread Andreas Bakurov
felipe fernandez wrote:
> I update vim 6.3 to 7.0 on my debian.  The error is
> Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim:
> línea  150
> E121: Variable sin definir: paste#paste_cmd.
> E15: Expresión no válida: 'vnoremenu 

Re: Error when setting spellfile and spelllang?

2007-03-09 Thread Mark Woodward
2 seconds after sending the previous post I find :mkspell in help which
shows how to combine up to 8 regions into a single spell file!!!


Isn't it always the way!


-- 
Mark


On Fri, 2007-03-09 at 21:14 +1100, Mark Woodward wrote:
> Hi again,
> 
> I think I've found the solution.
> I was setting spelllang to use 2 en_* languages. Australian and US,
> which looks like it was trying to load en.utf-8.spl twice??
> (ie set spelllang=en_au,en_us)
> 
> If I set it to 2 distinct languages (eg set spelllang=en_au,nl) then it
> works as expected.
> 
> So now the question is can I configure spelllang somehow to use 3
> (en_au, en_us and en_gb) english variants??
> 
> I don't want either color or colour to show as errors for eg.
> 
> 
> cheers,
> 
> 
> -- 
> Mark
> 
> 
> 
> On Wed, 2007-03-07 at 21:56 +1100, Mark Woodward wrote:
> > Hi all,
> > 
> > This is probably not the appropriate mailing list but I'm not subscribed
> > to the dev list.
> > 
> > OS: ubuntu edgy 6.10
> > Vim:
> > VIM - Vi IMproved 7.0 (2006 May 7, compiled Feb 25 2007 20:14:58)
> > Included patches: 1-30, 32, 31-32, 32-201
> > Compiled by MarkWoodward
> > Huge version with GTK2 GUI.  Features included (+) or not (-):
> > +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
> > +cindent +clientserver 
> > +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv
> > +cscope +cursorshape 
> > +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra
> > +extra_search +farsi 
> > +file_in_path +find_in_path +folding -footer +fork() +gettext
> > -hangul_input +iconv +insert_expand 
> > +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
> > +localmap +menu +mksession 
> > +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm
> > +mouse_netterm +mouse_xterm 
> > +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra
> > +perl +postscript +printer
> >  +profile +python +quickfix +reltime +rightleft +ruby +scrollbind +signs
> > +smartindent -sniff 
> > +statusline -sun_workshop +syntax +tag_binary +tag_old_static
> > -tag_any_white -tcl +terminfo 
> > +termresponse +textobjects +title +toolbar +user_commands +vertsplit
> > +virtualedit +visual 
> > +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
> > +writebackup +X11 -xfontset +xim 
> > +xsmp_interact +xterm_clipboard -xterm_save 
> >system vimrc file: "$VIM/vimrc"
> >  user vimrc file: "$HOME/.vimrc"
> >   user exrc file: "$HOME/.exrc"
> >   system gvimrc file: "$VIM/gvimrc"
> > user gvimrc file: "$HOME/.gvimrc"
> > system menu file: "$VIMRUNTIME/menu.vim"
> >   fall-back for $VIM: "/usr/local/share/vim"
> > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> > -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
> > -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
> > -I/usr/lib/glib-2.0/include -O2 -fno-strength-reduce -Wall
> > -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
> > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> > -I/usr/lib/perl/5.8/CORE  -I/usr/include/python2.4 -pthread
> > -I/usr/lib/ruby/1.8/i486-linux 
> > Linking: gcc   -rdynamic -Wl,-export-dynamic  -Wl,-E   -L/usr/local/lib
> > -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
> > -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr
> > -lXcursor -lXfixes -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0
> > -lglib-2.0   -lXt -lncurses -Wl,-E
> > -L/usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
> > -L/usr/lib/perl/5.8/CORE -lperl -L/usr/lib/python2.4/config -lpython2.4
> > -lutil -Xlinker -export-dynamic  -lruby1.8 -lm   
> > 
> > 
> > I'd just added the following 2 lines to my .vimrc:
> > set
> > spellfile=~/.vim/personal.utf-8.add,~/.vim/uni.utf-8.add,~/.vim/programming.utf-8.add
> > set spelllang=en_au,en_us
> > 
> > set encoding? tells me I'm using utf-8
> > 
> > Steps:
> > opened gvim from the command line
> > :Explore ~/UniSVN/GCO3818/
> > choose a file
> > set spell
> > showed errors in red/ gramma errors in blue
> > *** with the cursor over a spelling error z= produces the output
> > below ***
> > (this had worked prior to adding lines to .vimrc)
> > 
> > 
> > ---
> > [EMAIL PROTECTED]:~$ gvim
> > [EMAIL PROTECTED]:~$ *** glibc detected *** gvim: double free or corruption 
> > (!
> > prev): 0x08734680 ***
> > === Backtrace: =
> > /lib/tls/i686/cmov/libc.so.6[0xb750a8bd]
> > /lib/tls/i686/cmov/libc.so.6(__libc_free+0x84)[0xb750aa44]
> > gvim[0x81857c7]
> > gvim(spell_suggest+0x1c1)[0x8186c91]
> > gvim[0x812bf98]
> > gvim(normal_cmd+0x3d0)[0x812db90]
> > gvim(main_loop+0x273)[0x80f2393]
> > gvim(main+0xade)[0x80f57fe]
> > /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb74b98cc]
> > gvim[0x806e511]
> > === Memory map: 
> > 0804

Re: Error when setting spellfile and spelllang?

2007-03-09 Thread Mark Woodward
Hi again,

I think I've found the solution.
I was setting spelllang to use 2 en_* languages. Australian and US,
which looks like it was trying to load en.utf-8.spl twice??
(ie set spelllang=en_au,en_us)

If I set it to 2 distinct languages (eg set spelllang=en_au,nl) then it
works as expected.

So now the question is can I configure spelllang somehow to use 3
(en_au, en_us and en_gb) english variants??

I don't want either color or colour to show as errors for eg.


cheers,


-- 
Mark



On Wed, 2007-03-07 at 21:56 +1100, Mark Woodward wrote:
> Hi all,
> 
> This is probably not the appropriate mailing list but I'm not subscribed
> to the dev list.
> 
> OS: ubuntu edgy 6.10
> Vim:
> VIM - Vi IMproved 7.0 (2006 May 7, compiled Feb 25 2007 20:14:58)
> Included patches: 1-30, 32, 31-32, 32-201
> Compiled by MarkWoodward
> Huge version with GTK2 GUI.  Features included (+) or not (-):
> +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
> +cindent +clientserver 
> +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv
> +cscope +cursorshape 
> +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra
> +extra_search +farsi 
> +file_in_path +find_in_path +folding -footer +fork() +gettext
> -hangul_input +iconv +insert_expand 
> +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
> +localmap +menu +mksession 
> +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm
> +mouse_netterm +mouse_xterm 
> +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra
> +perl +postscript +printer
>  +profile +python +quickfix +reltime +rightleft +ruby +scrollbind +signs
> +smartindent -sniff 
> +statusline -sun_workshop +syntax +tag_binary +tag_old_static
> -tag_any_white -tcl +terminfo 
> +termresponse +textobjects +title +toolbar +user_commands +vertsplit
> +virtualedit +visual 
> +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
> +writebackup +X11 -xfontset +xim 
> +xsmp_interact +xterm_clipboard -xterm_save 
>system vimrc file: "$VIM/vimrc"
>  user vimrc file: "$HOME/.vimrc"
>   user exrc file: "$HOME/.exrc"
>   system gvimrc file: "$VIM/gvimrc"
> user gvimrc file: "$HOME/.gvimrc"
> system menu file: "$VIMRUNTIME/menu.vim"
>   fall-back for $VIM: "/usr/local/share/vim"
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -O2 -fno-strength-reduce -Wall
> -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/lib/perl/5.8/CORE  -I/usr/include/python2.4 -pthread
> -I/usr/lib/ruby/1.8/i486-linux 
> Linking: gcc   -rdynamic -Wl,-export-dynamic  -Wl,-E   -L/usr/local/lib
> -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
> -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr
> -lXcursor -lXfixes -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0
> -lglib-2.0   -lXt -lncurses -Wl,-E
> -L/usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
> -L/usr/lib/perl/5.8/CORE -lperl -L/usr/lib/python2.4/config -lpython2.4
> -lutil -Xlinker -export-dynamic  -lruby1.8 -lm   
> 
> 
> I'd just added the following 2 lines to my .vimrc:
> set
> spellfile=~/.vim/personal.utf-8.add,~/.vim/uni.utf-8.add,~/.vim/programming.utf-8.add
> set spelllang=en_au,en_us
> 
> set encoding? tells me I'm using utf-8
> 
> Steps:
> opened gvim from the command line
> :Explore ~/UniSVN/GCO3818/
> choose a file
> set spell
> showed errors in red/ gramma errors in blue
> *** with the cursor over a spelling error z= produces the output
> below ***
> (this had worked prior to adding lines to .vimrc)
> 
> 
> ---
> [EMAIL PROTECTED]:~$ gvim
> [EMAIL PROTECTED]:~$ *** glibc detected *** gvim: double free or corruption (!
> prev): 0x08734680 ***
> === Backtrace: =
> /lib/tls/i686/cmov/libc.so.6[0xb750a8bd]
> /lib/tls/i686/cmov/libc.so.6(__libc_free+0x84)[0xb750aa44]
> gvim[0x81857c7]
> gvim(spell_suggest+0x1c1)[0x8186c91]
> gvim[0x812bf98]
> gvim(normal_cmd+0x3d0)[0x812db90]
> gvim(main_loop+0x273)[0x80f2393]
> gvim(main+0xade)[0x80f57fe]
> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb74b98cc]
> gvim[0x806e511]
> === Memory map: 
> 08048000-081fb000 r-xp  08:12 18388768   /usr/local/bin/vim
> 081fb000-08209000 rw-p 001b2000 08:12 18388768   /usr/local/bin/vim
> 08209000-0875a000 rw-p 08209000 00:00 0  [heap]
> b5f0-b5f21000 rw-p b5f0 00:00 0 
> b5f21000-b600 ---p b5f21000 00:00 0 
> b605-b605a000 r-xp  08:12 10125379   /lib/libgcc_s.so.1
> b605a000-b605b000 rw-p 9000 08:12 10125379   /lib/libgcc_s.so.1
> b607-b61d rw-p b607 00:00 0 
> b61d1000-b61d

Re: error in help on tag-highlight ?

2007-01-08 Thread Bram Moolenaar

Toon Knapen wrote:

> I'm looking into using ctags in combination with vim and was looking for 
> highlighting the tags in vim. The :help tag-highlight explains how the 
> necessary tags.vim file can be generated. I do have two questions 
> regarding this info however:
> 
> 1) It mentions a (make-) rule to generate a types.vim file from a types 
> file. Am I correct in supposing this 'types' file is actually the tags 
> file ?

There is no tags file stored, the output of ctags is filtered and stored
in types.vim.  Thus the result is a Vim script with syntax commands.

> 2) The ctags command seems not be correct. Whenever I launch Exuberant 
> ctags 5.5.4 with the option '-i=gstuS' I get the error 'Unknown option: 
> -i'. And indeed, the ctags man page does not mention a -i option.

The correct command actually is in src/Makefile:

ctags --c-kinds=gstu -o- *.[ch] |\
awk 'BEGIN{printf("syntax keyword Type\t")}\
{printf("%s ", $$1)}END{print ""}' > $@


I'll correct the help file.

An exercise for the reader: rewrite the awk commands in Vim script.

-- 
The average life of an organization chart is six months.  You can safely
ignore any order from your boss that would take six months to complete.
(Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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///


Re: error in help on tag-highlight ?

2006-12-28 Thread Toon Knapen

Theerasak Photha wrote:


(I hope you don't mind that I am putting this on the mailing list---I
like to share my thoughts with everyone.)


sure



The material in the manual is evidently based on outdated information,
as the ctags invocation given doesn't work


Is there some process to make sure this documentation will be corrected 
for the next release? Soth. I can do?



---however, I will point you
to the excellent Vim taglist plugin, which is very current and can
also highlight tags:

http://www.vim.org/scripts/script.php?script_id=273



But this will highlight the tags in the taglist window. What I would 
like is that in my source files, the keywords that make me jump to a 
tag, will be highlighted so that I know which words serve as keyword 
(keywords being the words on which I place my cursor and subsequently 
push ctrl-] to jump to the tag).


This is e.g. available in the help text of vim. But I think this is 
accomplised through syntax highlighting. In the help, all words in 
between pipes ('|') are coloured and also serve as keywords. But now I 
want these keywords to be highlighted in _addition_ to the syntax 
highlighting that I am using for my (C,C++,...) source files.


Thanks in advance for any valuable pointer,

toon



Re: error in help on tag-highlight ?

2006-12-27 Thread Theerasak Photha

On 12/27/06, Toon Knapen <[EMAIL PROTECTED]> wrote:

>> 1) It mentions a (make-) rule to generate a types.vim file from a types
>> file. Am I correct in supposing this 'types' file is actually the tags
>> file ?
>
> Well, the name of the tags file is customarily 'tags' or 'TAGS'.


That is the reason why I am not sure the 'types' file is actually the
tags file because the tags file is generally named 'tags'. So is this
'types' file the actual tags file?


(I hope you don't mind that I am putting this on the mailing list---I
like to share my thoughts with everyone.)

The material in the manual is evidently based on outdated information,
as the ctags invocation given doesn't work---however, I will point you
to the excellent Vim taglist plugin, which is very current and can
also highlight tags:

http://www.vim.org/scripts/script.php?script_id=273


Re: error in help on tag-highlight ?

2006-12-27 Thread Toon Knapen

1) It mentions a (make-) rule to generate a types.vim file from a types
file. Am I correct in supposing this 'types' file is actually the tags
file ?


Well, the name of the tags file is customarily 'tags' or 'TAGS'.



That is the reason why I am not sure the 'types' file is actually the 
tags file because the tags file is generally named 'tags'. So is this 
'types' file the actual tags file?


t


Re: error in help on tag-highlight ?

2006-12-27 Thread Theerasak Photha

On 12/27/06, Toon Knapen <[EMAIL PROTECTED]> wrote:

Hi all,

I'm looking into using ctags in combination with vim and was looking for
highlighting the tags in vim. The :help tag-highlight explains how the
necessary tags.vim file can be generated. I do have two questions
regarding this info however:

1) It mentions a (make-) rule to generate a types.vim file from a types
file. Am I correct in supposing this 'types' file is actually the tags
file ?


Well, the name of the tags file is customarily 'tags' or 'TAGS'.

--
FREE HANS


Re: error reading from stdin, vim 7.0.164

2006-11-22 Thread Gregory Margo
On Tue, Nov 21, 2006 at 09:34:45AM -0500, Adam Mercer wrote:
> On 21/11/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> >In the latest vim (7.0.164), I am getting "error reading
> >from stdin":
> >ls | vim -u NONE -
> >
> >Vim: Reading from stdin...
> >Vim: Error reading input, exiting...
> 
> Works fine for me on Mac OS X, as in is opens a vim session with the
> listing of the current directory in the current buffer.
> 

Also works fine for me on Debian Stable i386.
I tried 7.0.164 and 7.0.168.

-- 
+
Gregory H. Margo


Re: Error when running :Explore

2006-07-12 Thread Curtis Spencer

> > I am getting a transient error with vim 7.0.17 when I run :Explore.
> > 
> > I get this error text:
> > Error detected while processing function 31_Highlight_Matching_Pair
> > 
> > E316: ml_get: cannot find line 8
> > 
> > and then I get a stream of E316s with increasing line #'s.
> > 
> > Anyone see this before?
> 
> That should not happen.  Can you describe how to reproduce this?
> 

Bram,

 It is hard to get an accurate test case because it is transient error,
 but it occurs usually after running a long time and doing an :Explore
 right after a delete of a few lines.  If hold down enter for a while to
 go through all of the ml_get errors, I then get a buffer entitled ???,
 and I can then reproduce the error at will by doing more :Explore
 calls.  Also, I use f that is bound to the :Explore, but I
 doubt that matters at all.

 -Curtis




Re: Error detected while processing BufRead Auto commands for "httpd.conf*": E492:Not an editor command. (fix) (Centos-4)

2006-07-11 Thread Benji Fisher
On Wed, Jul 12, 2006 at 01:49:57AM +0100, dave--uk wrote:
> Having installed vim7.0, I'm getting the following error when I open 
> httpd.conf
> 
> Error detected while processing BufRead Auto commands for "httpd.conf*":
> E492: Not an editor command: auth_mysql.conf*,auth_pgsql.conf*,
> ssl.conf*,perl.conf*,php.conf*,python.conf*,squirrelmail.conf* call s
> :StarSetf('apache')
> Press ENTER or type command to continue
> 
> The corresponding part of /usr/share/vim/vim70/filetype.vim reads:
> 
> " Apache config file
> au BufNewFile,BufRead .htaccess  setf apache
> au BufNewFile,BufRead
> httpd.conf*,srm.conf*,access.conf*,apache.conf*,apache2.conf*,/etc/apache2/*.conf*
> auth_mysql.conf*,auth_pgsql
> .conf*,ssl.conf*, perl.conf*,php.conf*,python.conf*,squirrelmail.conf*
> call s:StarSetf('apache')
> 
> It looks like there is a comma missing here: "
> ,/etc/apache2/*.conf*>>,< 
> I don't know if this is a problem with the binary distribution I used
> or a more general issue, but I thought it was worth a mention here

 I think your filetype.vim is munged.  It is a little hard to figure
out, since (as I read them) the lines in your e-mail have been broken.
My copy (a little out of date, since I have vim 7.0 with no patches)
starts

" Vim support file to detect file types
"
" Maintainer:   Bram Moolenaar <[EMAIL PROTECTED]>
" Last Change:  2006 May 02

and contains the three(!) lines

" Apache config file
au BufNewFile,BufRead .htaccess  setf apache
au BufNewFile,BufRead 
httpd.conf*,srm.conf*,access.conf*,apache.conf*,apache2.conf*,/etc/apache2/*.conf*
 call s:StarSetf('apache')

In fact, a search for "auth" in my copy of filetype.vim fails.

HTH --Benji Fisher


Re: Error when running :Explore

2006-07-11 Thread Bram Moolenaar

Curtis Spencer wrote:

> I am getting a transient error with vim 7.0.17 when I run :Explore.
> 
> I get this error text:
> Error detected while processing function 31_Highlight_Matching_Pair
> 
> E316: ml_get: cannot find line 8
> 
> and then I get a stream of E316s with increasing line #'s.
> 
> Anyone see this before?

That should not happen.  Can you describe how to reproduce this?

-- 
An alien life briefly visits earth.  Just before departing it leaves a
message in the dust on the back of a white van.  The world is shocked
and wants to know what it means.  After months of studies the worlds
best linguistic scientists are able to decipher the message: "Wash me!".

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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///


Re: Error detected while processing function 1_BMShow

2006-06-14 Thread Mathias Michaelis
Hi Tony

>> Since I can confirm that behaviour of gvim, I am "the user" :-)
>> I believe that nobody knows the Vim manual better than you, but
>> [...]
>> 
> If someone knows the Vim docs better than anyone, I bet it's Bram
> Moolenaar. ("Flatter not thy brother, it is treason; should thy
> brother flatter thee, fear lest he should corrupt thee." How are
> you trying to corrupt me? ;-) )
>
The corruption was: Let me alive if I am telling silly things. How
you are trying to corrupt Bram? ;-)

> Under ":help -u" [...]
> IOW, -u NONE implies -U NONE
>
Good to know.

> From what I found out answering another user, ":filetype on" (and
> its variations) implicitly loads the menu structure. So if you
> issued a ":filetype [...] on" statement manually, that implicitly
> loaded the menus (and issued the incriminated messages, [...]
> 
I didn't. I think the behaviour should be reproducible as the OP
described, even on Linux and even with a gvim that isn't built with
Visual Studio.

> Otherwise, menu.vim is still sourced, as you noted, at GUI 
> inistialization time (see ":help -U" and ":help gui-init". The
> latter has something which will probably be of interest to you
> (under ":help buffers-menu"):
> 
>   The system menu file includes a "Buffers" menu. If you don't
>   want this, set the "no_buffers_menu" variable in your .vimrc
>
Thanks! I successfully tried

gvim -u NONE -c "let no_buffers_menu=1" -c "set verbosefile=vim.log"

and got no "&Buffers" menu and no error message in vim.log. But
anyway: I still think that

1. The OP didn't do anything wrong
2. The behaviour he reported is a feature, not a bug

Greetings

Mathias


Re: Error detected while processing function 1_BMShow

2006-06-13 Thread A.J.Mechelynck

Mathias Michaelis wrote:

Tony, Andalou

  

If I do: gvim -u NONE -U NONE -c "set verbosefile=C:/vim.log"
I get: [...]

E329: No menu "&Buffer" [...]



I can confirm that behaviour of gvim, but I think it is a feature,
not a bug.

  

[...]
However, under ":help -u" it is said that "-u NONE" disables vimrc, 
gvimrc, and all global plugins. If menu.vim was sourced nevertheless, 
then IIUC the user must have somehow triggered that sourcing.




Since I can confirm that behaviour of gvim, I am "the user" :-) I
believe that nobody knows the Vim manual better than you, but after
seriously studying

:help startup
:help gui-init

I think that -u NONE prevents only the global plugin to be loaded,
but do not prevent the initialisation of the graphical user
interface, while -U NONE prevents the latter with one exception: The
system-wide menu files are sourced. If I verify this with

:help -U

,I come to the same conclusion. To prevent gvim from sourcing the
menu.vim script, call it like that:

gvim -u NONE -U NONE --cmd "set guioptions+=M" \
-c "set verbosefile=vim.log"

Indeed! Now the error messages within the vim.log file have
vanished! This is why I think that "the user" is innocent ;-)

Best regards

Mathias



  


You're saying that "no one" knows the Vim documentation better than I. I 
have studied it assiduously (as, IMHO, any Vim user should do) but I am 
by far not the oldest user of Vim on this list. I first knew Vim when 
its latest release was 6.1, and there are people here who remember 5.7. 
If someone knows the Vim docs better than anyone, I bet it's Bram 
Moolenaar. ("Flatter not thy brother, it is treason; should thy brother 
flatter thee, fear lest he should corrupt thee." How are you trying to 
corrupt me? ;-) )



Under ":help -u" (at lines 431-434 of $VIMRUNTIME/doc/starting.txt for 
Vim 7.0, last change 2006 Apr 25):


  [...]
   When {vimrc} is equal to "NONE" (all uppercase), all
   initializations from files and environment variables are
   skipped, including reading the |gvimrc| file when the GUI
   starts.  Loading plugins is also skipped.
  [...]

IOW, -u NONE implies -U NONE

From what I found out answering another user, ":filetype on" (and its 
variations) implicitly loads the menu structure. So if you issued a 
":filetype [...] on" statement manually, that implicitly loaded the 
menus (and issued the incriminated messages, which were intentionally 
ignored except for verbose logging, when trying to delete a nonexistent 
menu structure).


Otherwise, menu.vim is still sourced, as you noted, at GUI 
inistialization time (see ":help -U" and ":help gui-init". The latter 
has something which will probably be of interest to you (under ":help 
buffers-menu"):


 The system menu file includes a "Buffers" menu.  If you don't want 
this, set

 the "no_buffers_menu" variable in your .vimrc (not .gvimrc!): >
   :let no_buffers_menu = 1
< NOTE: Switching on syntax highlighting also loads the menu file, thus
 disabling the Buffers menu must be done before ":syntax on".

...and, I would add, also before ":filetype on" or any of its variations.


Best regards,
Tony.


Re: Error detected while processing function 1_BMShow

2006-06-13 Thread Mathias Michaelis
Tony, Andalou

>>> If I do: gvim -u NONE -U NONE -c "set verbosefile=C:/vim.log"
>>> I get: [...]
>>>
>>> E329: No menu "&Buffer" [...]
>>> 
>> I can confirm that behaviour of gvim, but I think it is a feature,
>> not a bug.
>>
> [...]
> However, under ":help -u" it is said that "-u NONE" disables vimrc, 
> gvimrc, and all global plugins. If menu.vim was sourced nevertheless, 
> then IIUC the user must have somehow triggered that sourcing.
>
Since I can confirm that behaviour of gvim, I am "the user" :-) I
believe that nobody knows the Vim manual better than you, but after
seriously studying

:help startup
:help gui-init

I think that -u NONE prevents only the global plugin to be loaded,
but do not prevent the initialisation of the graphical user
interface, while -U NONE prevents the latter with one exception: The
system-wide menu files are sourced. If I verify this with

:help -U

,I come to the same conclusion. To prevent gvim from sourcing the
menu.vim script, call it like that:

gvim -u NONE -U NONE --cmd "set guioptions+=M" \
-c "set verbosefile=vim.log"

Indeed! Now the error messages within the vim.log file have
vanished! This is why I think that "the user" is innocent ;-)

Best regards

Mathias



Re: Error detected while processing function 1_BMShow

2006-06-13 Thread A.J.Mechelynck

Cesar Romani wrote:

I use vim 7.0 on Windows XP compiled with MS Visual C.
If I do: gvim -u NONE -U NONE -c "set verbosefile=C:/vim.log"
I get:

--
Error detected while processing function 1_BMShow:
line   12:
E329: No menu "&Buffer"
Error detected while processing function 1_BMShow:
line   14:
E328: Menu only exists in another mode
Tear off this menu
---

Many thanks in advance,

Andalou



  
The error happened while sourcing the first sourced script (notice 
"1_"? That's the value of  for script #1). Do it again, and, 
once Vim has started up, check the output of


:scriptnames

The first line should tell you which script has the offending lines 
(search it for a function named BMShow or s:BMShow).


Notice that the standard Vim menus include a &Buffers menu (plural) but 
no &Buffer menu (singular).



Best regards,
Tony.


Re: Error detected while processing function 1_BMShow

2006-06-13 Thread Benji Fisher
On Tue, Jun 13, 2006 at 05:37:13PM +0200, Cesar Romani wrote:
> I use vim 7.0 on Windows XP compiled with MS Visual C.
> If I do: gvim -u NONE -U NONE -c "set verbosefile=C:/vim.log"
> I get:
> 
> --
> Error detected while processing function 1_BMShow:
> line   12:
> E329: No menu "&Buffer"
> Error detected while processing function 1_BMShow:
> line   14:
> E328: Menu only exists in another mode
> Tear off this menu
> ---
> 
> Many thanks in advance,
> 
> Andalou

 The 1_ bit refers to the first script that has been :source'd.
Since you started with -u NONE, this will be the first script in your
plugin directory.  In any event, you can see which script is :source'd
first with

:scriptnames

Check this.  I am pretty sure that it will not be one of the plugins
from the standard distribution.  Look at the plugin and search for the
BMShow function.

HTH --Benji Fisher