Dave Silvia | 1 Jul 2004 03:01

FW: would like to submit indent/ftplugin/syntax files

You folks in the 'To' list are being contacted as the maintainers of note of
the indent/*.vim files in the current (version 6.3) Vim distribution.

I authored some indent/ftplugin/syntax scripts and submitted them to Bram
for inclusion in Vim distribution.  These files make use of auxiliary files
which have generic functions in them.  One of these files is
'GenericIndent.vim' and Bram thought, perhaps, it might be of interest to
you.  Put simply, this is a data driven function that decides on the amount
of indent/dedent based on data sets you can define.

If set thoughtfully, the data allows GenericIndent() to properly identify
indentation and de-indentation ('dedentation') when called by Vim.

I have attached the file to this email for your consideration.  As I see it,
there are the following advantages:

	1)  For the maintainer, it reduces the maintenance task to managing the
data sets.

	2)  For the user:
		o makes individual indent/*.vim scripts easier to read/understand
		o provides for ease of modification to suit personal tastes
		o encourages new indent/*.vim scripts for other file types

	3)  Although the reduction in code size would be minimal, it would still be
non-zero

Note that there is a debugging feature that can be turned on by 'let
b:DEBUGGING=1' and turned off by either 'unlet b:DEBUGGING' or 'let
b:DEBUGGING=0'
(Continue reading)

lolli lolli | 1 Jul 2004 04:20
Picon
Favicon

RE: cscope for Oracle sql and plsql

Dave,

I thought someone might have already done it. 

There was a discussion on sourceforge.net related to
supporting Databases. I wanted to post there also, but
I do not have membership and its not free. 

I'm still using cscope for plsql, but just to search
using "C Symbol" and "Find Text". 

rgds,
Uday

--- David Fishburn <fishburn <at> ianywhere.com> wrote:
> That would imply that cscope can be enhanced to do
> something like this.
> I read through the man page and didnt see anything
> that would suggest
> extensions.
> 
> Are you aware that this can be done?
> 
> Dave
> 
> > -----Original Message-----
> > From: lolli lolli [mailto:l0ll1 <at> yahoo.com] 
> > Sent: Tuesday, June 29, 2004 12:39 AM
> > To: vim <at> vim.org
> > Subject: cscope for Oracle sql and plsql
(Continue reading)

Benji Fisher | 1 Jul 2004 04:40

Re: mapping '[[' and '[[' keys for Oracle SQL files

On Tue, Jun 29, 2004 at 01:09:21AM -0700, Gary Johnson wrote:
> On 2004-06-28, lolli lolli <l0ll1 <at> yahoo.com> wrote:
> > 
> > map [[ ?^[function|procedure]<CR>
> > map [[ ?^[function\|procedure]<CR>
> 
> As a simple fix to your mappings, this seems to work:
> 
>     map [[ ?^\(function\\|procedure\)\c<CR>
> 
[snip]
> One problem with this approach to redefining [[ and ]] is that it
> sets the search pattern to "^\(function\|procedure\)\c" which
> highlights everything matching that pattern and gets rid of your
> previous search pattern.  One solution to that problem is to use a
> function, like this:
> 
>     map [[ :call SectionStartBackward()<CR>
> 
>     function! SectionStartBackward()
>        silent exe "normal ?^\\(function\\|procedure\\)\\c\<CR>"
>     endfunction
> 
> This makes use of the property of functions that they don't change
> the last used search pattern.  See
> 
>     :help a:firstline
> 
> I think the search() function could be used to accomplish the same
> thing, but I adapted these examples from some code in my ~/.vimrc
(Continue reading)

Terrance Cohen | 1 Jul 2004 05:28

Re: help with cscope..

I found that I had to do the ":cs add" after the VimEnter event.  Don't 
know why, but it works.

You can add this to your vimrc: au VimEnter * cs add cscope.out

Alternatively, I source a separate script on VimEnter, and do a few 
things there: au VimEnter * source $VIM_USER\VimEnter.vim

Anybody know why :cs add only works after VimEnter?

-Terrance Cohen

Gowri.S <at> trilogy.com wrote:

>Hi,
>
>I am trying to use cscope from within Vim for my java project. Evironment 
>is Win2k.
>
>Read the Vim/Cscope tutorial and built my cscope database using a list of 
>my java files.
>
>Now from inside Vim (6.3, +cscope) , when I issue ":cs add cscope.out"
>an error message is given: E262: error reading cscope connection 0. 
>The cscope.out file is readable and querying it using the cmd line 
>interface of cscope works fine.. 
>
>Can anybody help me solve this problem? Please??
>
>--gowri
(Continue reading)

Gowri.S | 1 Jul 2004 05:32
Favicon

Re: help with cscope..

nope :-( that dint work either :-(

Terrance Cohen <vim <at> RenaAndTerry.com>
07/01/2004 08:58 AM

 
        To:     vim <at> vim.org
        cc: 
        Subject:        Re: help with cscope..

I found that I had to do the ":cs add" after the VimEnter event.  Don't 
know why, but it works.

You can add this to your vimrc: au VimEnter * cs add cscope.out

Alternatively, I source a separate script on VimEnter, and do a few 
things there: au VimEnter * source $VIM_USER\VimEnter.vim

Anybody know why :cs add only works after VimEnter?

-Terrance Cohen

Gowri.S <at> trilogy.com wrote:

>Hi,
>
>I am trying to use cscope from within Vim for my java project. Evironment 

>is Win2k.
>
(Continue reading)

Terrance Cohen | 1 Jul 2004 16:53

Re: help with cscope..

Is cscope.out in your current directory when issuing :cs add?  Try 
providing a full path to the .out file, eg. :cs add 
c:\mywork\source\cscope.out

-Terrance

Gowri.S <at> trilogy.com wrote:

>nope :-( that dint work either :-(
>
>
>
>
>
>
>Terrance Cohen <vim <at> RenaAndTerry.com>
>07/01/2004 08:58 AM
>
> 
>        To:     vim <at> vim.org
>        cc: 
>        Subject:        Re: help with cscope..
>
>
>I found that I had to do the ":cs add" after the VimEnter event.  Don't 
>know why, but it works.
>
>You can add this to your vimrc: au VimEnter * cs add cscope.out
>
>Alternatively, I source a separate script on VimEnter, and do a few 
(Continue reading)

Gregory Margo | 1 Jul 2004 18:42

Re: Command history while debugging is gone

On Wed, Jun 30, 2004 at 11:19:03PM +0200, Bram Moolenaar wrote:
> debug mode history?  Try ":hist >".

Is there some reason that ":hist >" is not in the docs?
Here's a patch against 6.3.10 that may need rewording regarding debug mode:

*** runtime/doc/cmdline.txt.save	2004-06-07 02:05:17.000000000 -0700
--- runtime/doc/cmdline.txt	2004-07-01 09:35:21.000000000 -0700
***************
*** 45,56 ****

  						*cmdline-history* *history*
  The command-lines that you enter are remembered in a history table.  You can
! recall them with the up and down cursor keys.  There are actually four
  history tables:
  - one for ':' commands
  - one for search strings
  - one for expressions
! - one for input lines, typed for the |input()| function.
  These are completely separate.  Each history can only be accessed when
  entering the same type of line.
  Use the 'history' option to set the number of lines that are remembered
--- 45,57 ----

  						*cmdline-history* *history*
  The command-lines that you enter are remembered in a history table.  You can
! recall them with the up and down cursor keys.  There are actually five
  history tables:
  - one for ':' commands
  - one for search strings
(Continue reading)

Alan G Isaac | 1 Jul 2004 18:07
Picon
Favicon

Re[4]: grep -o

On Tue, 29 Jun 2004, "gumnos (Tim Chase)" apparently wrote:
> let  <at> a='' | g/foo/let  <at> a= <at> a.substitute(getline(line('.')),".\\{-}\\(". <at> /."\\)\\(\\%(". <at> /."\\)\\ <at> !.\\)*","\\1\n",'g')
> (again all one bletcherous line)  I think this grabs all instances on a line, assuming they don't overlap.

I'm still parsing this,
but it does seem to work.

Thanks!
Alan

gumnos (Tim Chase | 1 Jul 2004 19:28
Picon
Favicon

Re: Re[4]: grep -o

> > let  <at> a='' | g/foo/let
 <at> a= <at> a.substitute(getline(line('.')),".\\{-}\\(". <at> /."\\)\\(\\%(". <at> /."\\)\
\ <at> !.\\)*","\\1\n",'g')
> > (again all one bletcherous line)  I think this grabs all instances
on a line, assuming they don't overlap.
>
> I'm still parsing this,
> but it does seem to work.

Glad it serves your purpose.  I'll try and explain a bit what it's doing
if you want to follow along.  The trick was to take advantage of the "g"
option for "substitute()" to snag the rest of them on the line, and then
use the "\\ <at> !" to prevent the search-regexp from slurping up additional
hits.  It replaces the simple ".*" (from my first stab at the regexp,
which heaved the rest of the line in the bit-bucket, even if it had
another match) with the more complex "anything up to but not including
the next match" which is

    \(\%(regexp\)\ <at> !.\)*

when un-escaped.  It then replaces the preceeding non-matching junk, the
hit, and the trailing junk with simply the hit, followed by a newline.
Do this for the remainder of the line ("g") which may contain further
hits, and you're golden :)  The big trick was making sure that all the
escapings happened properly.

-tim

Bram Moolenaar | 1 Jul 2004 20:41
Picon

Re: Command history while debugging is gone


Gregory Margo wrote:

> On Wed, Jun 30, 2004 at 11:19:03PM +0200, Bram Moolenaar wrote:
> > debug mode history?  Try ":hist >".
> 
> Is there some reason that ":hist >" is not in the docs?
> Here's a patch against 6.3.10 that may need rewording regarding debug
> mode:

Thanks.  Strange that this was missing.

--

-- 
ARTHUR: Listen, old crone!  Unless you tell us where we can buy a shrubbery,
        my friend and I will ... we will say "Ni!"
CRONE:  Do your worst!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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


Gmane