CVS vs SVN

2007-06-04 Thread Robert Hicks
Is Vim moving to svn? I was curious as to why in the downloads section 
there is both a cvs version and a svn version.


Robert



Re: Getting vimscripts

2007-05-22 Thread Robert Hicks

Swaroop C H wrote:

Is there a way to use wget or curl to get scripts off the Vim site?


Use `wget http://www.vim.org/scripts/download_script.php?src_id=$id -O 
foo` ?



Best,
Swaroop

Must have been a corrupt file. I removed everything and reinstalled the 
scripts and all is well.


Robert



Re: Save as not responding

2007-05-21 Thread Robert Hicks

Smoldas Vladimir wrote:

Hi,

I have a problem to execute: browse confirm saveas (or save as from menu list) 
on new file (without name).
 Steps to simulate the problem:
1.Open gvim
2. Save as (browse confirm saveas) - gvim not responding for 5 minutes (than I 
killed him)

But when I open existing file it's works well...


I tried this on XP with 7.1 and I did both a save and save as and 
they both worked fine. Are you trying to save to a network drive or 
anything of the kind?


Robert



Getting vimscripts

2007-05-21 Thread Robert Hicks

Is there a way to use wget or curl to get scripts off the Vim site?

Robert



Re: Getting vimscripts

2007-05-21 Thread Robert Hicks

Swaroop C H wrote:

Is there a way to use wget or curl to get scripts off the Vim site?


Use `wget http://www.vim.org/scripts/download_script.php?src_id=$id -O 
foo` ?





Thanks!

Robert



Vim 7.1 errors

2007-05-21 Thread Robert Hicks

This could be just something I am doing wrong.

I am creating my .vimrc file and once I put:

set laststatus=2

in and save and then open Vim I get the following error:

 sccs: command not found
tr: at least one string must be given when squeezing repeats

Any ideas?

This is what I compiled with:

:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled May 21 2007 15:18:20)
Huge 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 +cursorshape
+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 -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 -xterm_clipboard -xterm_save
   system vimrc file: $VIM/vimrc
 user vimrc file: $HOME/.vimrc
  user exrc file: $HOME/.exrc
  fall-back for $VIM: /usr/local/share/vim
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 
-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
  -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm  -I/usr/lib/pe

rl5/5.8.5/ia64-linux-thread-multi/CORE
Linking: gcc   -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/CORE 
-L/usr/local/li
b -o vim   -lncurses -lacl -lgpm -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/
CORE  -L/usr/local/lib 
/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
-L/
usr/lib/perl5/5.8.5/ia64-linux-thread-multi/CORE -lperl -lresolv -lm 
-lutil -lc

Press ENTER or type command to continue


Help?

Robert



Re: Vim 7.1 errors

2007-05-21 Thread Robert Hicks

Robert Hicks wrote:

This could be just something I am doing wrong.

I am creating my .vimrc file and once I put:

set laststatus=2

in and save and then open Vim I get the following error:

 sccs: command not found
tr: at least one string must be given when squeezing repeats

Any ideas?

This is what I compiled with:

:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled May 21 2007 15:18:20)
Huge 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 +cursorshape
+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 -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 -xterm_clipboard -xterm_save
   system vimrc file: $VIM/vimrc
 user vimrc file: $HOME/.vimrc
  user exrc file: $HOME/.exrc
  fall-back for $VIM: /usr/local/share/vim
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_REENTRANT 
-D_GNU_SOURCE -DDEBUGGING
  -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm  -I/usr/lib/pe

rl5/5.8.5/ia64-linux-thread-multi/CORE
Linking: gcc   -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/CORE 
-L/usr/local/li
b -o vim   -lncurses -lacl -lgpm -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/
CORE  -L/usr/local/lib 
/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
-L/
usr/lib/perl5/5.8.5/ia64-linux-thread-multi/CORE -lperl -lresolv -lm 
-lutil -lc

Press ENTER or type command to continue


Help?

Robert



I also tried the latest CVS version and I get the same error.

Robert



Re: Vim 7.1 errors

2007-05-21 Thread Robert Hicks

Yakov Lerner wrote:

On 5/21/07, Robert Hicks [EMAIL PROTECTED] wrote:

Robert Hicks wrote:
 This could be just something I am doing wrong.

 I am creating my .vimrc file and once I put:

 set laststatus=2

 in and save and then open Vim I get the following error:

  sccs: command not found
 tr: at least one string must be given when squeezing repeats

 Any ideas?

 This is what I compiled with:

 :version
 VIM - Vi IMproved 7.1 (2007 May 12, compiled May 21 2007 15:18:20)
 Huge 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 +cursorshape
 +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 -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 -xterm_clipboard -xterm_save
system vimrc file: $VIM/vimrc
  user vimrc file: $HOME/.vimrc
   user exrc file: $HOME/.exrc
   fall-back for $VIM: /usr/local/share/vim
 Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_REENTRANT
 -D_GNU_SOURCE -DDEBUGGING
   -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 -I/usr/include/gdbm  -I/usr/lib/pe
 rl5/5.8.5/ia64-linux-thread-multi/CORE
 Linking: gcc   -Wl,-E
 -Wl,-rpath,/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/CORE
 -L/usr/local/li
 b -o vim   -lncurses -lacl -lgpm -Wl,-E
 -Wl,-rpath,/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/
 CORE  -L/usr/local/lib
 
/usr/lib/perl5/5.8.5/ia64-linux-thread-multi/auto/DynaLoader/DynaLoader.a

 -L/
 usr/lib/perl5/5.8.5/ia64-linux-thread-multi/CORE -lperl -lresolv -lm
 -lutil -lc
 Press ENTER or type command to continue


 Help?

 Robert


I also tried the latest CVS version and I get the same error.


Any plugins in ~/.vim/plugin ? What does :scriptnames show ?

Yakov

I have 2 plugins...perl-support and savevers. When I get to work 
tomorrow I will remove both of those and try it. I will also get you the 
:scriptnames thing if the plugins aren't the issue.


Robert



Re: Stable Vim version 7.1 has been released

2007-05-14 Thread Robert Hicks

cvs vs svn

Is the source moving to svn? It seems the svn portion lags a bit 
(timewise)behind the cvs version.


Robert



Re: 7.1a.001 OSX colour scheme errors?

2007-05-11 Thread Robert Hicks

Michael Wookey wrote:

Hello vimmers,

I am running 7.1a.001 on OSX and have just noticed the following from
console vim (running in Terminal.app and also occurs in iTerm.app).

If I change the colour scheme I receive a lot of error output.  For
example:

:colorscheme desert

Results in:

Error detected while processing
/Applications/Vim.app/Contents/Resources/vim/runtime/colors/desert.vim:
line   27:
E254: Cannot allocate color khaki
E254: Cannot allocate color slategrey
line   36:
E254: Cannot allocate color gold
line   37:
E254: Cannot allocate color tan
...



When I build Vim I always have to copy in an rgb.txt file that I have 
into the runtime. Otherwise I get those errors.


Robert



Re: Monospaced font problem

2007-03-31 Thread Robert Hicks

Pablo Arantes wrote:

Fellow users,

I'm using gvim 7.0 in a Windows XP SP2 box and I'm experiencing a
problem with font selection. I want to set as the default gui font a TTF
monospaced font, called Pragmata TT, but it won't show up in the list
of available fonts. I've searched the vim archives and google and
cannot figure out why it won't be listed as an option even though it *is* a
monospaced font and other TTF monospaced fonts appear in the list.

The font author could not help and provided me an OTF version that gvim
accepts, although it renders much worse than the TTF in programs where
the latter version actually works.

Thanks in advance for any tip or suggestion.


How are you setting guifont to use it?

Robert



Re: IDE's Vim 7 and Apple OS X

2007-03-24 Thread Robert Hicks

Joseph White wrote:

Hi All,

When you download c.vim : C/C++-IDE, BASH-IDE, or Perl-IDE,  for 
example, the directions to install and get the menu items to show up, 
goes as follows:


install details
Copy the zip archive  cvim.zip to $HOME/.vim/ and run
  unzip cvim.zip

While this works fine on Linux;  Mac OS X Vim does not recognize or read 
the $Home/.vim  directory,  is there an alternate location to place the 
IDE files?




Huh? I have all my stuff in $HOME/.vim/ on OSX and it works like a charm.

Robert



Help files to read

2007-03-02 Thread Robert Hicks

What are some good help files to read if I want to learn:

- To use Vim itself
- To create vimscripts/vim modules

Robert



formatting the number column

2007-02-26 Thread Robert Hicks
When I do set number I get the numbering in the left column (good). Is 
there a way I can change the look of the number? I would like the 
numbers to look like:


1:
2:
3:



Optimum syntax file size...

2007-02-18 Thread Robert Hicks

Is there a size limit that one should set as a ceiling for syntax file size?

Robert



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



Re: getting rid of beep in vim

2007-01-25 Thread Robert Hicks

Bill McCarthy wrote:

On Wed 24-Jan-07 1:41am -0600, Robert Cussons wrote:


I'm sorry, I know this should be a problem that I can
resolve for myself, but I have searched the vim help under
bells and visualbell and tried what it says and it
doesn't seem to work, so your help would be greatly
appreciated. Basically, I always get the beeping sound
when I press 'k' but I'm already at the top of the file,
for example and I want to turn it off. I am running vim
7.0 on Windows XP Pro SP2. I have:

set vb t_vb=''


To do this, all you need in your _vimrc is:

set vb t_vb=

That will eliminate sounds and flashing in Vim.  For Gvim,
you also need, in your _gvimrc:

set t_vb=

because entering the GUI sets 't_vb'.

See :help 'vb'



I only use a .vimrc and for the things that are gui specific I wrap in:

if has(gui_running)
 stuff for gvim
endif

Is there any reason NOT to do that if I only want to maintain one config 
file?


Robert



Re: getting rid of beep in vim

2007-01-25 Thread Robert Hicks

A.J.Mechelynck wrote:

Robert Hicks wrote:
[...]

I only use a .vimrc and for the things that are gui specific I wrap in:

if has(gui_running)
 stuff for gvim
endif

Is there any reason NOT to do that if I only want to maintain one 
config file?


Robert




I do that too. For the settings which must wait until the GUI starts 
(like setting t_vb again) I use instead something like


if has(gui)
autocommand GUIEnter * set t_vb=
endif

which, however, does rely on +autocmd being compiled-in. This is not 
really a problem for me, since in the rare cases when I use a tiny 
version of Vim, it is not GUI-enabled.


With Unix versions of gvim, it is possible to start a GUI-enabled Vim in 
console mode, do some editing (so has(gui_running) is off while 
sourcing the vimrc) and later change one's mind and use the :gui command 
to start the GUI. In practice I don't do that, however, so (in practice) 
when has(gui_running) is false, I'm not going to go from console mode 
to GUI mode in the course of the current session.


I think that what it comes to in the end is a question of personal 
preference.




Er so it is safer to use:

if has(gui)

I didn't know you could do that with Vim myself. If I am on the console 
I use vim and if I want the gui version I type gvim.


Robert



Color errors on OSX

2007-01-23 Thread Robert Hicks

Cannot allocate color colorname

I compiled from svn src. There didn't seem to be any errors and it 
created the Vim.app. The Vim.app works but when I go to change the 
colorscheme I get about 20 of those messages.


Is there something I need to pass to configure on OSX about colors?

Robert



Re: Color errors on OSX

2007-01-23 Thread Robert Hicks

A.J.Mechelynck wrote:

Robert Hicks wrote:

Cannot allocate color colorname

I compiled from svn src. There didn't seem to be any errors and it 
created the Vim.app. The Vim.app works but when I go to change the 
colorscheme I get about 20 of those messages.


Is there something I need to pass to configure on OSX about colors?

Robert




If your gvim doesn't display through X11, try copying the X11 rgb.txt 
(usually something like /usr/X11R6/lib/X11/rgb.txt ) to the $VIMRUNTIME 
directory.


see :help rgb.txt. Not sure if it works for the Mac but you could 
always try.



Best regards,
Tony.


I will do that and see. Thanks Tony.

Robert



Re: Color errors on OSX

2007-01-23 Thread Robert Hicks

A.J.Mechelynck wrote:

Robert Hicks wrote:

Cannot allocate color colorname

I compiled from svn src. There didn't seem to be any errors and it 
created the Vim.app. The Vim.app works but when I go to change the 
colorscheme I get about 20 of those messages.


Is there something I need to pass to configure on OSX about colors?

Robert




If your gvim doesn't display through X11, try copying the X11 rgb.txt 
(usually something like /usr/X11R6/lib/X11/rgb.txt ) to the $VIMRUNTIME 
directory.


see :help rgb.txt. Not sure if it works for the Mac but you could 
always try.



Best regards,
Tony.

Yep, that was it. I coped the rgb.txt from the binary at the macvim site 
and it no longer throws those errors.


Robert



Re: Compiling on OSX

2007-01-22 Thread Robert Hicks

Robert Hicks wrote:
I have compiled the version from svn. It creates the .app bundle. When I 
go to change the colorscheme manually I get a bunch of Cannot allocate 
color colorname. A bunch being about 20 or them.


Any ideas?

Robert




This is my configure line:

./configure --enable-perlinterp --enable-pythoninterp --enable-tclinterp 
--with-tclsh=tclsh8.4 --enable-rubyinterp --enable-multibyte 
--enable-cscope --with-features=huge [EMAIL PROTECTED]





Compiling on OSX

2007-01-21 Thread Robert Hicks
I have compiled the version from svn. It creates the .app bundle. When I 
go to change the colorscheme manually I get a bunch of Cannot allocate 
color colorname. A bunch being about 20 or them.


Any ideas?

Robert



Re: Mac Questions

2007-01-19 Thread Robert Hicks
When you do this --enable-pythoninterp --enable-rubyinterp what do you 
get? Does that just allow another language to be used as a vim script?


Robert



Re: Mac Questions

2007-01-19 Thread Robert Hicks

litespeed59 wrote:

Alan,

I recently figured out how to compile Vim on a Mac from source, so here is
the method I used. I too am fairly new at this, so if any Mac users can
improve on my instructions, feel free to do so.

I obtained the Vim sources through Subversion (I keep my source code
downloads in ~/Source). You may need to install a Subversion client on your
system to get this to work. Open Terminal and enter the following commands
(assuming ~/Source already exists):

  cd ~/Source
  svn co https://svn.sourceforge.net/svnroot/vim/vim7



Does that get everything? Including patches released since Vim7 has come 
out?


Robert



Re: Mac Questions

2007-01-19 Thread Robert Hicks

litespeed59 wrote:

Robert,

Yes, the initial Subversion download will get Vim with all the latest
patches. There may be a delay of a day or two between the time the patches
are first released, and when they appear in the Subversion repository, but
otherwise this is a great way to stay up to date.

Regards,
Trev



I just did it and it worked like a charm. Cool.

Robert



Re: Mac Questions

2007-01-12 Thread Robert Hicks

Alan G Isaac wrote:
On Mon, 8 Jan 2007, Brett Calcott apparently wrote: 
I have just got a Macbook (switching from windows) and 
have downloaded and compiled the latest version of Vim on 
it. It all works fine, but I have a few questions. 


Would you mind outlining the steps you took for someone who 
is making the same transition but is not used to compiling 
their own apps? (I have XCode installed.)


Thank you,
Alan Isaac






I would suggest going here:  http://macvim.org/OSX/index.php

It has a binary and some hints and tips as well.

Robert



end of line whitespace

2007-01-02 Thread Robert Hicks
I know that in some IDE's I can check a box that causes the IDE to 
automatically strip trailing white space. Does Vim have a switch to do 
that or do I need to do:


autocmd BufWritePre * %s/\s*$//e

It would be nice to have a set stripwhitespace if that is the case but 
I guess that is the power of Vim.


Robert



Re: Calendar ?

2006-11-29 Thread Robert Hicks
Usage question. I have a custom statusline. That statusline also shows 
up in the Calendar pane and in the diary pane. Is there a way I can 
restrict it from doing that?


Robert



selecting a guifont via if statement

2006-10-11 Thread Robert Hicks

Is there a function to determine if a font exists? Something like:

if exists(Monaco)
set gfn=Monaco:h10
elsif exists(Consolas)
set gfn=Consolas:h11
endif

Roughly...

Robert



enable multi-byte?

2006-09-26 Thread Robert Hicks
I did a standard install of Vim7 on HP/UX and multi-byte was not 
enabled. I looked at my Windows version and multi-byte is enabled.


What would determine for me if I need to enable it?

Robert



Re: enable multi-byte?

2006-09-26 Thread Robert Hicks

Yakov Lerner wrote:

On 9/26/06, Robert Hicks [EMAIL PROTECTED] wrote:

I did a standard install of Vim7 on HP/UX and multi-byte was not
enabled. I looked at my Windows version and multi-byte is enabled.

What would determine for me if I need to enable it?


in :version, see whether you have +multi_byte or -multi_bytes.

Yakov



On the HP it is a -. The question for me is do I want it or need it 
enough to recompile Vim for it?


Robert



matching question...one is cancelling the other

2006-09-05 Thread Robert Hicks

I have an option match for my Tcl syntax script as follows:

syn match tclOptionMatcher \%(^\|\s\)\zs-[a-zA-Z]\+ 
contains=tclOptionStarter

syn match tclOptionStarter contained -

I also would like to get tclOperators going as well:

syntax match tclOperator [~\-_+*\[\]{}=|[EMAIL PROTECTED]\\/:\^\.,!?]

However, because the tclOperator match has a - in it, it nullifies the 
 first tclOptionMatcher.


Is there a way to have both? Can I group the first one like (-[a-zA-Z]) 
or something?


Robert



unmatched strings

2006-09-01 Thread Robert Hicks

Is there a way to highlight unmatched strings for  and ' in a syntax file?

Robert



Re: Vim BOF session

2006-09-01 Thread Robert Hicks

Bram Moolenaar wrote:

Greetings, Vim users.

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

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

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

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

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

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


I can't be there but...

fix problems and fine tune existing features?

Yes



Re: unmatched strings

2006-09-01 Thread Robert Hicks

Robert Hicks wrote:

Is there a way to highlight unmatched strings for  and ' in a syntax file?

Robert




By unmatched I mean:

This is a string

This is a string



Re: backup directory

2006-08-27 Thread Robert Hicks
In article [EMAIL PROTECTED],
 Robert Hicks [EMAIL PROTECTED] wrote:

 Robert Hicks wrote:
  I have the following in my .vimrc:
  
   =
   Files/Backups
   =
  set backup
  set backupdir=/home/devsp7/.vim/backup
  set dir=/home/devsp7/.vim/temp
  set patchmode=.prev
  
   Config for savevers.vim
  let savevers_types=*
  let savevers_max=10
  let savevers_purge=1
  let savevers_dirs=backupdir
  
  However, nothing is being saved to those paths. It is being saved in the 
/home/devsp7 directory. The directories are rw for the devsp7 user I 
  even created a file as that user to make sure the permissions were correct.
  
 
 Ugh...found it. When I copied the savevers.vim over I needed to chmod 
 644 it, so everyone could read it.
 
 Robert

Just a new newsreader test...IGNORE

Robert



Re: set vb t_vb=

2006-08-27 Thread Robert Hicks
In article [EMAIL PROTECTED],
 Paul Irofti [EMAIL PROTECTED] wrote:

 On Sunday 27 August 2006 19:01, Paul Irofti wrote:
  On Sunday 27 August 2006 17:44, A.J.Mechelynck wrote:
   Paul Irofti wrote:
Hi vimers,
   
snip
 It would be pretty cool if I could keep all my gui and non-gui stuff in 
 one single file with something similar to what you described here.


I use: 

if has(gui_running)
  stuff
endif

I have not encountered any problems with that. I keep all my stuff in 
one vimrc file myself.

I would be curious to see Tony's vimrc as well. I know he is a *master* 
Vimmer and probably has some gnarly stuff in there.

:Robert



Re: backup directory

2006-08-25 Thread Robert Hicks

Robert Hicks wrote:

I have the following in my .vimrc:

 =
 Files/Backups
 =
set backup
set backupdir=/home/devsp7/.vim/backup
set dir=/home/devsp7/.vim/temp
set patchmode=.prev

 Config for savevers.vim
let savevers_types=*
let savevers_max=10
let savevers_purge=1
let savevers_dirs=backupdir

However, nothing is being saved to those paths. It is being saved in the 
  /home/devsp7 directory. The directories are rw for the devsp7 user I 
even created a file as that user to make sure the permissions were correct.




I should add...this is Vim7 as well.

Robert



Re: backup directory

2006-08-25 Thread Robert Hicks

Robert Hicks wrote:

I have the following in my .vimrc:

 =
 Files/Backups
 =
set backup
set backupdir=/home/devsp7/.vim/backup
set dir=/home/devsp7/.vim/temp
set patchmode=.prev

 Config for savevers.vim
let savevers_types=*
let savevers_max=10
let savevers_purge=1
let savevers_dirs=backupdir

However, nothing is being saved to those paths. It is being saved in the 
  /home/devsp7 directory. The directories are rw for the devsp7 user I 
even created a file as that user to make sure the permissions were correct.




Ugh...found it. When I copied the savevers.vim over I needed to chmod 
644 it, so everyone could read it.


Robert



Re: Open each file in newtab (without using -p)

2006-08-24 Thread Robert Hicks

A.J.Mechelynck wrote:

Groleo Marius wrote:
[...]
Thing is, the vim's tabpage mechanism is just not the way all tabbed 
apps work.

I've spent a whole day searching for a solution with no luck though.
I guess I'm searching in the wrong place, but how hard it is to implement
and option that let you choose for a single tabpage per buffer ?



Visiting vim-online http://vim.sourceforge.net/ recently, I saw a newly 
added script which seemed to be doing just that. I haven't tried it. 
Good luck.



Best regards,
Tony.

It doesn't solve everything though. If you get rid of the dll entry and 
add your own you would need one for diff and open in separate vim 
instances as well. If those are all provided as a registry hack then 
that I could go for.


:Robert



backup directory

2006-08-24 Thread Robert Hicks

I have the following in my .vimrc:

 =
 Files/Backups
 =
set backup
set backupdir=/home/devsp7/.vim/backup
set dir=/home/devsp7/.vim/temp
set patchmode=.prev

 Config for savevers.vim
let savevers_types=*
let savevers_max=10
let savevers_purge=1
let savevers_dirs=backupdir

However, nothing is being saved to those paths. It is being saved in the 
  /home/devsp7 directory. The directories are rw for the devsp7 user I 
even created a file as that user to make sure the permissions were correct.


Suggestions?

Robert



Re: Allow only one instance of vim on Windows

2006-08-23 Thread Robert Hicks

Manu Anand wrote:

Funny!!
I was thinking about this y'day.

I think this would be more than one option.
This option should exist for each opened instance of VIM.
We can probably change the functionality of Edit with existing
filename to open in a new tab.

Wotsay?



I would rather the behavior be to open in a new tab as well on Windows.

:Robert



Re: windows unicode (iso10646-1) font for vim

2006-08-18 Thread Robert Hicks

Alan G Isaac wrote:
On Mon, 31 Jul 2006, (BST) Georg Dahn apparently wrote: 
I personally need Latin only and use Consolas: 
http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3displaylang=en 
which (IMHO) is a great font. 


This package is only intended for licensed users of 
Microsoft Visual Studio 2005.  I'm not sure what

that means here ...
(intended for vs. licensed to?)



If you don't own VS2005...you can't use the font.

Robert



Re: windows unicode (iso10646-1) font for vim

2006-08-18 Thread Robert Hicks

Georg Dahn wrote:

I am not sure, if they have CJK included yet, but
http://dejavu.sourceforge.net/wiki/index.php/Main_Page
is a set of Unicode fonts which are being worked at intensely.

--- A.J.Mechelynck [EMAIL PROTECTED] wrote:

As I already mentioned, on Windows I use Courier_New for Russian and
Arabic, and MingLiU for Chinese. For Latin-only editing sessions I use
Lucida_Console.


I personally need Latin only and use Consolas:

http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3displaylang=en

which (IMHO) is a great font.

Best wishes,
Georg
They could have done better. The  symbol should have been centerlined 
so that = looked better. It is a clear font though.


Robert



Re: --with-features=TYPE

2006-08-15 Thread Robert Hicks

A.J.Mechelynck wrote:

Robert Hicks wrote:

Georg Dahn wrote:

Hi!

--- Robert Hicks [EMAIL PROTECTED] wrote:
I see in the configure file that --with-features takes tiny, small, 
normal, big or huge (default: normal).


Is there some place I can look to see what those options provide?


Try

:h :version

Best wishes,
Georg



Cool, exactly what I was looking for.  : )

Robert





Basically:
- the tiny version has nothing that can be omitted -- not even online 
help, visual mode, or expression evaluation;
- the small version has visual mode and split windows (and online 
help) but it still lacks expression evaluation;
- the normal version has a lot more, but it still lacks some important 
(to me) features, including support for multi-byte encodings (such as 
Chinese or Unicode) and for right-to-left writing systems (such as 
Hebrew, Arabic or Farsi);

- the big version has everything except the profiling feature;
- the huge version has it all.
- There are still some features (such as MzScheme, Perl, Python, Tcl, 
and, on X11 systems, GNOME, which requires a GTK+ GUI) which have to be 
included manually.


I would recommend to stay away from the tiny and small versions, 
unless you're running on a system with very limited memory like 16-bit 
Dos. Personally, since I like the big all-bells-and-whistles package, I 
source (not run) the following bash script just before running make:


-8-
#!/bin/bash
#
# this file must be sourced, not run
#
# set environment variables
export CONF_OPT_GUI='--enable-gnome-check'
export CONF_OPT_PERL='--enable-perlinterp'
export CONF_OPT_PYTHON='--enable-pythoninterp'
export CONF_OPT_TCL='--enable-tclinterp --with-tcl=tclsh8.4'
export CONF_OPT_RUBY='--enable-rubyinterp'
export CONF_OPT_MZSCHEME='--enable-mzschemeinterp'
export CONF_OPT_CSCOPE='--enable-cscope'
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_OUTPUT='--enable-fontset'
export CONF_OPT_FEAT='--with-features=huge'
export CONF_OPT_COMPBY='[EMAIL PROTECTED]'
-8-

(if your browser, or mine, beautified the last line by breaking it 
between export and CONF_OPT_COMPBY, well, it shouldn't have.)
You can use this script, changing anything you want, including of course 
at least the compiled-by line. If you lack the development packages 
required for one or other of the configured-in options, configure will 
turn it off.





A couple of questions if I may...

#1 How do I source? I have never done that prior to a make before...

#2 If I do this:

export CONF_OPT_TCL='--enable-tclinterp --with-tcl=tclsh8.4'

do I have to pass anything else to point it to libs or anything? I have 
ActiveTcl installed on my HP/UX boxes.


#3 If you are passing:

export CONF_OPT_FEAT='--with-features=huge'

and the huge version has it all why pass the multibyte, etc.?

:Robert



--with-features=TYPE

2006-08-14 Thread Robert Hicks
I see in the configure file that --with-features takes tiny, small, 
normal, big or huge (default: normal).


Is there some place I can look to see what those options provide?

:Robert



Re: Clickable error messages

2006-07-29 Thread Robert Hicks



A.J.Mechelynck wrote:

Robert Hicks wrote:



Marc Weber wrote:

:Robert


See :h quickfix ;)
Brief: :compiler perl
:set makeprg=perl :make test.pl)
If you want to add options to perl use set makeprg=perl\ --option\ blah
(escape whitespaces)
The quickfix cycle might remove some output.. depending on errorformat.

I was waiting for this question because :!perl foo doesn't do what you
want :)

See also :h compiler

If you don't want to look at scrolling lines try my runinbackground
script.. (http://www.vim.org/scripts/script.php?script_id=1582)

I would also suggest to have some quick glances at :h  topics basic
editing, advanced editing... Much to read.. or hang around in #vim on
irc.freenode.net. You can learn much there...
You don't have to read everything but it should give you an idea of what
is there .. ;)

To took me over a year to learn many features of vim and then think
about how can I really fast open the files I need ... and so on

Just ask again we'll point to corresponding documentation.

Marc



Thanks for the info. For some background I used to use the 
perl-support plugin but it isn't working on OSX Tiger so I thought I 
would just create a simple perl-utils one that I could add quick 
functions to and then assign accelerators (i.e. \rr runs it, \rc 
checks it, \rx criticizes etc.).


I have this:

function! PerlRun(...)
execute !perl  . expand(%)
endfunction

function! PerlCheck(...)
execute !perl -cw  . expand(%)
endfunction


Since the functions above make no use of any arguments, why allow any?
function! PerlRun()
without ...
Mostly because I have no idea what I am doing? That was copied from 
something else.  : )




perl-support.vim author?

2006-07-29 Thread Robert Hicks
Does anyone know what happened to the author of the perl-support.vim 
plugin? I have emailed him using the info on his site and in the package 
but it bounces. Has he dropped the project?


:Robert



Re: perl-support.vim author?

2006-07-29 Thread Robert Hicks

Fritz Mehner wrote:

Robert Hicks schrieb:

Does anyone know what happened to the author of the perl-support.vim 
plugin? I have emailed him using the info on his site and in the 
package but it bounces. Has he dropped the project?


No I have NOT dropped the project.


Great!



Emails to  [EMAIL PROTECTED]  will reach me.

(Maybe the **OLD ADDRESS** [EMAIL PROTECTED] is still somewhere 
visible.

This address is no longer valid.)

Fritz





That is probably the reason. I will contact you off list about the OSX 
issue I am having.


:Robert

:Robert









Re: perl-support.vim author?

2006-07-29 Thread Robert Hicks

Apparently Earthlink is now considered a spamming service?

=== This is what I get back ===

This is the Postfix program at host dvzis.fh-swf.de.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The Postfix program

[EMAIL PROTECTED] (expanded from [EMAIL PROTECTED]): host
pop.fh-swf.de[193.174.68.12] said: 550 5.0.0
x... We don't accept mail from spammers (in
reply to MAIL FROM command)
==

I guess I will get the error and post it here for you to look at. I am 
talking with the guy that compile Vim7 on OSX first to see if it is a 
Vim issue.


:Robert

?



Re: perl-support.vim author?

2006-07-29 Thread Robert Hicks

Yakov Lerner wrote:

On 7/30/06, Robert Hicks [EMAIL PROTECTED] wrote:

Apparently Earthlink is now considered a spamming service?


Earthlink ? You're using gmail account, aren't you ?

I post to newsgroups with my gmail account so spam reapers don't get my 
home account. I do answer from gmail as well but when I want to talk to 
an author directly I use my home (Earthlink) account.


:Robert



Vim book

2006-07-28 Thread Robert Hicks
Since a bit has changed in Vim7; does anyone know of a book (in English) 
 in the works for it?


:Robert



Re: Clickable error messages

2006-07-28 Thread Robert Hicks



Marc Weber wrote:

:Robert


See :h quickfix ;)
Brief: 
:compiler perl
:set makeprg=perl 
:make test.pl)

If you want to add options to perl use set makeprg=perl\ --option\ blah
(escape whitespaces)
The quickfix cycle might remove some output.. depending on errorformat.

I was waiting for this question because :!perl foo doesn't do what you
want :)

See also :h compiler

If you don't want to look at scrolling lines try my runinbackground
script.. (http://www.vim.org/scripts/script.php?script_id=1582)

I would also suggest to have some quick glances at :h  topics basic
editing, advanced editing... Much to read.. or hang around in #vim on
irc.freenode.net. You can learn much there...
You don't have to read everything but it should give you an idea of what
is there .. ;)

To took me over a year to learn many features of vim and then think
about how can I really fast open the files I need ... and so on

Just ask again we'll point to corresponding documentation.

Marc



Thanks for the info. For some background I used to use the perl-support 
plugin but it isn't working on OSX Tiger so I thought I would just 
create a simple perl-utils one that I could add quick functions to and 
then assign accelerators (i.e. \rr runs it, \rc checks it, \rx 
criticizes etc.).


I have this:

function! PerlRun(...)
execute !perl  . expand(%)
endfunction

function! PerlCheck(...)
execute !perl -cw  . expand(%)
endfunction

 These work
command! -nargs=* PerlRun call PerlRun()
command! -nargs=* PerlCheck call PerlCheck()

 These aren't working
map buffer silent Leaderrr Esc:call PerlRun()CR
imap buffer silent Leaderrr Esc:call PerlRun()CR
map buffer silent Leaderrc Esc:call PerlCheck()CR
imap buffer silent Leaderrc Esc:call PerlCheck()CR

I was hoping it would just a little more to get clickable errors.

:Robert



Output of a function...goes where?

2006-07-26 Thread Robert Hicks
Currently I have a couple functions defined that when I do \rc for 
example it checks my Perl code. When I run this it opens up a DOS window 
to show me the ok or error message.


How do I get that to show up in the bottom of my window (is that the 
command area?).


:Robert



Re: Output of a function...goes where?

2006-07-26 Thread Robert Hicks

Yakov Lerner wrote:

On 7/26/06, Robert Hicks [EMAIL PROTECTED] wrote:

Currently I have a couple functions defined that when I do \rc for
example it checks my Perl code. When I run this it opens up a DOS window
to show me the ok or error message.

How do I get that to show up in the bottom of my window (is that the
command area?).


Somewhere inside the code that serves as rhs for your \rc,
there is a code that invokes perl (probably via :!...). If you
change it to something along these lines

  :let result=system(perl .)
  :echo result

you'll get what you want.
Yakov


Thanks Yakov...

:Robert



Clickable error messages

2006-07-26 Thread Robert Hicks
Is there a way Vim, when it displays an error and gives me a line number 
for me to click on that line number and Vim takes me there?


:Robert



Re: Website Sign-up

2006-07-19 Thread Robert Hicks

From the Site Help link: http://vim.sourceforge.net/huh.php

In order to upload scripts you must have an account with vim online. 
This is so there can be defined contact people for scripts to avoid 
confusion. User passwords are stored using one-way encryption.


It took me about 30 seconds to find and I didn't even know if it was 
there or not.


:Robert



Re: Anchoring in a regex

2006-07-17 Thread Robert Hicks

A.J.Mechelynck wrote:

Tim Chase wrote:

syn match tclV ttk\(\(::\)\?\([[:alnum:]_.]*::\)*\)\a[a-zA-Z0-9_.]*

I only want this to work ttk at the start. I know that ^ means the 
start but I am not sure how to add that (I did try just adding it) to 
make the regex start with ttk.


Just put it at the beginning:

^ttk...

just as you would use the dollar-sign at the end to anchor something 
to the end of the line:


regexp$

-tim


Similarly, to allow it as long as it is the first non-whitespace 
characters, add zero or more whitespace between ^ and ttk :


^\s*ttk...

See :help pattern.txt for more info on Vim regular expressions (and 
dont forget the .txt extension, or you'll be brought to a formal syntax 
definition instead of to the table of contents of the helpfile).


Note that $^ in the middle of a pattern usually matches dollar followed 
by caret, not a linebreak. ( \n matches a linebreak IIUC; but in 
substitute you must use :s/\n/\r/ to replace a linebreak by itself.)



Thanks Tony and welcome back.  : )

I figured out that ttk:: can occur after a left [ as in [ttk:: and I 
am looking at the others as well.


Is there a way to do an or so that I can put ttk in {} []  and it be 
colored or is there a better way like a region?


:Robert



Help with a syntax region

2006-07-07 Thread Robert Hicks

syn match tclExternal \\(package\)\s\(forget\|ifneeded\|require\)\

I would like a region that looks at the word(s) coming after that match.

package require Tk

Tk in that would be the word to match (and color).

:Robert



[OSX issue?] Re: Backups

2006-07-03 Thread Robert Hicks

set backup
set backupdir=~/.vim/backup
set dir=~/.vim/temp

 Configuration for savevers.vim
 http://www.vim.org/scripts/script.php?script_id=89
set patchmode=.prev

let savevers_types=*
let savevers_max=10
let savevers_purge=1
let savevers_dir=backupdir



That is my config...and it doesn't work. It should dump them all in the 
backupidr but instead they show up in my home dir.


I am on OSX.

I have tried a full path /Users/robert/.vim/backup but that doesn't work 
either.


:Robert



Re: [OSX issue?] Re: Backups

2006-07-03 Thread Robert Hicks

Robert Hicks wrote:

set backup
set backupdir=~/.vim/backup
set dir=~/.vim/temp

 Configuration for savevers.vim
 http://www.vim.org/scripts/script.php?script_id=89
set patchmode=.prev

let savevers_types=*
let savevers_max=10
let savevers_purge=1
let savevers_dir=backupdir



That is my config...and it doesn't work. It should dump them all in the 
backupidr but instead they show up in my home dir.


I am on OSX.

I have tried a full path /Users/robert/.vim/backup but that doesn't work 
either.


:Robert



Found it looking at my post...dirs...not dir.




Re: Creating a backup directory

2006-07-03 Thread Robert Hicks

Tim Chase wrote:

Is there a function to create a backup directory if there
isn't one when Vim tries to backup a file?


Well, you can use the following code:

--
function! EnsureDirExists(d)
let l:s = substitute(a:d, '[/\\]*$', '/', '')
let l:isDir =  isdirectory(resolve(expand(l:s)))
if !l:isDir
echo Making directoryl:s
call system(mkdir .escape(s, ))
let l:isDir =  isdirectory(resolve(expand(l:s)))
if !l:isDir
echoerr Could not create directory: .l:s. (is it already 
a file?

endif
endif
 remove the following line to cut down on
 verbosity...more here for testing purposes.
echo a:d. [.l:s.] was .(l:isDir?: not ).a directory
endfunction

 test our function with various lines of
 data at the end of the file

$?^finish$?+,$v/^\s*/call EnsureDirExists(getline('.'))

finish
 tests go here

 a nonexistant directory
~/nonexistant
 a directory
~/tmp
 a directory with backslash
~/tmp/
 a link to a directory
~/temp
 a link to a directory with backslash
~/temp/
 same as above, only using $HOME instead of ~ for paths
$HOME/nonexistant
$HOME/tmp
$HOME/tmp/
$HOME/temp
$HOME/temp/
 test a directory with a space in its name
~/tmp/foo bar
 test a directory with a space in its name and a backslash
~/tmp/foo bar/
 test the root directory
/
 test a blank line

 test a file
~/tmp/foo.txt
--

The EnsureDirExists function will try its darndest to ensure that the 
directory passed to it exists, after which point, you can set your 
backupdir option.  You might have to tweak the mkdir call to either 
use -p or whatever the win32 version is to make all components of a 
path if it's multiple levels deep.


Just a few thoughts...


Wow, cool. I really need to learn Vim more.  :-)

:Robert



Anchoring in a regex

2006-06-29 Thread Robert Hicks

syn match tclV ttk\(\(::\)\?\([[:alnum:]_.]*::\)*\)\a[a-zA-Z0-9_.]*

I only want this to work ttk at the start. I know that ^ means the 
start but I am not sure how to add that (I did try just adding it) to 
make the regex start with ttk.


Robert



Capturing source errors

2006-06-26 Thread Robert Hicks
When I statup Vim I am getting source errors for a syntax file I am 
modifying but they go away so fast I cannot read what the errors are. 
How do I get Vim to show me those errors?


Robert



Adding keywords if a line starts with a certain word

2006-06-26 Thread Robert Hicks
I would like to add additional keywords if the first word or first 4 
characters of the statement is snit.


snit::type dog {
method {tail wag} {} {return Wag, wag}
method {tail droop} {} {return Droop, droop}
}

Since snit is there then I would like to added method as a keyword.

Robert



Re: Adding keywords if a line starts with a certain word

2006-06-26 Thread Robert Hicks

Tim Chase wrote:
I would like to add additional keywords if the first word or first 4 
characters of the statement is snit.


snit::type dog {
 method {tail wag} {} {return Wag, wag}
 method {tail droop} {} {return Droop, droop}
}

Since snit is there then I would like to added method as a keyword.


Your language here uses some definition/syntax with which I'm not 
familiar (might be smalltalk?).  I'm not sure what you mean that you 
would like method added as a keyword.  Do you want to add a third 
method line?  Having some before and after descriptions of the code 
might help clarify matters.


Snit is an OO extension to Tcl.



If you just want to perform actions on snits, and assuming you use 
consistent indentation such that snit:: is always at the beginning of 
the line, and its closing } is also always at the beginning of the 
line, you can do things like


What I am looking for is if snit is the first word then method will 
be added as a keyword and colored.


snip


Or do you want to dynamically create syntax-highlighting definitions 
based on things found in your method defintions?




Yes, I believe that is correct. Actually it might be easier to find if 
snit is anywhere in the file at the beginning of the line (it will 
always be at the beginning) and then adding some extra keywords in to be 
colored.



With a bit of clarification, there's likely a fairly easy solution.



Did I clarify anything? I hope so.

Robert



Re: Colorschemes on HP/UX

2006-06-20 Thread Robert Hicks

Yakov Lerner wrote:

On 6/20/06, Robert Hicks [EMAIL PROTECTED] wrote:

I have Vim7 on HP/UX and if I use gVim all is well when I set
colorschemes. However, if I want to use Vim then the HP terminal doesn't
seem to set colors properly. I have set background=dark but that
background (when a colorscheme is applied doesn't change).

I have read that the HP terminal is funky with colors. How can I get it
to accept the scheme I want and color it properly?


I don't think 'set background=...' changes the color of background.
It doesn't, for me.


Yes, I know that.



In case you're using hpterm or something
proprietary, you can try to run xterm (the widely used thing)
on the same computer and see whether vim behaves differently
or similarly on xterm vs hpterm.



I am pretty sure it is hpterm since I haven't added anything.


I mean, this way you can tell
whether the problem is hpterm-specific, or not.

Yakov





Re: syntax match question

2006-06-07 Thread Robert Hicks

Charles E Campbell Jr wrote:
snip
Is it possible to create a keyword group and then do a match with 
those words and if they are prefixed with a - to color them a 
certain way? A couple of the actual ones would be:


-command
-menu
-fill
-pady
-padx
-tearoff
-label
-text
-height
-width
-justify

and the list goes on. And you can see why I was hoping a simple match 
would do it.  :-)



You can get the effect I think you want with:

syn match OptionMatcher \%(^\|\s\)\zs-\w\+ 
contains=SpecificOptionList,OptionStarter
syn keyword SpecificOptionList contained command menu fill pady padx 
tearoff label text height width justify

syn match OptionStarter contained -

hi link OptionMatcher Error
hi link SpecificOptionList Statement
hi link OptionStarter SpecificOptionList

These commands will highlight your options; ones that aren't in the 
keyword list (ex.  -junk) would get highlighted as Error.


Well that kind of worked. Every word that start with - is highlighted 
as an Error, including those in the SpecificOptionList.


:Robert



Re: syntax match question

2006-06-07 Thread Robert Hicks

If I do this:

syn match OptionMatcher \%(^\|\s\)\zs-\w\+ contains=OptionStarter
syn match OptionStarter contained -

hi link OptionMatcher Special

That colorizes all the words that start with -. So in a round about 
way, it works! :-)


:Robert



syntax region question

2006-06-07 Thread Robert Hicks

In Tcl if you do this:

if {0} {
Other code you want to comment
out is in here.
}

That if statement works just like a multi-line comment (i.e. /*  */ ) in 
 other languages.


Is it possible to color that the same way as a comment?

:Robert



Re: syntax region question

2006-06-07 Thread Robert Hicks

Eric Arnold wrote:

Just a suggestion:  the C syntax knows enough to color

#if 0
...
#endif

as a comment.  You can look at how it does that.

It's easy to do if you don't have anything nested inside the if block.
I.e. something like

syntax match comment /if\s*(\s*0\s*)\s*{[^}]\_*}/

Otherwise, it gets more complicated, and I haven't figured that out yet.





I will look into that.

:Robert




Re: syntax match question

2006-06-06 Thread Robert Hicks

Tim Chase wrote:

I would like to match all options that start with a hyphen like:

-one
-two

So all those would be a match from the - to the end of the word.


Looks like a simple

/\-\w\+\/

It makes some presumptions where your description falls silent. What 
constitutes a word for you?  The vim defintion of a word is embodied 
by the \w atom.  However, it includes numbers and an underscore.  If 
that's no good, you can change the \w to the set of desired characters 
with a character-class


/\-[a-zA-Z]\+\/

Adjust accordingly.

-tim



A word can be anything really, so it would be from - to the end.

So something like:

syn match MyVarOption \-\w\+\

:Robert





Re: syntax match question

2006-06-06 Thread Robert Hicks

Robert Hicks wrote:

Tim Chase wrote:

I would like to match all options that start with a hyphen like:

-one
-two

So all those would be a match from the - to the end of the word.


Looks like a simple

/\-\w\+\/

It makes some presumptions where your description falls silent. What 
constitutes a word for you?  The vim defintion of a word is embodied 
by the \w atom.  However, it includes numbers and an underscore.  If 
that's no good, you can change the \w to the set of desired 
characters with a character-class


/\-[a-zA-Z]\+\/

Adjust accordingly.

-tim



A word can be anything really, so it would be from - to the end.

So something like:

syn match MyVarOption \-\w\+\

:Robert



I should say this is for a syntax file...so it needs to work from that.

:Robert



detecting a readonly file and not doing something...

2006-05-30 Thread Robert Hicks

I currently have this:

autocmd BufEnter * :%s/[ \t\r]\+$//e get rid of the pesky ^M

However, it gives me an error I have to enter through when I open a 
readonly file.


I want to be able to turn that off when the file is RO.

:Robert



Detecting if I am on Windows

2006-05-30 Thread Robert Hicks
let MSWIN = has(win16) || has(win32) || has(win64) || has(win95) 
|| has(win32unix)


Is there a windows variable that has all these in it?

:Robert



Re: detecting a readonly file and not doing something...

2006-05-30 Thread Robert Hicks

James Vega wrote:

On Tue, May 30, 2006 at 09:16:38AM -0400, James Vega wrote:

On Tue, May 30, 2006 at 09:04:15AM -0400, Robert Hicks wrote:

I currently have this:

autocmd BufEnter * :%s/[ \t\r]\+$//e get rid of the pesky ^M

However, it gives me an error I have to enter through when I open a 
readonly file.

Something along the lines of

  autocmd BufEnter * :if ro | %s/[ \t\r]\+$//e | endif


That should actually be

  autocmd BufEnter * :if !ro | %s/[ \t\r]\+$//e | endif

since you want the replacement performed only when the buffer is not
readonly.

James

I actually caught that.  :-)

:Robert



gvimrc vs vimrc

2006-05-29 Thread Robert Hicks

I have never used a gvimrc. Does that get parsed by gVim only?

:Robert



Re: Extending Vim7 with plugins

2006-05-19 Thread Robert Hicks

Yakov Lerner wrote:

On 5/19/06, Robert Hicks [EMAIL PROTECTED] wrote:

Is there some tutorial out there for a newbie starting with Vim7 to
learn how to program for it?


The Write a Vim script tutorial is bundled with vim.
You only need to know how to open it in vim. Here is how:
   :he usr_41
vim will open document titled Write a Vim script.
To read the document full-screen, enter this command:
   :on

The beginning of the document is below.

Yakov

*usr_41.txt*For Vim version 7.0g.  Last change: 2006 Apr 30

VIM USER MANUAL - by Bram Moolenaar

 Write a Vim script


The Vim script language is used for the startup vimrc file, syntax 
files, and
many other things.  This chapter explains the items that can be used in 
a Vim

script.  There are a lot of them, thus this is a long chapter.

|41.1|  Introduction
|41.2|  Variables
|41.3|  Expressions
|41.4|  Conditionals
|41.5|  Executing an expression
|41.6|  Using functions
|41.7|  Defining a function
|41.8|  Lists and Dictionaries
|41.9|  Exceptions
|41.10| Various remarks
|41.11| Writing a plugin
|41.12| Writing a filetype plugin
|41.13| Writing a compiler plugin
|41.14| Writing a plugin that loads quickly
|41.15| Writing library scripts
|41.16| Distributing Vim scripts

Next chapter: |usr_42.txt|  Add new menus
Previous chapter: |usr_40.txt|  Make new commands
Table of contents: |usr_toc.txt|


Cool, I will run with that...

Robert



Re: HTML editing with vim: where to start ?

2006-05-19 Thread Robert Hicks

A.J.Mechelynck wrote:

Vinay Doma wrote:

A.J.Mechelynck wrote:
Maybe I overreacted. OK, let's amend it: if you want a Windows-like
editor, don't use Vim, use WordPad (in plaintext mode). I still won't
recommend mswin.vim to anybody.


But what about mswin.vim don't you like? All it has is a bunch of
windows friendly mappings (Cut, Copy, Paste, Select All, Redo, Undo,
etc). Looks pretty harmless to me. And you could always modify them to
suit your need.

vdoma



What I don't like about it is that it interferes with standard Vim 
normal-mode commands, making Vim less Vim-like, and, in some cases, 
making some commands totally unavailable without unneeded extra work 
(such as creating noremaps for them and running the risk of hiding still 
other commands). One case in point is that of Ctrl-X which you (or 
someone else in this thread) noticed; there are others: almost every 
Ctrl-letter keystroke has a meaning in Vim; making them Windows-like 
hides the proper Vim command. There are Vim commands for everything 
you mentioned, and (IMO) those windows-like commands just stand in the 
way of learning the more versatile native Vim commands (for Cut: x = 
cut letter, dd = cut line, daw = cut word, [Visual]d = cut visual 
selection, etc.; prefix by + to place them into the clipboard. Select 
All is ggVG which breaks down as gg = go to top, V = start linewise 
visual, G = go to bottom. Undo is u, Redo is Ctrl-R [not r which is 
replace], And so on.)


In the years I've been on this list, I don't count the number of times 
when newbies have come asking, in essence, Why doesn't Vim behave as 
advertised? and mswin.vim (which they unknowingly were sourcing in 
their vimrc) was the reason.



Best regards,
Tony.

I never thought of that. I just started learning Vim on Windows because 
I was doing vi on HP/UX (now Vim7). I realize the handicap that 
mswin.vim gave me. I have commented it out for now to see if I can cut 
it, since my goal was to learn one editor on all the platform I am on 
(Windows, OSX, HP/UX).


Robert



Unix source as a tar.gz

2006-05-12 Thread Robert Hicks
I do not have bzip2 on my HP servers. Could Vim7 be bundled up into a 
tar.gz just like the .bz2 distribution?


Robert



Re: Unix source as a tar.gz

2006-05-12 Thread Robert Hicks

Bram Moolenaar wrote:

Robert Hicks wrote:

I do not have bzip2 on my HP servers. Could Vim7 be bundled up into a 
tar.gz just like the .bz2 distribution?


If you are able to install Vim, aren't you also able to install
bzip2/bunzip2?


No, I got special consideration for Vim because I lobbied for it.  :-)

I ended up tar.gz it on my Windows box.

I asked, not meaning to start a firestorm, because the Vim site for 6.4 
said to get the tar.gz ones if you didn't want to get the big bz2 file. 
I thought maybe it was an oversight that the tar.gz ones were not out 
there as well. So I asked.


Robert



Re: vim7: how to get spanish spell check

2006-05-10 Thread Robert Hicks

Juan Pablo Aqueveque wrote:

Hi everyone.

I just downloaded vim7 and i realize that Spanish spelling is not. how
i can set it? (step by step please).

--
juan pablo aqueveque
www.juque.cl


How about:

:help spell

: )

Robert



Re: Vim version 7.0g BETA has been released

2006-05-02 Thread Robert Hicks

Bram Moolenaar wrote:

Gene Kwiecinski wrote:


- Win32: Dropping a shortcut on the Vim icon edited the shortcut instead
 of the file it refers to (old problem).

Any way to actually edit the shortcut?  :D


Yes, set 'binary' before editing the file.  Well, that requires the -b
argument somehow and you can't do that when dropping the link on the
gvim icon.  But you can start gvim first to do it.

Why not? The target on the gvim icon is C:\Vim\vim70g\gvim.exe on my 
box. Can't I create another shortcut with C:\Vim\vim70g\gvim.exe -b 
and call it gVim binary or something?  :)


Robert



Starting Vim

2006-04-19 Thread Robert Hicks
If I open a file with a long enough path name Vim will stop loading 
until I hit enter to continue. How can I change this?


Robert



Re: Vim 7.0e (beta) Windows installer

2006-04-19 Thread Robert Hicks

Steve Hall wrote:

I have made available a Windows installer for Vim 7.0e (beta):

  http://prdownloads.sourceforge.net/cream/gvim-7-0e-beta-0.exe?download

This contains only English language files, you'll need to download and
manually install the lang\ and spell\ files for other options. These
are similar in compiled features to the other packages we've built,
described on http://cream.sourceforge.net/vim.html.



Does this install cream using Vim7?

Robert



How do I get rid of null characters?

2006-04-17 Thread Robert Hicks
I have a log that has embedded null characters (i.e ^@). I need to get 
rid of them all.


Robert



Re: How do I get rid of null characters?

2006-04-17 Thread Robert Hicks

Yakov Lerner wrote:

On 4/17/06, Robert Hicks [EMAIL PROTECTED] wrote:

I have a log that has embedded null characters (i.e ^@). I need to get
rid of them all.


:map F2 :s/C-V000//gcr
Then press F2

Yakov


Thank you!

Rober



Re: How do I get rid of null characters?

2006-04-17 Thread Robert Hicks

Eric Arnold wrote:

You've gotta be careful about nulls.  Vim stores newlines (^J) as
nulls in some cases, so you might be getting rid of more than you
wanted.



Thanks for the warning. I only want to do this for one file that I have 
so I am not going to permanently add it to my .vimrc.


Robert