Re: vim color for white background

2007-02-16 Thread A.J.Mechelynck

atstake atstake wrote:

I have a white background and I set background color as "dark" which
is not really eye-candy. I do lots of sh/awk/sed/perl/C/make coding
and also use vim for mutt and also writing plain text documents, edit
conf/rc files etc. Which color would be the best for white background
for code syntax highlighting and also for mutt? I really don't care
about color for plain-text as long as it's black on white background.

Vim version: 7.0.42 on OpenBSD 4.0.

Thanks.



With a white background in Console Vim, the 'background' option should be set 
to "light" in order to tell Vim that the background is light. Console Vim 
cannot always guess that. (In gvim, black text on white background is the 
default.)


You may test the various colourschemes distributed with Vim, or available in 
the Scripts section at vim-online, by using


:colourscheme 

where  is the colourscheme name: for instance,

:colourscheme desert

will invoke $VIMRUNTIME/colors/desert.vim; if you install, let's say, some 
custom scheme as ~/.vim/colors/foobar.vim (on Unix) or 
$HOME/vimfiles/colors/foobar.vim (on Windows), you should use ":colorscheme 
foobar" in order to load it.


Once you find a colorscheme which pleases you (or if you write your own), you 
can place the appropriate line in your vimrc.



Best regards,
Tony.
--
"Oh, no!  NOT the Spanish Inquisition!"
"NOBODY expects the Spanish Inquisition!!!"
-- Monty Python sketch --
"Oh, no!  NOT another option!"
-- Discussion in vim-dev mailing list --


vim color for white background

2007-02-16 Thread atstake atstake

I have a white background and I set background color as "dark" which
is not really eye-candy. I do lots of sh/awk/sed/perl/C/make coding
and also use vim for mutt and also writing plain text documents, edit
conf/rc files etc. Which color would be the best for white background
for code syntax highlighting and also for mutt? I really don't care
about color for plain-text as long as it's black on white background.

Vim version: 7.0.42 on OpenBSD 4.0.

Thanks.


Re: Missing configuration commands in vim 7?

2007-02-16 Thread A.J.Mechelynck

Larry Alkoff wrote:

A.J.Mechelynck wrote:

Larry Alkoff wrote:

Charles E Campbell Jr wrote:

Larry Alkoff wrote:

I have a desktop and newly configured laptop with different 
versions of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on 
and set mouse?



These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?

Regards,
Chip Campbell





Hello Chip.

:version shows 7.0


It ought to show about a page of info. See at bottom for instance what 
mine displays.




The error I get is:

[EMAIL PROTECTED] X11 # vi xorg.conf
Error detected while processing /home/lba/.vimrc:
line   52:
E319: Sorry, the command is not available in this version:   syntax on
line  121:
E538: No mouse support: mouse=a
Press ENTER or type command to continue


Where line 52 says:
syntax on

and line 121 says:
set mouse=a

Larry




My vim is from Kubuntu Edgy Eft.  It would be surprising if they 
crippled the help.


Here is my :version.  I thought you only wanted the version number - sorry.

:version
VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57)
Included patches: 1-6
Compiled by [EMAIL PROTECTED]
Big version without 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 +dialog_con
+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 -netbeans_intg -osfiletype 
+path_extra -perl +postscript
+printer -python +quickfix +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

-xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -Wall
Linking: gcc   -L/usr/local/lib -o vim   -lncurses -lgpm
Hit ENTER or type command to continue

I've tried various things to continue the listing but it always goes 
back to the main editing screen.  Please tell me how to see the rest of it.


Larry




The above is the complete listing for that version. You can also get it into a 
file or (if compiled with clipboard support) into the clipboard, by using the 
":redir" command (see ":help :redir"). Or even at the shell prompt:


vim --version >version.text

The listing you gave above is for Vim 6.4.6 which has +mouse and +version, and 
where your vimrc should work with no error. If you do


vi --version >version7.txt

on your 7.0 version, I expect you'll see "Tiny version without GUI" and also 
-mouse and -syntax, which explain the errors you got. On the same system, 
using "vim" rather than "vi" should cure the error, if some "vim" program is 
installed under that name. On RedHat-like system, there are up to four "vim" 
packages, all of which can be installed side-by-side:


vim-common
required by each of the others
contains the runtime files
contains no editor executables
vim-minimal
a "minimum" version of Vim, installed as /bin/vi
includes neither syntax highlighting, mouse support, nor even
expression evaluation
it will be mounted even in single-user mode
vim-enhanced
an all-purpose Vim for use in console mode
installed as /usr/bin/vim
contains almost everything except the GUI code
vim-x11
installed as /usr/X11R6/bin/gvim
contains everything, including the GUI.

You may install all four packages, then invoke Vim as:
- vionly when working in single-user mode (for system repairs), if
/usr is not mounted or is corrupt.
- vim   in Console mode
- gvim  when working in an X11 window manager.

You should also bracket the vimrc lines which give an error in some versions, 
such as:


if has("syntax")
syntax on
endif
and
if has("mouse")
set mouse=a
endif

Versions without expression evaluation will 

surround.vim in AsNeeded

2007-02-16 Thread Bill McCarthy
Hello Vim List,

I just tried out surround.vim, recently updated on Vim
Online.  Nice plugin!

It works fine when placed in my plugin directory but doesn't
work if moved to my AsNeeded directory and :MkAsNeeded is
run.

Has anyone out there been able to get this to work?

-- 
Best regards,
Bill



Re: list

2007-02-16 Thread Bill McCarthy
On Fri 16-Feb-07 4:04pm -0600, Michael Phillips wrote:

> I should have sent an example of what I am trying to do.
>
> If I have the following text:
>
> http://www.google.com";>Google
>
> I want to put http://www.google.com into a List.

With the cursor on the line:

:let mylist=[matchstr(getline("."),'"\zs[^"]\+')]

-- 
Best regards,
Bill



Re: Missing configuration commands in vim 7?

2007-02-16 Thread Larry Alkoff

A.J.Mechelynck wrote:

Larry Alkoff wrote:

Charles E Campbell Jr wrote:

Larry Alkoff wrote:

I have a desktop and newly configured laptop with different versions 
of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on 
and set mouse?



These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?

Regards,
Chip Campbell





Hello Chip.

:version shows 7.0


It ought to show about a page of info. See at bottom for instance what 
mine displays.




The error I get is:

[EMAIL PROTECTED] X11 # vi xorg.conf
Error detected while processing /home/lba/.vimrc:
line   52:
E319: Sorry, the command is not available in this version:   syntax on
line  121:
E538: No mouse support: mouse=a
Press ENTER or type command to continue


Where line 52 says:
syntax on

and line 121 says:
set mouse=a

Larry




My vim is from Kubuntu Edgy Eft.  It would be surprising if they 
crippled the help.


Here is my :version.  I thought you only wanted the version number - sorry.

:version
VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57)
Included patches: 1-6
Compiled by [EMAIL PROTECTED]
Big version without 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 +dialog_con
+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 -netbeans_intg -osfiletype 
+path_extra -perl +postscript
+printer -python +quickfix +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

-xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -Wall
Linking: gcc   -L/usr/local/lib -o vim   -lncurses -lgpm
Hit ENTER or type command to continue 



I've tried various things to continue the listing but it always goes 
back to the main editing screen.  Please tell me how to see the rest of it.


Larry


--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: tips project

2007-02-16 Thread Kim Schulz
On Fri, 16 Feb 2007 02:37:28 +0100
Bram Moolenaar <[EMAIL PROTECTED]> wrote:

> 
> Hi all,
> 
> Google code has now added support for a wiki.  This means open source
> projects can have a wiki that's free, fast and reliable
> (hopefully :-).
> 
>   http://code.google.com/hosting/
> 
> During my presentation last Tuesday the idea came up (again) to move
> the Vim tips to a wiki.  The big advantage is that instead of having
> to read the notes below the tip to find out about improvements, the
> notes can be added in the right place, or even correct mistakes in
> the tip.
> 
> I would like to ask for volunteers who want to take the current tips
> and notes, write some kind of script to move them to the wiki and set
> it up for use.  If this works well we can delete the tips from the Vim
> website.  They are currently closed for updates anyway, thus this is a
> good time to try it.
> 
> Using the project name VimTips would be good.  Please don't create it
> unless you are going to set up the wiki!
> 

I am not sure that I like the idea of the Tips being on a Wiki. I like
the fact that I know exactly where to find a particular tip and that
chances are it will be there the next time I need it. 
That the main problem I encounter with wiki pages. Another thing is
that we most likely will encounter even more spam than now by moving to
a wiki (spambots are getting through, even when you have captcha and
user login). 
just my 5cents 

-- 
Kim Schulz| Private :  http://www.schulz.dk
[EMAIL PROTECTED] | Business:  http://www.devteam.dk
+45 5190 4262 | Sparetime: http://www.fundanemt.com


Re: list

2007-02-16 Thread Michael Phillips
I should have sent an example of what I am trying to do.

If I have the following text:

http://www.google.com";>Google

I want to put http://www.google.com into a List.

--- Michael Phillips <[EMAIL PROTECTED]> wrote:

> 
> --- Tim Chase <[EMAIL PROTECTED]> wrote:
> 
> > > How do I get part of a line into a list?
> > 
> > 
> > What sort of list?  An actual Vim7 "List" datatype?
> > Perhaps something like:
> > 
> > let my_list = [matchstr(getline(2), 'regexp')]
> 
> This is what I want.  Now I need help with the regexp. I would like to use
> the
> following expression:
> 
> "[^"]\+
> 
> but I do not want the first "
> 
> TIA
> 
> Michael D. Phillips - A computer science enthusiast
> I do not hate Windows, I just like the alternatives better.
> Linux is my primary choice.
> 
> 
>  
>

> 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
> 


Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.


 

Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com


Re: list

2007-02-16 Thread Michael Phillips

--- Tim Chase <[EMAIL PROTECTED]> wrote:

> > How do I get part of a line into a list?
> 
> 
> What sort of list?  An actual Vim7 "List" datatype?
> Perhaps something like:
> 
> let my_list = [matchstr(getline(2), 'regexp')]

This is what I want.  Now I need help with the regexp. I would like to use the
following expression:

"[^"]\+

but I do not want the first "

TIA

Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.


 

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: list

2007-02-16 Thread A.J.Mechelynck

Michael Phillips wrote:

I am trying to do this in a script.  I want this script to pick you certain
information and put it into a list.  After that delete the content and output
the list.


1. Please bottom-post in these lists.

2. Please "Reply to List" (if your mailer offers it) or "Reply to All" 
otherwise. Replying only "to sender" prevents other users from helping you.


3. OK, so how should the script decide which info to pick? Please give an 
example (before & after).



Best regards,
Tony.
--
"Yow!  Am I having fun yet?"
-- Zippy the Pinhead



Re: list

2007-02-16 Thread Tim Chase
> How do I get part of a line into a list?


What sort of list?  An actual Vim7 "List" datatype?
Perhaps something like:

let my_list = [matchstr(getline(2), 'regexp')]

(where "regexp" matches the part you want and "2" is the number
of the line in question)

Or, you have matches on multiple lines that you want to assemble
into a list:

:let my_list=[] | g/regexp/let my_list+=[matchstr(getline('.'), @/)]


which will accumulate the matches of just "regexp" in my_list[]

Or did you mean something else such as "I've got a todo-list in
my document and I want to move arbitrary pieces of other lines
into this todo-list"?

If the above doesn't help, perhaps you could clarify your intent.

-tim





Re: list

2007-02-16 Thread A.J.Mechelynck

Michael Phillips wrote:

How do I get part of a line into a list?

TIA


Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.


How do you define which part of which lines should go into the list?

One possibility would be to highlight the "interesting" text (hit v at one end 
then move the cursor to the other end), then add it at the bottom of the same 
file using


y
:$put

which you can map to a key:

:map  y:$put

There might be faster ways if you can define in unambiguous terms what you 
want to list.



Best regards,
Tony.
--
"Dear Mr. Seldes:  I cannot remember the exact wording of the statement
to which you allude; but what I meant was that ... a man who calls
himself a 100% American and is proud of it, is generally 150% an idiot
politically.  But the designations may be good business for war
veterans.  Having bled for their country in 1861 and 1918, they have
bled it all they could consequently.  And why not?"
-- George Seldes, "The Great Quotations"


Re: Missing configuration commands in vim 7?

2007-02-16 Thread Gary Johnson
On 2007-02-16, Larry Alkoff <[EMAIL PROTECTED]> wrote:
> Charles E Campbell Jr wrote:
> > Larry Alkoff wrote:
> >
> >> I have a desktop and newly configured laptop with different versions 
> >> of vim.
> >>
> >> The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
> >> set mouse=a
> >> syntax on
> >> They show in :help
> >>
> >>
> >> The laptop has vim 7.0.35 and gives an error on the above two vimrc 
> >> commands.  Also they don't show in :help.
> >>
> >> What has happened in vim 7?  Are there replacements for syntax on and 
> >> set mouse?
> >
> >
> > These commands are fine.  So, bring up your new vim and type:
> >  :version
> >
> > What does that show?

Tony has already addressed most of your issues, so I'll just add 
this.

> The error I get is:
> 
> [EMAIL PROTECTED] X11 # vi xorg.conf
> Error detected while processing /home/lba/.vimrc:
> line   52:
> E319: Sorry, the command is not available in this version:   syntax on
> line  121:
> E538: No mouse support: mouse=a
> Press ENTER or type command to continue
> 
> 
> Where line 52 says:
> syntax on
> 
> and line 121 says:
> set mouse=a

That explains a lot.  You're executing "vi", not "vim", and 
apparently on a Linux system.  Some Linux system vendors put a very 
limited version of vim in /bin/vi so that there is some editor that 
doesn't take much disk space or RAM available for troubleshooting 
systems that may not be able to mount /usr.

I get similar errors when I execute /bin/vi on a Red Hat 9 system.  
Executing :version shows that none of the mouse-related features 
were included.

:version
VIM - Vi IMproved 6.1 (2002 Mar 24, compiled Feb 12 2003 07:44:25)
Included patches: 1, 3-15, 17-18, 20-22, 24-34, 36-43, 45-49, 51-72, 74-75, 
77-8
3, 85-87, 89-92, 94-99, 101-118, 120-146, 150, 152-153, 157-183, 185-189, 
191-19
5, 197, 200-201, 203-227, 231-239, 241-242, 244-252, 254-258, 260-289, 
293-295,
297-299, 301-302, 305-310, 312-320
Compiled by <[EMAIL PROTECTED]>
Tiny version without GUI.  Features included (+) or not (-):
-autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
-clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info 
-comments
-cryptv -cscope -dialog -diff -digraphs -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 -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm
-mouse_xterm +multi_byte -multi_lang -osfiletype -path_extra -perl -printer
-python -quickfix -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 -viminfo -vreplace +wildignore -wildmenu
-windows +writebackup -X11 -xfontset -xim -xterm_clipboard -xterm_save
   system vimrc file: "/usr/share/vim/vim61/macros/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -march=i386 
-mcpu=i686 -
g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strength-reduce
Linking: gcc   -L/usr/local/lib -o vim   -ltermcap -lacl -ldl

The easiest solution is to use "vim" and not "vi".  That should run
/usr/bin/vim which is built with many more features than /bin/vi.
If your fingers are too accustomed to "vi" for that, you could put
an alias in your ~/.bashrc file:

alias vi=vim

Regards,
Gary

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


Re: Missing configuration commands in vim 7?

2007-02-16 Thread Charles E Campbell Jr

Larry Alkoff wrote:


Charles E Campbell Jr wrote:


Larry Alkoff wrote:

I have a desktop and newly configured laptop with different versions 
of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on 
and set mouse?




These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?




Hello Chip.

:version shows 7.0



This seems rather incomplete.  What I specifically need to know is 
whether you have +syntax and +mouse.  My version shows:


VIM - Vi IMproved 7.0 (2006 May 7, compiled Feb 13 2007 08:44:14)
Included patches: 1-195
Compiled by [I've taken this email address out in the probably forlorn 
hope that spammers will leave it alone]

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 -g -O2-D_REENTRANT -D_GNU_SOURCE  
-Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  
-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
Linking: gcc   -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE   
-L/usr/local/lib -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 
-lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0   -lXt -lncurses -lacl -lgpm   -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE  
-L/usr/local/lib 
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
-L/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -lperl -lresolv -lm 
-lutil -lc  

I suspect you have, on your fourth line, "Tiny version...".  The tiny 
version does not support either syntax highlighting or the mouse.


Regards,
Chip Campbell




Re: Missing configuration commands in vim 7?

2007-02-16 Thread A.J.Mechelynck

Larry Alkoff wrote:

Charles E Campbell Jr wrote:

Larry Alkoff wrote:

I have a desktop and newly configured laptop with different versions 
of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on and 
set mouse?



These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?

Regards,
Chip Campbell





Hello Chip.

:version shows 7.0


It ought to show about a page of info. See at bottom for instance what mine 
displays.




The error I get is:

[EMAIL PROTECTED] X11 # vi xorg.conf
Error detected while processing /home/lba/.vimrc:
line   52:
E319: Sorry, the command is not available in this version:   syntax on
line  121:
E538: No mouse support: mouse=a
Press ENTER or type command to continue


Where line 52 says:
syntax on

and line 121 says:
set mouse=a

Larry


Here is what the ":version" command outputs in my (Tony's) version of Vim 7, 
where syntax and mouse both work. Notice +syntax and +mouse are included.



VIM - Vi IMproved 7.0 (2006 May 7, compiled Feb 13 2007 06:37:52)
Included patches: 1-195
Compiled by [EMAIL PROTECTED]
Huge version with GTK2-GNOME 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/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include 
-I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 
-I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include   -DORBIT2=1 
-pthread -I/usr/include/libart-2.0 -I/usr/include/cairo 
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libxml2 
-I/opt/gnome/include/libgnomeui-2.0 -I/opt/gnome/include/libgnome-2.0 
-I/opt/gnome/include/libgnomecanvas-2.0 -I/opt/gnome/include/gtk-2.0 
-I/opt/gnome/include/gconf/2 -I/opt/gnome/include/libbonoboui-2.0 
-I/opt/gnome/include/gnome-vfs-2.0 -I/opt/gnome/lib/gnome-vfs-2.0/include 
-I/opt/gnome/include/gnome-keyring-1 -I/opt/gnome/include/glib-2.0 
-I/opt/gnome/lib/glib-2.0/include -I/opt/gnome/include/orbit-2.0 
-I/opt/gnome/include/libbonobo-2.0 -I/opt/gnome/include/bonobo-activation-2.0 
-I/opt/gnome/include/pango-1.0 -I/opt/gnome/lib/gtk-2.0/include 
-I/opt/gnome/include/atk-1.0 -O2 -fno-strength-reduce -Wall 
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE  -I/usr/include/python2.5 
-pthread -I/usr/include  -D_LARGEFILE64_SOURCE=1  -I/usr/lib/ruby/1.8/i586-linux
Linking: gcc -L/opt/gnome/lib-rdynamic -Wl,-export-dynamic  -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE 
-L/usr/local/lib -o vim   -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 
-latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0 -lfreetype -lz -lfontconfig -lexpat -lglitz -lpng12 
-lXrender -lXau -L/opt/gnome/lib   -lgnomeui-2 -lbonoboui-2 -lgnome-keyring 
-lxml2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 
-lpango-1.0 -lcairo -lfreetype -lz -lfontconfig -lexpat -lglitz -lpng12 
-lXrender -lXau -lbonobo-2 -lgnomevfs-2 -lbonobo-activation -lgconf-2 
-lgobject-2.0 -lORBit-2 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0   -lXt 
-lncurses -lacl -lgpm   -Wl,-E 
-Wl,-rpath,/usr/lib/per

list

2007-02-16 Thread Michael Phillips
How do I get part of a line into a list?

TIA


Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.


 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com


Re: Missing configuration commands in vim 7?

2007-02-16 Thread A.J.Mechelynck

Charles E Campbell Jr wrote:

Larry Alkoff wrote:

I have a desktop and newly configured laptop with different versions 
of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on and 
set mouse?



These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?

Regards,
Chip Campbell




":syntax on" will fail in versions compiled without syntax highlighting 
support; ":set mouse" will fail on versions compiled without mouse support. 
Maybe he's using a "tiny" version? They still ought to show in

:help :syntax-on
:help 'mouse'
If they don't, then I guess Larry's distribution of Vim 7 has been "modified" 
to cripple the help, in which case he really ought to avail himself of some 
distribution compiled from true-blue official sources.


Even on my laptop (when I used it) I used a "Big" version of gvim (which had 
everything except profiling).


Larry: since according to your headers you're on a Unix-like system, you might 
want to compile your own Vim (the current version is 7.0.195), see my 
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm


If your laptop uses Windows, you can also avail yourself of Steve Hall's Vim 
for Windows 
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721 
(Steve Hall is also the main leader of the "Cream for Vim" project but this 
page is for Windows Vim without Cream).



Best regards,
Tony.
--
Jone's Law:
The man who smiles when things go wrong has thought of someone
to blame it on.


Re: Missing configuration commands in vim 7?

2007-02-16 Thread Larry Alkoff

Charles E Campbell Jr wrote:

Larry Alkoff wrote:

I have a desktop and newly configured laptop with different versions 
of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on and 
set mouse?



These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?

Regards,
Chip Campbell





Hello Chip.

:version shows 7.0

The error I get is:

[EMAIL PROTECTED] X11 # vi xorg.conf
Error detected while processing /home/lba/.vimrc:
line   52:
E319: Sorry, the command is not available in this version:   syntax on
line  121:
E538: No mouse support: mouse=a
Press ENTER or type command to continue


Where line 52 says:
syntax on

and line 121 says:
set mouse=a

Larry
--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: Fwd: entering copied text into command mode?

2007-02-16 Thread Bernhard Walle
* A.J.Mechelynck <[EMAIL PROTECTED]> [2007-02-16 03:03]:
> I don't know what "the Gtk clipboard" might be. On my system, + is for 
> whatever is used for "Edit => Copy", "Edit => Cut" and "Edit => Paste" in 
> any X11 programs regardless of whether or not they are using Gtk widgets 
> (Konqueror, for instance, uses Qt widgets and it has access to that same 
> clipboard). I don't use the * register but I've been told it's used by 
> middle-mouse pasting.

http://freedesktop.org/wiki/Standards_2fClipboardsWiki


   Bernhard
-- 
Bei der Eroberung des Weltraums sind zwei Probleme zu lösen: die Schwerkraft
und der Papierkrieg. Mit der Schwerkraft wären wir fertig geworden.
-- Wernher von Braun


Re: Missing configuration commands in vim 7?

2007-02-16 Thread Charles E Campbell Jr

Larry Alkoff wrote:

I have a desktop and newly configured laptop with different versions 
of vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on and 
set mouse?



These commands are fine.  So, bring up your new vim and type:
 :version

What does that show?

Regards,
Chip Campbell



Re: Missing configuration commands in vim 7?

2007-02-16 Thread Robert Hicks

Larry Alkoff wrote:
I have a desktop and newly configured laptop with different versions of 
vim.


The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on and 
set mouse?


Larry


:h mouse

:h syntax

Those both work in my 7 version from the Vim site.

Robert



Missing configuration commands in vim 7?

2007-02-16 Thread Larry Alkoff

I have a desktop and newly configured laptop with different versions of vim.

The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
set mouse=a
syntax on
They show in :help


The laptop has vim 7.0.35 and gives an error on the above two vimrc 
commands.  Also they don't show in :help.


What has happened in vim 7?  Are there replacements for syntax on and 
set mouse?


Larry

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: entering copied text into command mode?

2007-02-16 Thread A.J.Mechelynck

Larry Alkoff wrote:

Erlend Hamberg wrote:

On Friday 16 February 2007, A.J.Mechelynck wrote:

Maybe -- I've never understood how to properly use the * register under
X11. What comes from "Edit => Copy" (or Ctrl-C) in some non-Vim program
arrives in the + register in gvim, and what I yank into the + 
register in
gvim is available for "Edit => Paste" (or Ctrl-V) in any non-Vim 
program --

those I can understand.


In short:
X has, in addition to the regular clipboard, a selection buffer.
When you copy/cut text, it is placed in the clipboard (register + in 
vim). When you select text with the mouse it's placed in the selection 
buffer (register * in vim) without touching the clipboard.



I've been following this discussion and trying various things
but still can't get the hang of pasting in from other X programs.

So far the only thing that works is to use the mouse to select and copy 
with left click which allows me to paste in vim with xterm menu -> edit 
-> paste.  Presumably this uses the vim + register.


I understand that copies elsewhere in X load the + register in vim
and mouse select loads the * register.

What doesn't seem to work is to paste + or * register stuff into vim. 
Could I see some specific examples?


Larry



Using + register:

- Select text in any X program (Thunderbird, Firefox, Konqueror, ...)
- Edit => Copy

In gvim:
- to paste characterwise after the cursor:
"+p
- To paste characterwise before the cursor:
"+P
- To paste linewise after the cursor line:
:put +
- To paste linewise before the cursor line:
:.-1put +
- To paste linewise at the end:
:$put +
- To paste linewise before the first line:
:0put +
etc.

I don't use the * register myself, so the following is only hearsay:
Select text in any X11 program
In gvim: replace + by * everywhere to paste the selection.
 should also work, provided that the 'mouse' option includes "n" 
or "a".


For console Vim:
- it won't work in /dev/tty (the pure-text console) because the latter has no 
access to the X server hosting the clipboard and selections
- it will work in an xterm, konsole or gnome-terminal if the current version 
of Vim was compiled  with clipboard support.



Best regards,
Tony.

The following fortune sig makes me think:

Time flies like an arrow
Time bees like a bullet.

--
Time flies like an arrow
Fruit flies like a banana


Re: vimdiff on Windows XP

2007-02-16 Thread Bill McCarthy
On Fri 16-Feb-07 11:13am -0600, [EMAIL PROTECTED] wrote:

> Can anyone assist me with getting vimdiff to work on a PC with
> Microsoft Windows XP? I have GVIM version 6.2.
>
> When trying to vimdiff 2 files I get:   E 97: Cannot create diffs.
>
> I have looked through :help, found *E97*, and am not sure how to
> proceed, but have tried to check the "shell" via:
>
> :!sort
>
> Typing this on the command line of a file causes a new MS-Dos
> command window (titled vimrun.exe) to open with the following message:
>
> C:\Windows\System32\cmd.exe   /c   sort
>
> which is presumably not what is supposed to happen. (Note that I
> can get sorting on the current open file by means of  :%!sort  as shown
> on my vi reference mug. :-) )

First, you've got a rather old version of 6 - the most
recent is, I believe, 6.4.10.  You really should get the
most recent - 7.0.195 - there are many new useful features.

The behavior of :!sort is normal.  With no input or output
specified, it waits for you to type something.  Here's a
brief dialog (using XP's cmd and the MS sort):

c:\windows\system32\cmd.exe /c sort
xxx
aaa
^Z
aaa
xxx
Hit any key to close this window...

I don't believe version 6.x installs diff.exe in $vim or
looks for it there if it can't find it in your path
(version 7 does).  If you choose to continue to use 6.2,
download a copy and place it in your path.

-- 
Best regards,
Bill



Re: Match first M

2007-02-16 Thread Bill McCarthy
On Fri 16-Feb-07 6:32am -0600, Bin Chen wrote:

> Suppose a line
>
>   MopqMopc
>
> ^.*M  match the line from beginning to the second M, but I want to match
> the beginning to the first M, how can I do it?

I see you already have good answers from Tim and Alexey.  To
avoid surprises when ignorecase and nosmartcase are set,
make sure the search is case sensitive with \C - such as:

^.{-}M\C
or
^[^M]*M\C

-- 
Best regards,
Bill



vimdiff on Windows XP

2007-02-16 Thread richard . albert
Greetings,

Can anyone assist me with getting vimdiff to work on a PC with
Microsoft Windows XP? I have GVIM version 6.2.

When trying to vimdiff 2 files I get:   E 97: Cannot create diffs.

I have looked through :help, found *E97*, and am not sure how to
proceed, but have tried to check the "shell" via:

:!sort

Typing this on the command line of a file causes a new MS-Dos
command window (titled vimrun.exe) to open with the following message:

C:\Windows\System32\cmd.exe   /c   sort

which is presumably not what is supposed to happen. (Note that I
can get sorting on the current open file by means of  :%!sort  as shown
on my vi reference mug. :-) )

If the problem is that "diff" cannot be executed (it isn't recognized at an
MS Dos command prompt), can anyone assist me with getting it operational?

Thanks much for any assistance.

Rich

===
Richard A. Albert
ExxonMobil Upstream Research Co.
Houston, TX   77252-2189
e-mail: [EMAIL PROTECTED]
===



Re: Is it possible to write two replace command in one line?

2007-02-16 Thread Bill McCarthy
On Fri 16-Feb-07 6:32am -0600, Bin Chen wrote:

> If I want to replace a to b, replace b to c, is it possible to do this
> two things in one line?

If you mean that all original a's should be b's and all
original b'c should be c's:

:g/./s/b/c/g|s/a/b/g

will do both substitutes in a single pass.

OTOH, if you mean to replace all a's and b's with c's:

:%s/a\|b/c/g

-- 
Best regards,
Bill



RE: entering copied text into command mode?

2007-02-16 Thread Gene Kwiecinski
>I often find myself copy/pasting via my GUI text that I might have on  
>the screen, and then pasting it into the command to be performed - is  
>there any way to cut/paste text into the command area when I have it  
>highlighted with just the keyboard?

I'm not quite sure what you mean, but if it's what I think it is, sure.

If I want to, eg, globally delete paths from links to images and such in
html source, eg, to turn



into just



, then I'd want to execute

:[EMAIL PROTECTED]/@@g

as a command, so I'd just 'v' the pathname to highlight it,
control-insert it to yank it into the "clipboard"(?), then do

:s@@@g

ie, use shift-insert to "paste" the path directly into the command.

is that any help, or were you referring to something different?


Re: entering copied text into command mode?

2007-02-16 Thread Larry Alkoff

Erlend Hamberg wrote:

On Friday 16 February 2007, A.J.Mechelynck wrote:

Maybe -- I've never understood how to properly use the * register under
X11. What comes from "Edit => Copy" (or Ctrl-C) in some non-Vim program
arrives in the + register in gvim, and what I yank into the + register in
gvim is available for "Edit => Paste" (or Ctrl-V) in any non-Vim program --
those I can understand.


In short:
X has, in addition to the regular clipboard, a selection buffer.
When you copy/cut text, it is placed in the clipboard (register + in vim). 
When you select text with the mouse it's placed in the selection buffer 
(register * in vim) without touching the clipboard.



I've been following this discussion and trying various things
but still can't get the hang of pasting in from other X programs.

So far the only thing that works is to use the mouse to select and copy 
with left click which allows me to paste in vim with xterm menu -> edit 
-> paste.  Presumably this uses the vim + register.


I understand that copies elsewhere in X load the + register in vim
and mouse select loads the * register.

What doesn't seem to work is to paste + or * register stuff into vim. 
Could I see some specific examples?


Larry

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: Is it possible to write two replace command in one line?

2007-02-16 Thread Tim Chase
> If I want to replace a to b, replace b to c, is it possible to do this 
> two things in one line?


Well, you can use the pipe to concat commands, so you can do:

:%s/b/c/g|%s/a/b/g

However, if they overlap, it gets trickier.  In that case (such
as swapping "a" and "b"), you can use something like

:%s/a\|b/\={'a':'b', 'b':'a'}[submatch(0)]/g

in Vim7.

To use that trick, both "a" and "b" should be "actual" values,
rather than regexps unless you can enumerate all values that the
regexp will match (because you need to look up the result in the
dictionary).  This works for arbitrary remapping of however many
pieces you want.  If you only want two pieces and are using
pre-vim7 where dictionaries were introduced, you can try
something like

:%s/a[xyz]\|b/\=submatch(0)=~'a[xyz]' ? 'b' : 'a'/g

This allows you to have at least one regexp for matching purposes
(that you repeat in the conditional for the trinary operator).
The above example looks for any regexp matching "ax, ay, or az"
or "b" and then replaces any of the "a[xyz]" matches with "b" and
replaces any "b" matches with "a".

All sorts of odd things can be done here.  However, it does
demonstrate some of the power of \=

:help sub-replace-special

Hope this gives you something to work with and allows you to do
crazy-cool editing stuff in the future.

-tim







Re: Match first M

2007-02-16 Thread Tim Chase
> Suppose a line
> 
>   MopqMopc
> 
> ^.*M  match the line from beginning to the second M, but I want to match 
> the beginning to the first M, how can I do it?


There are a number of ways to do it that you can riff off of
depending on the scenario:

^\s*M
^.{-}M
^.*\

Re: vim on calcs, PDAs, palms

2007-02-16 Thread John Doe
Good idea, let's say someone got up and ported vim to some other
architecture - would the changes be merged into the source tree or not?
I don't have the $$$ for the devices you mention below. Any why havent
the existing ports (say to win ce) been merged into the source tree (but
 pick some other port if you like)? Maybe I could sratch together enough
for a win ce gadget.

> The Sharp Zaurus (no new products to be expected) and the Nokia N800 are
> linux-based devices and to my knowledge run vim if this is what you
> wanted to know.


Re: Match first M

2007-02-16 Thread Alexey Vakhov

Hi!,

You can use ^.\{-}M for match first M.


2007/2/16, Bin Chen <[EMAIL PROTECTED]>:

Suppose a line

  MopqMopc

^.*M  match the line from beginning to the second M, but I want to match
the beginning to the first M, how can I do it?

Thanks.
ABAI





--
Alexey Vakhov mailto:[EMAIL PROTECTED]


[vim 7.0] foOmni-cpp-complete stange behaviour

2007-02-16 Thread Alexey Vakhov

Hi all,
I want to migrate to Vim in everyday work. I instlalled
OmniCppComplete-0.4 from vim.org.
I installed this plugin, create dir with one cpp file. And run ctags
(as documented)
#ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .

cpp file
---
#include 

struct A
{
   int x;
   int y;
};

int main()
{
   A a;

   return 0;
}


After that I add to main function variable  'a' with type 'A'. And
typed a. and got error message (Pattern not found). After some
investigation of plugin I found that
in function omni#cpp#utils#GetCode(posStart, posEnd) there are
proceeded two lines ('   {', 'A a;') but in omni/cpp/utils.cpp
file
   let lines[0] = lines[0][ sStart : ]
   let lines[-1] = lines[-1][ : sEnd ]
second code kills string ' A a;' !!!  I commented this line and
omnifunc began working but not so gut as ft-c-omni. I'm newbie in Vim
and don't wont to change system files. Would you like to help me with
this plugin? Thanks a lot.

--
Alexey Vakhov mailto:[EMAIL PROTECTED]


versions
---
#cat tags
!_TAG_FILE_FORMAT2/extended format; --format=1 will not append
;" to lines/
!_TAG_FILE_SORTED1/0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHORDarren Hiebert/[EMAIL PROTECTED]/
!_TAG_PROGRAM_NAMEExuberant Ctags//
!_TAG_PROGRAM_URL http://ctags.sourceforge.net/official site/
!_TAG_PROGRAM_VERSION5.6//
A.\touch.cpp/^struct A$/;"sfile:
A::x.\touch.cpp/^int x;$/;"mstruct:Afile:
access:public
A::y.\touch.cpp/^int y;$/;"mstruct:Afile:
access:public
Flametest.\test.vim/^function! Flametest()$/;"f
main.\touch.cpp/^int main()$/;"fsignature:()
x.\touch.cpp/^int x;$/;"mstruct:Afile:access:public
y.\touch.cpp/^int y;$/;"mstruct:Afile:access:public


#ctags --version
Exuberant Ctags 5.6, Copyright (C) 1996-2004 Darren Hiebert
Compiled: Jul 30 2006, 16:12:20
Addresses: <[EMAIL PROTECTED]>,  http://ctags.sourceforge.net
Optional compiled features: +win32, +regex, +internal-sort


#gvim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled May  7 2006 16:23:43)
MS-Windows 32 bit GUI version with OLE support
Compiled by [EMAIL PROTECTED]
Big version with 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 +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang
-mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn -postscript
+printer -profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn
+scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse
+textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
-xfontset -xim -xterm_save +xpm_w32
  system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$VIM\_vimrc"
 user exrc file: "$HOME\_exrc"
 2nd user exrc file: "$VIM\_exrc"
 system gvimrc file: "$VIM\gvimrc"
   user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
   system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   -DWINVER=0x0400
-D_WIN32_WINNT=0x0400  /Fo.\ObjGOLYTR/ /Ox -DNDEBUG  -DFEAT_OLE
-DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV
-DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl83.dll\"




--
Alexey Vakhov mailto:[EMAIL PROTECTED]


Match first M

2007-02-16 Thread Bin Chen

Suppose a line

 MopqMopc

^.*M  match the line from beginning to the second M, but I want to match 
the beginning to the first M, how can I do it?


Thanks.
ABAI



Is it possible to write two replace command in one line?

2007-02-16 Thread Bin Chen
If I want to replace a to b, replace b to c, is it possible to do this 
two things in one line?


Thanks.
ABAI



Re: Web-based editing [Was :wq vs ZZ]

2007-02-16 Thread James Kanze

On 2/16/07, Cameron Simpson <[EMAIL PROTECTED]> wrote:

On 15Feb2007 15:30, James Kanze <[EMAIL PROTECTED]> wrote:
| On 2/15/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
| >I'm using "It's All Text!" now.  Just had to create a shell script to
| >start gvim, because it doesn't allow you to give arguments to the
| >command.  I'm using this (on Unix, obviously):



| >#!/bin/sh
| >gvim -f "$@"



| I can't seem to get it to work; gvim comes up all right, but as
| if it was started without any file arguments.  Adding an echo to
| the shell script shows that in fact, it isn't being passed any
| arguments.  Is there something special I have to do in the
| preferences of "It's All Text!" to tell it how to pass a
| filename.



Um, no? It should just work. IAT only lets you supply the path to the
edit command, so it must pass the file as an argument - it seems to for
my setup.


That's what I would have thought.


You're certain the script gets not arguments - you're echoing
$# and $* ?


My script, exactly:

   #! /bin/sh

   export DISPLAY=padev054:0.1
   echo "Options:" "$@" > $HOME/tmp/firefoxVim.log
   $HOME/gnu/i686/bin/gvim -f "$@"

Having pressed the edit button, the vim window is open:

   $ cat ~/tmp/firefoxVim.log
   Options:
   $ ps -ef | egrep -i vim
   jakan20652 17342  0 09:57 pts/400:00:00 /bin/sh
/home/team02/jakan/bin/firefoxVim
   jakan20655 20652  0 09:57 pts/400:00:00
/home/team02/jakan/gnu/i686/bin/gvim -f

(My script is in $HOME/bin/firefoxVim.)

FWIW: firefox is running on a Linux 2.6.9 kernel (Redhat, I
think) on an Intel based PC.  The X Server (machine padev054) is
a Sun Sparc under Solaris 2.8, and I've got synergy managing the
keyboard and the mouse (server on the Sparc).  Off hand, I don't
see how any of that could make a difference (except maybe the
machine on which firefox is running).  Firefox is version
2.0.0.1 (en-US version), and It's All Text! is version 0.3.3.

I have no idea where to start looking beyond that.  For the
moment, I'm still copy/pasting, as I did before.


| >Store this in a file, make it executable, and set it from
| >Tools/Add-ons/It's All Text/Preferences



| >The plugin can be found here:
| >https://addons.mozilla.org/firefox/4125/



| >Warning: If you set the preferences to use Vim firefox gets stuck.



| Not if you've started it from an xterm; vim comes up in the
| xterm.  (But Firefox does hang until you exit vim.)



That's surprising.


After a few more trials: it doesn't completely hang, but some
things don't work.  In particular, If you try to close the
window, it doesn't close.

--
James Kanze (GABI Software) email:[EMAIL PROTECTED]
Conseils en informatique orientée objet/
  Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34


Re: setlocal enc=utf8 and mappings

2007-02-16 Thread DervishD
Hi Tony :)

 * A.J.Mechelynck <[EMAIL PROTECTED]> dixit:
> DervishD wrote:
> >Am I doing anything wrong? Should I set another thing so even
> >with
> >"enc=utf8" my high-bit-set-mapleader still works? Should I set
> >"mapleader" to the utf8 value?
> 
> Regarding your Subject: 'encoding' is a global option; it defines how
> the characters are represented internally in memory for _all_ buffers.

Yes, I forgot, sorry O:))

> When you store a mapping, it is stored in the 'encoding' current at
> the moment the mapping is defined. If that 'encoding' is Latin1, the
> letter ç (small c-cedilla) is stored as the single byte 0xE7.

That's what I assumed.

> After ":set encoding=utf-8", the byte 0xE7 is invalid unless it is
> immediately followed by two bytes in the range 0x80-0xBF. The small
> c-cedilla is still the codepoint U+00E7 but that codepoint is now
> represented in memory as the two bytes 0xC3 0xA7.
> 
> Therefore, you should set 'encoding' early in your vimrc, as follows:

And this I cannot do... I wanted to avoid considering ASCII files as
utf-8, therefore my "fileencodings" is empty. By default, "enc" is
latin1, and I only change it, by hand (well, with a mapping) the 1 in
1 times I edit an utf-8 file that doesn't have a BOM mark. I do this
by setting, manually, "enc". My error was to consider "enc" local to the
buffer and not global.

So it looks like I will have to choose an ASCII-7 mapleader (my
first option) OR add new mappings as soon as I "set enc=utf-8" using a
new value for leader.

None of the solutions is a great deal, anyway.

Thanks a lot for your fast and good answer, as always :))

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: setlocal enc=utf8 and mappings

2007-02-16 Thread A.J.Mechelynck

DervishD wrote:

Hi all :)

I'm having a problem that I know how to solve, but I wonder if I'm
doing the right thing...

Some weeks ago I asked a couple of things about encodings on the
list, and based on the answers, I finally did a proper setup to edit
UTF-8 files from time to time in my latin1 terminal, while at the same
time treating new ASCII files as latin1 and not utf-8. This works OK.

But now my problem is the following. I've chosen "ç" as my
mapleader. This is due its position in my keyboard. BUT, its code in
latin1 is 0xe7 and, in utf8 it's 0xc3+0xa7.

This means (and this is my problem) that if I set "setlocal
enc=utf8", I'm no longer able to use it as my mapleader as-is. I still
generate "ç" when I press it, of course, and vim translates it onto
something my terminal understands as "ç". I assumed that it was doing
the same for mappings, but it is not.

Am I doing anything wrong? Should I set another thing so even with
"enc=utf8" my high-bit-set-mapleader still works? Should I set
"mapleader" to the utf8 value?

Thanks a lot in advance :)

Raúl Núñez de Arenas Coronado



Regarding your Subject: 'encoding' is a global option; it defines how the 
characters are represented internally in memory for _all_ buffers.


When you store a mapping, it is stored in the 'encoding' current at the moment 
the mapping is defined. If that 'encoding' is Latin1, the letter ç (small 
c-cedilla) is stored as the single byte 0xE7.


After ":set encoding=utf-8", the byte 0xE7 is invalid unless it is immediately 
followed by two bytes in the range 0x80-0xBF. The small c-cedilla is still the 
codepoint U+00E7 but that codepoint is now represented in memory as the two 
bytes 0xC3 0xA7.


Therefore, you should set 'encoding' early in your vimrc, as follows:

set nocompatible
if has("unix")
  language messages C
else
  language messages en
endif
runtime vimrc_example.vim
if has("multi_byte")
  if &enc !~? '^u'
if &tenc == ""
  let &tenc = &enc
endif
set enc=utf-8
  endif
  set fencs=ucs-bom,utf-8,latin1
  setglobal bomb fenc=latin1
else
  echomsg "Multi-byte support not compiled-in"
endif
...
let mapleader = "\"
...
map abc   call myFunctionABC()
...


Best regards,
Tony.
--
In specifications, Murphy's Law supersedes Ohm's.


Re: vim on calcs, PDAs, palms

2007-02-16 Thread Thomas

I'd like to know if any ports of vim to them are supported "out of the box"


The Sharp Zaurus (no new products to be expected) and the Nokia N800 are 
linux-based devices and to my knowledge run vim if this is what you 
wanted to know.