Re: Multiple search highlights?

2007-06-04 Thread Greg Dunn

What I need is to be able to search for something else (which I
believe I could do by searching using a regex), but I would like that
second thing to be in another color a la Google's search results (at
least in dejanews). What I need, eventually, is an angry fruit salad
of colors for all the search items I've entered.

Is this currently doable, and if not, do you think it's possible to
accomplish using a plugin?


I think this plugin will accomplish what you want:
http://www.vim.org/scripts/script.php?script_id=1238


Re: gvim hangs when _vimrc loaded and with syntax on

2007-03-14 Thread Greg Dunn

The symptoms are that when I load _vimrc into a buffer, and _vimrc
contains

  syntax on


Does this thread help:

http://tech.groups.yahoo.com/group/vim/message/76286

Essentially, vim is finding an incompatible tcl84.dll in your path
(probably from cygwin, if you have that installed).  Assuming you
don't need tcl support, putting an empty file named tcl84.dll earlier
in the path should fix things up.

-- Greg


Re: Feature suggestion

2007-01-25 Thread Greg Dunn

On 1/25/07, Brian McKee <[EMAIL PROTECTED]> wrote:

Control-A to increment numbers is really handy sometimes.   How about
adding logical opposites?
i.e.  control-a while the cursor is over the word TRUE would make it
flip to FALSE,
on to off, yes to no and vice versa - case preserving of course.  It
would be great for lots of config files.


I think what you want has already been done... Check out
http://www.vim.org/scripts/script.php?script_id=1046

-- Greg


Re: GVIM 7-0-178 seizing up

2006-12-19 Thread Greg Dunn

On 12/19/06, zzapper <[EMAIL PROTECTED]> wrote:

Hi
http://downloads.sourceforge.net/cream/gvim-7-0-178.exe?modtime=1165578469
&big_mirror=0

Downloaded above by following links from vim.org

It works fine with most files but cannot edit .vimrc (unless I rename
.vimrc to say fred)
it shows the menu "read only, edit anyway etc then seizes.

I expect I'm posting this in the wrong forum, but where?

--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips




Does it freeze when you try to edit other .vim files?  I had a similar
problem a while back using the install available from the Cream site,
see if these threads help you out:

http://tech.groups.yahoo.com/group/vim/message/74219
http://tech.groups.yahoo.com/group/vimdev/message/45215

-- Greg


Re: Gvim closing unexpectedly

2006-10-05 Thread Greg Dunn

On 10/4/06, Steve Hall <[EMAIL PROTECTED]> wrote:


[cross-posting to connect threads]

On Thu, 2006-10-05 at 10:04 +1000, Robbie Gates wrote:
> Hi All,
>
> i was having problems with gvim hanging when i tried to edit my
> vimrc.
>
> After a bit of sleuthing, i tracked it down to has("tcl") hanging
> (called from syntax/vim.vim).

It appears your post and one on the vim list are related:

  http://tech.groups.yahoo.com/group/vim/message/74227
  http://tech.groups.yahoo.com/group/vimdev/message/45215

I'm not on a Windows box tonight to track this down, can anyone help
us figure out if this is in the binary or runtime?

1. Verify syntax/vim.vim is not corrupt

2. Test the binary:

 :echo has("tcl")

Greg, do you have Cygwin installed?

Interesting that this just cropped up twice in two hours, these
packages have been downloaded nearly 300 times over 8 days.


Yep, I have cygwin, and yep, the dummy tcl84.dll fixed the problem.
One difference I have from the dev thread is that my gvim doesn't
hang, it just closes.

-- Greg


Re: Gvim closing unexpectedly

2006-10-04 Thread Greg Dunn

On 10/4/06, Steve Hall <[EMAIL PROTECTED]> wrote:

From: "Greg Dunn", Wed, October 04, 2006 1:51 pm
>
> I recently grabbed an updated gvim binary (7.0 with patches 1-110)
> from the cream sf site and now gvim closes without warning whenever
> I try to open a .vim script.  It seems to have something to do with
> syntax highlighting:
>
> $ gvim -u NONE -U NONE
>
> :filetype on
> :e foo.vim
> :redir > vim.txt
> :se verbose=10
> :syntax on
> Vim closes at this point
>
> the redirect was intended to see what was happening before it
> closes, but the file never gets written to before vim closes.
>
> Any ideas?

I'm unable to reproduce this in our 7.0.118 build from same site (and
used 7.0.110 daily prior). Do you see anything more if you prepend
:debug to that last command?


--
Steve Hall  [ digitect dancingpaper com ]




Fresh install of 7.0.118 gives the same results.

Instead of redirecting to a file, I set verbose=20 and redirected to
@*, which seemed to catch everything.  There's a whole lot of output,
but here's the last few lines:


finished sourcing c:\Program Files\Vim\vim7.0-118\vim70\syntax/python.vim
continuing in c:\Program Files\Vim\vim7.0-118\vim70\syntax\vim.vim
line 515:  syn region vimPythonRegion matchgroup=vimScriptDelim
start=+py\%[thon]\s*<<\s*\z(.*\)$+ end=+^\z1$+
[EMAIL PROTECTED]

line 516:  syn region vimPythonRegion matchgroup=vimScriptDelim
start=+py\%[thon]\s*<<\s*$+ end=+\.$+ [EMAIL PROTECTED]

line 517: endif

line 518:

line 519: " [-- tcl --] {{{3

line 520: if (has("tcl") || g:vimembedscript) &&
filereadable(expand(":p:h")."/tcl.vim")



the output is no different whether I use :debug or not.

-- Greg


Gvim closing unexpectedly

2006-10-04 Thread Greg Dunn

I recently grabbed an updated gvim binary (7.0 with patches 1-110)
from the cream sf site and now gvim closes without warning whenever I
try to open a .vim script.  It seems to have something to do with
syntax highlighting:

$ gvim -u NONE -U NONE

:filetype on
:e foo.vim
:redir > vim.txt
:se verbose=10
:syntax on
Vim closes at this point

the redirect was intended to see what was happening before it closes,
but the file never gets written to before vim closes.

Any ideas?


:version

VIM - Vi IMproved 7.0 (2006 May 7, compiled Sep 26 2006 11:09:51)
MS-Windows 32 bit GUI version with OLE support
Included patches: 1-110
Compiled by [EMAIL PROTECTED]
Big version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +cl
ientserver +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 +mzs
cheme/dyn +netbeans_intg +ole -osfiletype +path_extra +perl/dyn -postscript
+printer -profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbin
d +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse +textobjects +tit
le +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
+viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -x
term_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: gcc -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-redu
ce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DFEA
T_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL="perl58.dll" -DFEAT_PYTHON -DDYNAMIC_PY
THON -DDYNAMIC_PYTHON_DLL="python24.dll" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RU
BY_DLL="msvcrt-ruby18.dll" -DDYNAMIC_RUBY_VER=18 -DFEAT_MZSCHEME -DDYNAMIC_MZSCH
EME -DDYNAMIC_MZSCH_DLL="libmzsch352.dll" -DDYNAMIC_MZGC_DLL="libmzgc352.dll" -D
FEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL="tcl84.dll" -DDYNAMIC_GETTEXT -DDYNAMIC
_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS
_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_OLE -march=i386 -Iproto -I/cygdrive
/c/PERL/lib/CORE -I/cygdrive/c/PYTHON24/include -I/cygdrive/c/RUBY/lib/ruby/1.8/
i386-mswin32 -I/cygdrive/c/PROGRA~1/MzScheme/include -I/cygdrive/c/Tcl/include -
s -mno-cygwin
Linking: gcc -s -o gvim.exe  -luuid -lole32 /cygdrive/c/Tcl/lib/tclstub84.lib -l
wsock32 -mwindows -lcomctl32 -lversion -loleaut32 -lstdc++


Re: :helpgrep and 'ignorecase'

2006-09-22 Thread Greg Dunn

On 9/22/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:



Am I, like, alone in the Universe to use/have 'set ignorecase' by default ?

Yakov



I'm an ignorecaser too.  It gets in the way a bit with C
omni-completion, though.  Is there an easy way (i.e. an option... I
don't want to muck with the completion scripts or hackish maps) to set
noic for omni searches?

-- Greg


Re: glued Cursor trick anyone ?

2006-09-20 Thread Greg Dunn

On 9/19/06, Meino Christian Cramer <[EMAIL PROTECTED]> wrote:

Hi,

 I would like to accomplish three "tricks":

 1.) Suppose you have a source code and have started an new search
   task recently. With "n" you are jumping from match to
   match. Sometimes the "next match" is right on the last line
   currently visible. Pressing "n" let the cursor jump there. The
   screen is not scrolled, cause the target is still on the screen --
   but the context is not.

   Is it possible to always scroll the screen that way, that pressing
   "n" wll always take you to the middle of the screen (or in other
   words: The cursor is glued to the middle of the screen and the text
   jumps "under" the cursor)?

 2.) This is similiar: I want to scroll through text and keep the
   cursor glued to a certain position on the screen.

 3.) Last "glued cursor" thingy: I want to glue the cursor on the text
   and using "up" and "down" will not move the cursor on the text but
   the text on the screen.


 I am sure these are little steps for a vim guru to accomplish but
 would be big steps for me. :)

 Thank you very much for any hint and/or help in advance !

 Keep hacking!
 mcc



1) I use Tim's suggestions of
   :nnoremap n nzz
:nnoremap N Nzz

2) help CTRL-D
   help CTRL-U

3) help CTRL-E
   help CTRL-Y

for 2 and 3, I have them mapped so the count is always 1:

:nnoremap  1
:nnoremap  1
:nnoremap  1
:nnoremap  1


Re: Making Autocmd matches buffer's first line

2006-09-20 Thread Greg Dunn

On 9/20/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:

On 9/20/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 9/20/06, Fabien Meghazi <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I have a lot of python files without the .py extensions as I'm using
> > them as commands, those files are scripts in my ~/bin with execute bit
> > set.
> > I set up my editing environment for python files in my .vimrc using
> > autocmd using pattern *.py
> > But I would like these autocmd's to match those files whitout .py 
extensions.
> >
> > My question is :
> >
> > Is it possible to make an autocmd pattern's to match something in the
> > first line's buffer with a regexp eg: ( ^#\!.+python  or something
> > like that )  instead of the filename ?
>
> We typically do it as follows:
>
> :au BufReadPost * if getline(1) =~ 'pattern' | do something | endif

:au BufReadPost * if getline(1) =~ '^#!.*python' | set filetype=python | endif

(untested.)

Yakov



Also check out:
:help new-filetype-scripts


Re: locked indents like emacs

2006-08-24 Thread Greg Dunn

Hi is there a way to make indentation in Vim "lock" like in emacs so that if I press 
tab in the > beginning of a line, then it indents the line to the correct place. Pressing 
tab multiple times > does not change the indentation any further - it is locked.


How about

:nmap  ==

This will allow you to insert tabs while in insert mode, but when in
normal mode it indents the line according to the current indent rules.

--  Greg