Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vim · Vim (Vi IMproved) text editor users list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 15246 - 15275 of 138237   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#15246 From: Thomas Capricelli <orzel@...>
Date: Thu Dec 7, 2000 2:54 pm
Subject: Re: Whishes for vim 7.0
orzel@...
Send Email Send Email
 
> Why is this "kvim", rather than just a compile-time option for Vim? That

	 cause it's easier for us to do the development here. It was based on the 5.x
vim. I think it will be _easy_ to port to the 6.x branch

	 as the one in charge of the cvs, I've been _very_ careful about doint things
in a way we are following vim development. it's not a fork, it's a branch.
I'm aware of consequences if we merge. really. It could be put in the
official branch. I've spoken with bram about this. There seem to be no
problem with him (bram ?), neither about the decision, nor on technical
aspects.

	 another reason is that we need to remove lot of things to get a smal kpart
lib. but that's another issue.


> As you are only at version 0.1/0.2 at present, can you consider changing
> your approach and providing a patch to Vim (probably version 6.0) instead
> of a separate application?

	 I've already sent such a patch to Bram 'for review only'. There were no
problem, kde-specific files are kept separate (exactly as are gtk- or athena-
specific files, have a look).

	 To keep it short

	 It follows easily whatever version of vim I want
	 It can be merged with the official tree at every moment.
	 Until further notice, kvim stay in KDE cvs where it's easier for us to code

I hope I've answered you questions,


best regards,
Thomas

--

Thomas Capricelli <orzel@...>
boson : http://boson.eu.org
kvim : http://aquila.rezel.enst.fr/thomas/vim/

#15247 From: Devin Weaver <ktohg@...>
Date: Thu Dec 7, 2000 3:25 pm
Subject: UPDATE xmledit.vim
ktohg@...
Send Email Send Email
 
A new version has been placed at my FTP site for the xmledit.vim script.
ftp://tritarget.com/pub/vim/scripts/xmledit.vim

" This script provides some convenience when editing XML (and some SGML)
" formated documents. <M-5> will jump to the beginning or end of the tag block
" your cursor is in. % will jump between '<' and '>' within the tag your
" cursor is in. when in insert mode and you finish a tag (pressing '>') the
" tag will be completed. If you press '>' twice it will complete the tag and
" break it across a blank. If you want to enter a literal '>' without
" parsing use <M-.>

" Kudos to Brad Phelan for completing tag matching and visual tag completion.

--
If VIM were a woman, I'd marry her.  Slim, organized, helpful and beautiful;
what's not to like?

#15248 From: "Moore, Paul" <Paul.Moore@...>
Date: Thu Dec 7, 2000 3:52 pm
Subject: RE: Whishes for vim 7.0
Paul.Moore@...
Send Email Send Email
 
From: Thomas Capricelli [mailto:orzel@...]
> as the one in charge of the cvs, I've been _very_
> careful about doint things in a way we are following
> vim development. it's not a fork, it's a branch.
> I'm aware of consequences if we merge. really. It could be put in the
> official branch. I've spoken with bram about this. There seem
> to be no  problem with him (bram ?), neither about the decision,
> nor on technical aspects.
[...]
> To keep it short
>
> It follows easily whatever version of vim I want
> It can be merged with the official tree at every moment.
> Until further notice, kvim stay in KDE cvs where it's
> easier for us to code

That's excellent news. I look forward to using kvim (when I finally get a
Linux PC set up with KDE running on it...)

Paul.

#15249 From: Peter Bismuti <bismuti@...>
Date: Thu Dec 7, 2000 6:50 pm
Subject: slickest way to insert filename?
bismuti@...
Send Email Send Email
 
What is the slickest way of insert the filename into the document??

The :r! echo % works but is a bit wordy.  It could be mapped of course,
but I was wondering if there is an even easier way.

Thx

   _____________________________________________________________________
  |                                                                     |
  |         Pete Bismuti                                                |
  |         Department of Computer Science                              |
  |         Florida State University                                    |
  |         bismuti@...  (850) 644-6835                          |
  |_____________________________________________________________________|

#15250 From: DouglasPotts@...
Date: Thu Dec 7, 2000 6:59 pm
Subject: Re: slickest way to insert filename?
DouglasPotts@...
Send Email Send Email
 
I believe that would be in insert mode, that you do:
<c-r>=%

-Doug

--
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Douglas L. Potts  Spectral Systems, Inc. Url: http://www.bigfoot.com/~pottsdl
"Writing is easy. It's all a matter of staring at a blank piece of paper
until your forehead bleeds" -Douglas Adams
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*



                     Peter Bismuti
                     <bismuti@...        To:     vim@...
                     su.edu>              cc:
                                          Subject:     slickest way to insert
filename?
                     12/07/00
                     01:50 PM





What is the slickest way of insert the filename into the document??

The :r! echo % works but is a bit wordy.  It could be mapped of course,
but I was wondering if there is an even easier way.

Thx

   _____________________________________________________________________
  |                                                                     |
  |         Pete Bismuti                                                |
  |         Department of Computer Science                              |
  |         Florida State University                                    |
  |         bismuti@...  (850) 644-6835                          |
  |_____________________________________________________________________|

#15251 From: Benji Fisher <fisherbb@...>
Date: Thu Dec 7, 2000 7:02 pm
Subject: Re: slickest way to insert filename?
fisherbb@...
Send Email Send Email
 
Peter Bismuti wrote:
>
> What is the slickest way of insert the filename into the document??
>
> The :r! echo % works but is a bit wordy.  It could be mapped of course,
> but I was wondering if there is an even easier way.
>
> Thx

Normal mode:  "%p

Insert mode:  <C-R>%

:help registers
:help copy-move
:help i_ctrl-R

					 --Benji Fisher

#15252 From: Benji Fisher <fisherbb@...>
Date: Thu Dec 7, 2000 7:50 pm
Subject: Re: Searching for next place where pattern does *not* match?
fisherbb@...
Send Email Send Email
 
Jean Jordaan wrote:
>
> Hi all
>
> On a file like:
>
> ap*acs29_sink
> apacs29_sink
> ^apacs29_src
>
> Cursor is at *. I want it to go to ^. (* and ^ do not appear in the
> file, they're just to show the cursor.)
>
> This search works:
> /[^\(apacs29_sink\)]
> but this one doesn't:
> /^[^\(apacs29_sink\)]
>
> The general question is: How do I find the next line that *doesn't*
> start with the same pattern as the current one?

      I think you misunderstand what the [brackets] are doing.  In
particular, there is no special meaning for \(\) inside the brackets:
these are just four characters.  Re-read :help /[] (and search for "NOTE").

      In vim 6.0, there is a way to do what you want with a regular
expression.  In vim 5.7 (or earlier) the only way is to do something
horrendous like

/ ^$ \| ^[^a] \| ^a$ \| ^a[^p] \| ^ap$ \| ^ap[^a] ...

(The spaces are there for ease of reading; do not really use them in a
search pattern.)

      Who says we have to solve this problem using just regular expressions?

:let found_it = 0
:.,$v/^apacs29_sink/if !found_it|let next=line('.')|let found_it=1|endif
:if found_it | execute next | endif

This would be very slow on a large file, but it should work.  If you are
doing this by hand, not from a function or mapping, you might consider
yanking the desired expression, then

:set hls " if it is not already set
/^<C-R>".*

and then looking for the first line that is not highlighted.

HTH 			 --Benji Fisher

#15253 From: "David Gravereaux" <davygrvy@...>
Date: Fri Dec 8, 2000 1:17 am
Subject: is there a way to put color syntaxing into a debug mode?
davygrvy@...
Send Email Send Email
 
I'm having trouble "groking" the concepts and interactions of layered
regions and matches and all that..

Is there a way to see interactively where vim is stepping into and out of
these things besides the edit and try approach?

--
Dave

#15254 From: Kolbjørn Barmen <kolla@...>
Date: Fri Dec 8, 2000 3:36 am
Subject: Re: syntax highlightening on amiga
kolla@...
Send Email Send Email
 
On Wed, 6 Dec 2000, Bram Moolenaar wrote:

>
> Kolla wrote:
>
> > The amiga version of vim doesnt support real colour highlightening, which
> > is pretty daft considering that the amiga console is pretty much stright
> > forward ansi terminal compliant. If I use vim on my amiga with
> > highlightening, I just get a mingle of underscore and bold (confuses more
> > than it helps), while if I telnet/ssh to some other machine
> > (linux/*bsd/whatever) from the same shell and con:, and run vim there with
> > TERM=ansi, I get the full colour highlightening and all. Just so stupid
> > that it doesnt work locally.
>
> I'm afraid I still have the 4 color display (got a spare Amiga, anyone?)...

Tried UAE yet? :)

> Anyway, it should be a matter of setting the right termcap entries.  Try
> this:
>
>  :set t_Co=8

Doesnt bring colours, but thanks :)

> > Also, if there is interest for it, I have updated icons for vim, most amiga
> > users do not run 2bit diplays any more, most users prefer more vivid icons.
> > :)
>
> There are 8 color icons in the distribution (runtime/icons).

I mean 5bit (32 colours) icons that most of us amiga users use today :)


-- kolla

#15255 From: Jean Jordaan <Jean@...>
Date: Fri Dec 8, 2000 7:43 am
Subject: RE: Searching for next place where pattern does *not* match?
Jean@...
Send Email Send Email
 
Hi Benji

> I think you misunderstand what the [brackets] are doing.

Yes .. wishful thinking, on my part ..

> In vim 5.7 (or earlier) the only way is to do something horrendous

Well, it makes me feel a little better that I wasn't overlooking
something obvious.

> :let found_it = 0
> :.,$v/^apacs29_sink/if !found_it|let next=line('.')|let found_it=1|endif
> :if found_it | execute next | endif

Wow, rather sublime .. I love that feeling when I grok something like
this for the first time .. thanks!

jean
--
The only thing worse than raining cats and dogs is hailing taxis.

#15256 From: "Andrzej M. Ostruszka" <ostruszk@...>
Date: Fri Dec 8, 2000 10:20 am
Subject: Re: Searching for next place where pattern does *not* match?
ostruszk@...
Send Email Send Email
 
On Fri, Dec 08 (2000), Jean Jordaan wrote:
> > :let found_it = 0
> > :.,$v/^apacs29_sink/if !found_it|let next=line('.')|let found_it=1|endif
> > :if found_it | execute next | endif
>
> Wow, rather sublime .. I love that feeling when I grok something like
> this for the first time .. thanks!

It would have been nicer if one could write something like:

:.,$v/^apacs29_sink/break

My main point is that there is no :break (or similary named function)
that would cause breaking :g and :v. I hope I missed it in docs but I
don't think this is the case -- if so this is my suggestion :)).

						 Best regards
--
     ____   _  ___
    /  | \_/ |/ _ \  Andrzej Marek Ostruszka
   / _ |     | (_) | Instytut Fizyki, Uniwersytet Jagiellonski (Cracow)
  /_/ L|_|V|_|\___/ (PGP <-- finger ostruszk@...)

#15257 From: c928400@...
Date: Fri Dec 8, 2000 10:48 am
Subject: Re: Searching for next place where pattern does *not* match?
c928400@...
Send Email Send Email
 
Thus wrote Andrzej M. Ostruszka (ostruszk@...) on [001208]:
> It would have been nicer if one could write something like:

> :.,$v/^apacs29_sink/break

> My main point is that there is no :break (or similary named function)
> that would cause breaking :g and :v. I hope I missed it in docs but I
> don't think this is the case -- if so this is my suggestion :)).

That would probably only be included in the development releases (for
now, of course :-),

But then again, there is already

         :call search('^apacs29_sink', 0)

Peppe
--
                                       "Before you criticize someone, walk
Preben "Peppe" Guldberg  __/-\__       a mile in his shoes. That way, if
c928400@...    (o o)        he gets angry, he'll be a mile away
----------------------oOOo (_) oOOo--  - and barefoot."    --Sarah Jackson

#15258 From: Bram Moolenaar <Bram@...>
Date: Fri Dec 8, 2000 11:20 am
Subject: Re: syntax highlightening on amiga
Bram@...
Send Email Send Email
 
Kolla wrote:

> > I'm afraid I still have the 4 color display (got a spare Amiga, anyone?)...
>
> Tried UAE yet? :)

[For those who don't know UAE: That's a simulater to run Amiga programs on a
Unix system]

I tried it some time back, but it didn't work well for me.  Perhaps I should
give it another try...  I wonder if UAE on a 800 MHz Duron will compile Vim
faster than my 25 MHz 68030 machine?

> > There are 8 color icons in the distribution (runtime/icons).
>
> I mean 5bit (32 colours) icons that most of us amiga users use today :)

4-8-16-32 colors.  It's a pity there isn't a standard.  I'm afraid I don't
have the time to dive into this.  If you know a good way to add the 32 color
icons while still keeping it working for people like me that only have 4
colors, send me a patch please.

--
BEDEVERE: Stand by for attack!!
    [CUT TO enormous army forming up.  Trebuchets, rows of PIKEMEN, siege
    towers, pennants flying, shouts of "Stand by for attack!"  Traditional
    army build-up shots.  The shouts echo across the ranks of the army.
    We see various groups reacting, and stirring themselves in readiness.]
ARTHUR:   Who are they?
BEDEVERE: Oh, just some friends!
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

///  Bram Moolenaar     Bram@...     http://www.moolenaar.net  \\\
\\\  Vim: http://www.vim.org      ICCF Holland: http://iccf-holland.org  ///

#15259 From: Benji Fisher <fisherbb@...>
Date: Fri Dec 8, 2000 4:08 pm
Subject: Re: Searching for next place where pattern does *not* match?
fisherbb@...
Send Email Send Email
 
c928400@... wrote:
>
> Thus wrote Andrzej M. Ostruszka (ostruszk@...) on [001208]:
> > It would have been nicer if one could write something like:
>
> > :.,$v/^apacs29_sink/break
>
> > My main point is that there is no :break (or similary named function)
> > that would cause breaking :g and :v. I hope I missed it in docs but I
> > don't think this is the case -- if so this is my suggestion :)).
>
> That would probably only be included in the development releases (for
> now, of course :-),
>
> But then again, there is already
>
>         :call search('^apacs29_sink', 0)
>
> Peppe

      Yes, and (according to http://www.vim.org/docnew/version6.txt, look
for new-searchpat) vim 6.0 will also allow (if I have the syntax right)

/^\(apacs29_sink\)\@!

With vim 5.7, there is always the option of an explicit loop:

let curline = line(".") - 1
while curline < line("$")
   let curline = curline + 1
   if getline(curline) !~ '^apacs29_sink'
     echo "found it!"
     execute curline
     break
   endif
endwhile

(untested).

      Then again, one can always try cleverness:

.,$v/^apacs29_sink/call input('Enter <C-C>')

(Heh, heh!) 		 --Benji Fisher

#15260 From: "J. David Boyd" <dave@...>
Date: Fri Dec 8, 2000 5:39 pm
Subject: help with GREP and VIM
dave@...
Send Email Send Email
 
Hello,
 
I have found 2 or three different .vim files that perport to create a grep feature such as Xemacs has. (Shows found lines in a separate window, then mouse click goes to that line in the correct file).
 
However, I cannot get them to work.
 
Does anyone know of a grep package for VIM that positively works?  And can be installed without being a rocket scientist?
 
Thanks in advance.
 
Dave
Attachment: vcard [not shown]

#15261 From: Denis Perelyubskiy <denisp@...>
Date: Fri Dec 8, 2000 7:34 pm
Subject: Re: help with GREP and VIM
denisp@...
Send Email Send Email
 
>Does anyone know of a grep package for VIM
    >that positively works?  And can be installed
    >without being a rocket scientist?

looks like you're using windows.
when you say 'package', all you really want is
grep.exe, right? cause if that's the case,
check out cygwin. This could be an overkill for
you to install completely, as it is a 200M
distro of utils ported from unix to windows.
i think you can have an option to only install
grep if you so wish + their .dll
(sourceware.cygnus.com)

another option, which is probably more
applicable in your case, is to get a
port of grep from somewhere on the web. one
such place is
http://www.interlog.com/~tcharron/grep.html

this grep even does recursive searches.

hth,

denis

#15262 From: "Earthlink" <dave@...>
Date: Fri Dec 8, 2000 7:48 pm
Subject: Re: help with GREP and VIM
dave@...
Send Email Send Email
 
Oops, excuse me for not being clear enough.  I am using Cygwin, and have
grep.exe.  No problem there.  What I am looking for is a vim script that
makes use of grep to show the grepped string in another window, and allow
the easy movement to the appropriate line and file.

There are several scripts on the net that claim to do this, but I have not
been able to make any of them work, so what I am looking for is
directions/help on how to make them work.

Thanks for the help,

Dave

----- Original Message -----
From: "Denis Perelyubskiy" <denisp@...>
To: "J. David Boyd" <dave@...>
Cc: <vim@...>
Sent: Friday, December 08, 2000 2:34 PM
Subject: Re: help with GREP and VIM


>    >Does anyone know of a grep package for VIM
>    >that positively works?  And can be installed
>    >without being a rocket scientist?
>
> looks like you're using windows.
> when you say 'package', all you really want is
> grep.exe, right? cause if that's the case,
> check out cygwin. This could be an overkill for
> you to install completely, as it is a 200M
> distro of utils ported from unix to windows.
> i think you can have an option to only install
> grep if you so wish + their .dll
> (sourceware.cygnus.com)
>
> another option, which is probably more
> applicable in your case, is to get a
> port of grep from somewhere on the web. one
> such place is
> http://www.interlog.com/~tcharron/grep.html
>
> this grep even does recursive searches.
>
> hth,
>
> denis
>
>

#15263 From: Devin Weaver <ktohg@...>
Date: Fri Dec 8, 2000 7:55 pm
Subject: Re: help with GREP and VIM
ktohg@...
Send Email Send Email
 
On Fri, Dec 08, 2000 at 02:48:06PM -0500, Earthlink wrote:
> What I am looking for is a vim script that
> makes use of grep to show the grepped string in another window, and allow
> the easy movement to the appropriate line and file.

Is :cw what your looking for? (I think that is VIM 6.x though).

--
If VIM were a woman, I'd marry her.  Slim, organized, helpful and beautiful;
what's not to like?

#15264 From: "J. David Boyd" <dave@...>
Date: Fri Dec 8, 2000 8:22 pm
Subject: Re: help with GREP and VIM
dave@...
Send Email Send Email
 
Close, and it sure put me on the right direction.  It just so happens I am
using VIM 6.x, and after reading your message I typed ':help grep', which
told me all I need to know.  Thank you for the tip!

Dave

----- Original Message -----
From: "Devin Weaver" <ktohg@...>
To: <vim@...>
Sent: Friday, December 08, 2000 2:55 PM
Subject: Re: help with GREP and VIM


> On Fri, Dec 08, 2000 at 02:48:06PM -0500, Earthlink wrote:
> > What I am looking for is a vim script that
> > makes use of grep to show the grepped string in another window, and
allow
> > the easy movement to the appropriate line and file.
>
> Is :cw what your looking for? (I think that is VIM 6.x though).
>
> --
> If VIM were a woman, I'd marry her.  Slim, organized, helpful and
beautiful;
> what's not to like?
>

#15265 From: Peter Bismuti <bismuti@...>
Date: Fri Dec 8, 2000 9:25 pm
Subject: example of jsp syntax gone awry
bismuti@...
Send Email Send Email
 
I've pasted two files, the jsp file and the *.html file showing what I am
seeing, hope this
is helpful.

....................CUT HERE...........................................
<HTML>
<HEAD>
<TITLE>alert_type.jsp.html</TITLE>
</HEAD>
<BODY BGcolor=#FFFFFF TEXT=#000000>
<PRE>
<FONT color=#0000ff><!</FONT><FONT color=#0000ff>--</FONT>
<FONT color=#0000ff>$Header:
/disk01/cvsrepos_v3/p3platform/p3c/admininterface/jsp/alert_type.jsp,v 1.3
2000/12/08 18:11:44 pbismuti Exp $</FONT>
<FONT color=#0000ff>$Author: pbismuti $ </FONT>
<FONT color=#0000ff>$Date: 2000/12/08 18:11:44 $</FONT>
<FONT color=#0000ff>$Revision: 1.3 $</FONT>
<FONT color=#0000ff>--</FONT><FONT color=#0000ff>></FONT>
<FONT color=#0000ff><!</FONT><FONT color=#0000ff>-- alert_type.jsp</FONT>
<FONT color=#0000ff>    </FONT>
<FONT color=#0000ff>        This page collects information necessary to create a
new Alert Type.  </FONT>
<FONT color=#0000ff>    It is arrived at from 'edit_alerts.jsp' by clicking on
the "Add New Alert"</FONT>
<FONT color=#0000ff>    button at the bottom of the page.  The user fills in the
new alert "Id" and "Name"</FONT>
<FONT color=#0000ff>    and then submits the form to the servlet 
"InsertAlertTypeServlet".</FONT>
<FONT color=#0000ff>--</FONT><FONT color=#0000ff>></FONT>
<FONT color=#008b8b><%</FONT>
     <FONT color=#0000ff>/* </FONT>
<FONT color=#0000ff>        construct returnAddress - this constructs and stores
as a</FONT>
<FONT color=#0000ff>        session  variable the current URL by looping through
the </FONT>
<FONT color=#0000ff>        parameters and building string that can be used as a
request</FONT>
<FONT color=#0000ff>        using the GET method. This is used to create a
</FONT><FONT color=#ff00ff>"back"</FONT><FONT color=#0000ff> link
</FONT>
<FONT color=#0000ff>        in the 'admin_error.jsp' page. The string is stored
in the variable </FONT><FONT
color=#ff00ff>"return_address"</FONT><FONT color=#0000ff>.</FONT>
<FONT color=#0000ff>    */</FONT>
     <FONT color=#0000ff>// determine returnAddress</FONT>
     String  requestURI  = request.getRequestURI();
     String  queryString = <FONT color=#ff00ff>""</FONT>;

     <FONT color=#0000ff>// construct query string</FONT>
     Enumeration params7 = request.getParameterNames();
     String paramName7 = <FONT color=#ff00ff>null</FONT>;
     String[] paramValues7 = <FONT color=#ff00ff>null</FONT>;

     <B><FONT color=#a52a2a>while</FONT></B> (params7.hasMoreElements()) {
         paramName7 = (String) params7.nextElement();
         paramValues7 = request.getParameterValues(paramName7);
         <B><FONT color=#a52a2a>for</FONT></B> (<B><FONT
color=#2e8b57>int</FONT></B> i=<FONT color=#ff00ff>0</FONT>;
i<paramValues7.length; i++){
             queryString += paramName7+<FONT
color=#ff00ff>"="</FONT>+paramValues7[i].toString()+<FONT
color=#ff00ff>"&"</FONT>;
         }
     }
     <B><FONT color=#a52a2a>if</FONT></B> (queryString.length() > <FONT
color=#ff00ff>0</FONT>){
         queryString = queryString.substring(<FONT
color=#ff00ff>0</FONT>,queryString.length()-<FONT color=#ff00ff>1</FONT>);
     }

     <FONT color=#0000ff>// now construct return address</FONT>
     String returnAddress = <FONT color=#ff00ff>null</FONT>;
     returnAddress = requestURI + <FONT color=#ff00ff>"?"</FONT> +
queryString;

     <FONT color=#0000ff>// now set a session attribute</FONT>
     session.removeAttribute(<FONT
color=#ff00ff>"returnAddress"</FONT>);
     session.setAttribute(<FONT
color=#ff00ff>"returnAddress"</FONT>,returnAddress);
<FONT color=#008b8b>%></FONT>

<FONT color=#008b8b><</FONT><B><FONT color=#a52a2a>HTML</FONT></B><FONT
color=#008b8b>></FONT>
<FONT color=#008b8b><</FONT><B><FONT color=#a52a2a>HEAD</FONT></B><FONT
color=#008b8b>></FONT>
<FONT color=#008b8b><</FONT><B><FONT color=#a52a2a>TITLE</FONT></B><FONT
color=#008b8b>></FONT><B><FONT color=#ff00ff>Alert Type</FONT></B><FONT
color=#008b8b></</FONT><B><FONT color=#a52a2a>TITLE</FONT></B><FONT
color=#008b8b>></FONT>
<FONT color=#008b8b><</FONT><B><FONT color=#a52a2a>SCRIPT</FONT></B><FONT
color=#008b8b>></FONT>
<FONT
color=#a020f0>//................................................................\
........</FONT>
<FONT color=#a020f0>function Cancel(){</FONT>
<FONT color=#a020f0>    location = "/edit_alerts.jsp";</FONT>
<FONT color=#a020f0>}</FONT>
<FONT
color=#a020f0>//................................................................\
........</FONT>
<FONT color=#a020f0>// onSubmit() - do some error checking before the form is
submitted. </FONT>
<FONT
color=#a020f0>//................................................................\
........</FONT>
<FONT color=#a020f0>  function onSubmit(form){</FONT>
<FONT color=#a020f0>    var fc = isNotEmpty("Alert
ID",form.alertId.value);</FONT>
<FONT color=#a020f0>    var lc =
isNotEmpty("Name",form.name.value);</FONT>
<FONT color=#a020f0>    var ai =
isNotInside(form.alertId.value,alertIdArray,"alertId");</FONT>
<FONT color=#a020f0>    var av =
isSafeString(form.alertId.value,"ID");</FONT>
<FONT color=#a020f0>    var ann =
isSafeString(form.name.value,"Name");</FONT>
<FONT color=#a020f0>    var an =
isNotInside(form.name.value,alertNameArray,"alertName");</FONT>
<FONT color=#a020f0>    return
(fc&&lc&&ai&&av&&ann</FONT><FONT
color=#6a5acd>&&an);</FONT>
<FONT color=#a020f0>  }</FONT>
<FONT
color=#a020f0>//................................................................\
........</FONT>
<FONT color=#a020f0>  function isNotEmpty(name,value){</FONT>
<FONT color=#a020f0>    if (value.length ==0){</FONT>
<FONT color=#a020f0>        alert("ERROR: "+name+" must be
entered.");</FONT>
<FONT color=#a020f0>        return false;</FONT>
<FONT color=#a020f0>    }else{</FONT>
<FONT color=#a020f0>        return true;</FONT>
<FONT color=#a020f0>    }</FONT>
<FONT color=#a020f0>  }</FONT>
<FONT
color=#a020f0>//................................................................\
........</FONT>
<FONT color=#a020f0>  function
isNotInside(alertData,alertDataArray,type){</FONT>
<FONT color=#a020f0>     for (var i=0; i</FONT><FONT
color=#008b8b><</FONT>alertDataArray<FONT color=#008b8b>.length; i++){</FONT>
<FONT color=#008b8b>        if (strip(alertData) =</FONT>=<FONT color=#008b8b>
strip(alertDataArray[i])){</FONT>
<FONT color=#008b8b>             alert(</FONT><FONT color=#ff00ff>"ERROR:
the "</FONT><FONT color=#008b8b> +</FONT><B><FONT
color=#2e8b57>type</FONT></B><FONT color=#008b8b>+ </FONT><FONT
color=#ff00ff>" '"</FONT><FONT color=#008b8b>+alertData+</FONT><FONT
color=#ff00ff>"' already exists, please choose another."</FONT><FONT
color=#008b8b>);</FONT>
<FONT color=#008b8b>             return false;</FONT>
<FONT color=#008b8b>        }</FONT>
<FONT color=#008b8b>     }</FONT>
<FONT color=#008b8b>     return true;</FONT>
<FONT color=#008b8b>  }</FONT>
<FONT
color=#008b8b>//................................................................\
........</FONT>
<FONT color=#008b8b>function strip(string){</FONT>
<FONT color=#008b8b>    string =</FONT>
string.replace(/\s+$/,"");<FONT color=#008b8b>  // strip off leading
and trailing</FONT>
<FONT color=#008b8b>    string =</FONT> string.replace(/^\s+/,"");
<FONT color=#008b8b>    return string;</FONT>
<FONT color=#008b8b>}</FONT>
<FONT
color=#008b8b>//................................................................\
........</FONT>
<FONT color=#008b8b>function isSafeString(s,</FONT><B><FONT
color=#2e8b57>name</FONT></B><FONT color=#008b8b>) {</FONT>
<FONT color=#008b8b>  illegalChar=</FONT><FONT
color=#ff00ff>"\"'\\</FONT><FONT color=#6a5acd>&#+";</FONT>
<FONT color=#ff00ff>  goodString = true;</FONT>
<FONT color=#ff00ff>  for (var i=0;i<6;i++) {</FONT>
<FONT color=#ff00ff>    if (s.indexOf(illegalChar.substring(i,i+1))!=-1){</FONT>
<FONT color=#ff00ff>      alert("ERROR: invalid value for " +
name+".\nIllegal character detected:
'"+illegalChar.substring(i,i+1)+"'.");</FONT>
<FONT color=#ff00ff>      goodString = false;</FONT>
<FONT color=#ff00ff>    }</FONT>
<FONT color=#ff00ff>  }</FONT>
<FONT color=#ff00ff>  return goodString;</FONT>
<FONT color=#ff00ff>}</FONT>

<FONT color=#ff00ff>function cleanApostrophe(s){</FONT>
<FONT color=#ff00ff>  var s2 = "";</FONT>
<FONT color=#ff00ff>  for(var i=0;i<s.length;i++){</FONT>
<FONT color=#ff00ff>    var c = s.charAt(i);</FONT>
<FONT color=#ff00ff>    if(c=="'")</FONT>
<FONT color=#ff00ff>      s2 += "</FONT><FONT color=#008b8b>\</FONT><FONT
color=#ff00ff>'";</FONT>
<FONT color=#ff00ff>    else</FONT>
<FONT color=#ff00ff>      s2 += c;</FONT>
<FONT color=#ff00ff>  }</FONT>
<FONT color=#ff00ff>  return s2;</FONT>
<FONT color=#ff00ff>}</FONT>

<FONT color=#ff00ff></SCRIPT></FONT>
<FONT color=#ff00ff><BODY BGCOLOR=#FFFFFF ALINK=#0000FF
VLINK=#0000FF></FONT>
<FONT color=#ff00ff><%@</FONT>
<FONT color=#ff00ff>  page import="</FONT>
<FONT color=#ff00ff>    p3c.admininterface.ejb.TemplateManager.*,</FONT>
<FONT color=#ff00ff>    p3c.admininterface.ejb.Help.*,</FONT>
<FONT color=#ff00ff>    p3c.admininterface.ejb.*,</FONT>
<FONT color=#ff00ff>    p3c.admininterface.*,</FONT>
<FONT color=#ff00ff>    java.text.*,</FONT>
<FONT color=#ff00ff>  "</FONT>
<FONT color=#ff00ff>%></FONT>
<FONT color=#ff00ff><%@ include file="/includes/validate_user.jsp"
%></FONT>
<FONT color=#ff00ff><%@ include file="/includes/admin_header.jsp"
%></FONT>

<FONT color=#ff00ff><%</FONT>
<FONT color=#ff00ff>        // retrieve the request input parameters</FONT>
<FONT color=#ff00ff>        // then define an array in javascript that can be
used</FONT>
<FONT color=#ff00ff>        // to check against adding a new alert with an
already</FONT>
<FONT color=#ff00ff>        // existing alertId</FONT>

<FONT color=#ff00ff>        out.println("<SCRIPT>");</FONT>

<FONT color=#ff00ff>        java.util.Enumeration params =
request.getParameterNames();</FONT>
<FONT color=#ff00ff>        String paramName = null;</FONT>
<FONT color=#ff00ff>        String[] paramValues = null;</FONT>

<FONT color=#ff00ff>        // alertIdArray</FONT>
<FONT color=#ff00ff>        paramName = "alertIdArray";</FONT>
<FONT color=#ff00ff>        paramValues = null;</FONT>
<FONT color=#ff00ff>        out.println("   alertIdArray = [");</FONT>
<FONT color=#ff00ff>        paramValues =
request.getParameterValues(paramName);</FONT>
<FONT color=#ff00ff>        for (int i = 0; paramValues != null && i
< paramValues.length -1; i++) {</FONT>
<FONT color=#ff00ff>           
out.println("\""+paramValues[i].toString() +
"\",");</FONT>
<FONT color=#ff00ff>        }</FONT>
<FONT color=#ff00ff>        if(paramValues != null)</FONT>
<FONT color=#ff00ff>           
out.println("\""+paramValues[paramValues.length-1].toString() +
"\"");</FONT>
<FONT color=#ff00ff>        out.println("];\n");</FONT>

<FONT color=#ff00ff>        // alertNameArray</FONT>
<FONT color=#ff00ff>        paramName = "alertNameArray";</FONT>
<FONT color=#ff00ff>        paramValues = null;</FONT>
<FONT color=#ff00ff>        out.println("   alertNameArray =
[");</FONT>
<FONT color=#ff00ff>        paramValues =
request.getParameterValues(paramName);</FONT>
<FONT color=#ff00ff>        for (int i = 0; paramValues != null && i
< paramValues.length -1; i++) {</FONT>
<FONT color=#ff00ff>           
out.println("\""+paramValues[i].toString() +
"\",");</FONT>
<FONT color=#ff00ff>        }</FONT>
<FONT color=#ff00ff>        if(paramValues != null)</FONT>
<FONT color=#ff00ff>           
out.println("\""+paramValues[paramValues.length-1].toString() +
"\"");</FONT>
<FONT color=#ff00ff>        out.println("];\n");</FONT>

<FONT color=#ff00ff>        out.println("</SCRIPT>");</FONT>

<FONT color=#ff00ff>        // just in case</FONT>
<FONT color=#ff00ff>        int clientId;</FONT>
<FONT color=#ff00ff>        clientId = client.getSysid();</FONT>

<FONT color=#ff00ff>%></FONT>

<FONT color=#ff00ff><!--</FONT>
<FONT color=#ff00ff>      public void insertAlertType(String alertId, String
alertName,int</FONT>
<FONT color=#ff00ff>        cardinality,int clientId)</FONT>
<FONT color=#ff00ff>      throws RemoteException, UniqueException,
NotFoundException, Exception;</FONT>
<FONT color=#ff00ff>--></FONT>
<FONT color=#ff00ff><FORM ACTION="InsertAlertTypeServlet"
METHOD=POST onSubmit="return onSubmit(this)"></FONT>
<FONT color=#ff00ff><TABLE BORDER="0" CELLSPACING="0"
CELLPADDING="0"></FONT>
<FONT color=#ff00ff>    <TR></FONT>
<FONT color=#ff00ff>        <TD ALIGN="LEFT"></FONT>
<FONT color=#ff00ff><!-- Tittle --></FONT>
<FONT color=#ff00ff>            <CENTER></FONT>
<FONT color=#ff00ff>            <TABLE border="0"
cellspacing="2" cellpadding="2"
<%=bgcolorWhite%>></FONT>
<FONT color=#ff00ff>                <TR><TH
ALIGN="CENTER"><%=fontTitle%>Alert
Type</FONT></TH></TR></FONT>
<FONT color=#ff00ff>            </TABLE><BR></FONT>
<FONT color=#ff00ff>            </CENTER></FONT>
<FONT color=#ff00ff><!-- Main Table --></FONT>
<FONT color=#ff00ff>            <TABLE BORDER="0"
CELLSPACING="2" CELLPADDING="2"></FONT>
<FONT color=#ff00ff>                <TR ALIGN="CENTER",
VALIGN="MIDDLE"></FONT>
<FONT color=#ff00ff>                    <TH ALIGN="LEFT"
<%=bgcolorTh%>><%=fontTh%></FONT>
<FONT color=#ff00ff>                        ID</FONT>
<FONT color=#ff00ff>                    </FONT></TH></FONT>
<FONT color=#ff00ff>                    <TD ALIGN=LEFT
<%=bgcolorTd%>><%=fontTd%></FONT>
<FONT color=#ff00ff>                      <INPUT TYPE="TEXT",
NAME="alertId", ALIGN="CENTER", MAXLENGTH=50></FONT>
<FONT color=#ff00ff>                    </FONT></TD></FONT>
<FONT color=#ff00ff>                </TR></FONT>
<FONT color=#ff00ff>                <TR ALIGN="CENTER",
VALIGN="MIDDLE"></FONT>
<FONT color=#ff00ff>                    <TH ALIGN="LEFT"
<%=bgcolorTh%>><%=fontTh%></FONT>
<FONT color=#ff00ff>                        Name</FONT>
<FONT color=#ff00ff>                    </FONT></TH></FONT>
<FONT color=#ff00ff>                    <TD ALIGN="LEFT"
<%=bgcolorTd%>><%=fontTd%></FONT>
<FONT color=#ff00ff>                      <INPUT TYPE="TEXT",
NAME="name", ALIGN="CENTER", MAXLENGTH=250></FONT>
<FONT color=#ff00ff>                    </FONT></TD></FONT>
<FONT color=#ff00ff>                </TR></FONT>
<FONT color=#ff00ff><!--      CARDINALITY AND PRIORITY, REMOVED FOR NOW, MAY
NED LATER</FONT>
<FONT color=#ff00ff>                <TR ALIGN="center",
VALIGN="middle"></FONT>
<FONT color=#ff00ff>                    <TH ALIGN="LEFT"
<%=bgcolorTh%> ><B><FONT face="Verdana, Geneva,
Arial" size="-2" color="#000000"></FONT>
<FONT color=#ff00ff>                       
Cardinality</FONT></TH></FONT>
<FONT color=#ff00ff>                    <TD ALIGN=LEFT
<%=bgcolorTd%>><%=fontTd%></FONT>
<FONT color=#ff00ff>                        &nbsp One-to-One</FONT>
<FONT color=#ff00ff>                        <INPUT TYPE="radio",
NAME="cardinality", VALUE="1", ALIGN="center",
CHECKED></FONT>
<FONT color=#ff00ff>                        &nbsp Broadcast</FONT>
<FONT color=#ff00ff>                        <INPUT TYPE="radio",
NAME="cardinality", VALUE="2",
ALIGN="center"></FONT>
<FONT color=#ff00ff>                    </TD></FONT>
<FONT color=#ff00ff>                </TR></FONT>
<FONT color=#ff00ff>                <TR ALIGN="center",
VALIGN="middle"></FONT>
<FONT color=#ff00ff>                    <TH ALIGN="LEFT" 
<%=bgcolorTh%>><B><FONT face="Verdana, Geneva,
Arial" size="-2" color="#000000"></FONT>
<FONT color=#ff00ff>                        Priority
Code</FONT></TH></FONT>
<FONT color=#ff00ff>                    <TD ALIGN=LEFT
<%=bgcolorTd%>><%=fontTd%></FONT>
<FONT color=#ff00ff>                        &nbsp Nice</FONT>
<FONT color=#ff00ff>                        <INPUT TYPE="radio",
NAME="priorityCode", VALUE="nice",
ALIGN="center"></FONT>
<FONT color=#ff00ff>                        &nbsp Normal</FONT>
<FONT color=#ff00ff>                        <INPUT TYPE="radio",
NAME="priorityCode", VALUE="normal",
ALIGN="center", CHECKED></FONT>
<FONT color=#ff00ff>                        &nbsp Urgent</FONT>
<FONT color=#ff00ff>                        <INPUT TYPE="radio",
NAME="priorityCode", VALUE="urgent",
ALIGN="center"></FONT>
<FONT color=#ff00ff>                    </TD></FONT>
<FONT color=#ff00ff>                </TR></FONT>
<FONT color=#ff00ff>--></FONT>
<FONT color=#ff00ff>                <INPUT TYPE="HIDDEN",
NAME="cardinality", VALUE="1"></FONT>
<FONT color=#ff00ff>                <INPUT TYPE="HIDDEN",
NAME="priorityCode", VALUE="urgent"></FONT>
<FONT color=#ff00ff>            </TABLE></FONT>
<FONT color=#ff00ff>            </CENTER></FONT>
<FONT color=#ff00ff><!-- buttons--></FONT>
<FONT color=#ff00ff>            <CENTER></FONT>
<FONT color=#ff00ff>            <TABLE BORDER="0"
CELLSPACING="2" CELLPADDING="2"
<%=bgcolorWhite%>></FONT>
<FONT color=#ff00ff>                <TR <%=bgcolorWhite%>></FONT>
<FONT color=#ff00ff>                    <TD ALIGN="LEFT"
><%=fontTd%>&nbsp</FONT></TD></FONT>
<FONT color=#ff00ff>                    <TH
ALIGN="right"><%=fontTh%><INPUT TYPE="SUBMIT"
NAME="continueSubmit" VALUE="Add Alert
Type"></FONT></TH></FONT>
<FONT color=#ff00ff>                    <TH
ALIGN="right"><%=fontTh%><INPUT TYPE="BUTTON"
NAME="cancelButton"   VALUE="Cancel"  
onClick="Cancel()"></FONT></TH></FONT>
<FONT color=#ff00ff>                </TR></FONT>
<FONT color=#ff00ff>            </TABLE></FONT>
<FONT color=#ff00ff>            </CENTER></FONT>
<FONT color=#ff00ff>            <!-- End Inner Table--></FONT>

<FONT color=#ff00ff>        <!--forwardAddress is the url that the servlet
returns to -->   </FONT>
<FONT color=#ff00ff>        <INPUT TYPE="HIDDEN",
NAME="forwardAddress", VALUE="<%=
request.getParameter("forwardAddress") %>"></FONT>
<FONT color=#ff00ff>        <!-- why is this here?  May be
unnecessary?--></FONT>
<FONT color=#ff00ff>        <INPUT TYPE="HIDDEN",
NAME="clientId", VALUE="<%=clientId%>"></FONT>
<FONT color=#ff00ff>        </TD></FONT>
<FONT color=#ff00ff>    </TR></FONT>
<FONT color=#ff00ff></TABLE></FONT>
<FONT color=#ff00ff></FORM></FONT>

<FONT color=#ff00ff><BR CLEAR=LEFT></FONT>
<FONT color=#ff00ff><BR CLEAR=LEFT></FONT>
<FONT color=#ff00ff><BR CLEAR=LEFT></FONT>

<FONT color=#ff00ff><%@ include file="/includes/admin_footer.jsp"
%></FONT>


<FONT color=#ff00ff></BODY></FONT>
<FONT color=#ff00ff></HTML></FONT>

</PRE>
</BODY>
</HTML>

....................CUT HERE...........................................

<!--
$Header: /disk01/cvsrepos_v3/p3platform/p3c/admininterface/jsp/alert_type.jsp,v
1.3 2000/12/08 18:11:44 pbismuti Exp $
$Author: pbismuti $
$Date: 2000/12/08 18:11:44 $
$Revision: 1.3 $
-->
<!-- alert_type.jsp

		 This page collects information necessary to create a new Alert Type.
	 It is arrived at from 'edit_alerts.jsp' by clicking on the "Add New Alert"
	 button at the bottom of the page.  The user fills in the new alert "Id" and
"Name"
	 and then submits the form to the servlet  "InsertAlertTypeServlet".
-->
<%
	 /*
		 construct returnAddress - this constructs and stores as a
		 session  variable the current URL by looping through the
		 parameters and building string that can be used as a request
		 using the GET method. This is used to create a "back" link
		 in the 'admin_error.jsp' page. The string is stored in the variable
"return_address".
	 */
	 // determine returnAddress
	 String  requestURI  = request.getRequestURI();
	 String  queryString = "";

	 // construct query string
	 Enumeration params7 = request.getParameterNames();
	 String paramName7 = null;
	 String[] paramValues7 = null;

	 while (params7.hasMoreElements()) {
		 paramName7 = (String) params7.nextElement();
		 paramValues7 = request.getParameterValues(paramName7);
		 for (int i=0; i<paramValues7.length; i++){
			 queryString += paramName7+"="+paramValues7[i].toString()+"&";
		 }
	 }
	 if (queryString.length() > 0){
		 queryString = queryString.substring(0,queryString.length()-1);
	 }

	 // now construct return address
	 String returnAddress = null;
	 returnAddress = requestURI + "?" + queryString;

	 // now set a session attribute
	 session.removeAttribute("returnAddress");
	 session.setAttribute("returnAddress",returnAddress);
%>

<HTML>
<HEAD>
<TITLE>Alert Type</TITLE>
<SCRIPT>
//........................................................................
function Cancel(){
	 location = "/edit_alerts.jsp";
}
//........................................................................
// onSubmit() - do some error checking before the form is submitted.
//........................................................................
   function onSubmit(form){
     var fc = isNotEmpty("Alert ID",form.alertId.value);
     var lc = isNotEmpty("Name",form.name.value);
     var ai = isNotInside(form.alertId.value,alertIdArray,"alertId");
     var av = isSafeString(form.alertId.value,"ID");
     var ann = isSafeString(form.name.value,"Name");
     var an = isNotInside(form.name.value,alertNameArray,"alertName");
     return (fc&&lc&&ai&&av&&ann&&an);
   }
//........................................................................
   function isNotEmpty(name,value){
     if (value.length ==0){
         alert("ERROR: "+name+" must be entered.");
         return false;
     }else{
         return true;
     }
   }
//........................................................................
   function isNotInside(alertData,alertDataArray,type){
      for (var i=0; i<alertDataArray.length; i++){
         if (strip(alertData) == strip(alertDataArray[i])){
              alert("ERROR: the " +type+ " '"+alertData+"' already exists, please
choose another.");
              return false;
         }
      }
      return true;
   }
//........................................................................
function strip(string){
	 string = string.replace(/\s+$/,"");  // strip off leading and trailing
	 string = string.replace(/^\s+/,"");
     return string;
}
//........................................................................
function isSafeString(s,name) {
   illegalChar="\"'\\&#+";
   goodString = true;
   for (var i=0;i<6;i++) {
     if (s.indexOf(illegalChar.substring(i,i+1))!=-1){
       alert("ERROR: invalid value for " + name+".\nIllegal character detected:
'"+illegalChar.substring(i,i+1)+"'.");
       goodString = false;
     }
   }
   return goodString;
}

function cleanApostrophe(s){
   var s2 = "";
   for(var i=0;i<s.length;i++){
     var c = s.charAt(i);
	 if(c=="'")
	   s2 += "\'";
	 else
	   s2 += c;
   }
   return s2;
}

</SCRIPT>
<BODY BGCOLOR=#FFFFFF ALINK=#0000FF VLINK=#0000FF>
<%@
   page import="
     p3c.admininterface.ejb.TemplateManager.*,
     p3c.admininterface.ejb.Help.*,
     p3c.admininterface.ejb.*,
     p3c.admininterface.*,
     java.text.*,
   "
%>
<%@ include file="/includes/validate_user.jsp" %>
<%@ include file="/includes/admin_header.jsp" %>

<%
		 // retrieve the request input parameters
         // then define an array in javascript that can be used
         // to check against adding a new alert with an already
         // existing alertId

		 out.println("<SCRIPT>");

		 java.util.Enumeration params = request.getParameterNames();
		 String paramName = null;
		 String[] paramValues = null;

		 // alertIdArray
		 paramName = "alertIdArray";
		 paramValues = null;
		 out.println("   alertIdArray = [");
		 paramValues = request.getParameterValues(paramName);
		 for (int i = 0; paramValues != null && i < paramValues.length -1; i++) {
			 out.println("\""+paramValues[i].toString() + "\",");
		 }
	     if(paramValues != null)
			 out.println("\""+paramValues[paramValues.length-1].toString() + "\"");
		 out.println("];\n");

		 // alertNameArray
		 paramName = "alertNameArray";
		 paramValues = null;
		 out.println("   alertNameArray = [");
		 paramValues = request.getParameterValues(paramName);
		 for (int i = 0; paramValues != null && i < paramValues.length -1; i++) {
			 out.println("\""+paramValues[i].toString() + "\",");
		 }
	     if(paramValues != null)
			 out.println("\""+paramValues[paramValues.length-1].toString() + "\"");
		 out.println("];\n");

		 out.println("</SCRIPT>");

		 // just in case
		 int clientId;
		 clientId = client.getSysid();

%>

<!--
       public void insertAlertType(String alertId, String alertName,int
         cardinality,int clientId)
       throws RemoteException, UniqueException, NotFoundException, Exception;
-->
<FORM ACTION="InsertAlertTypeServlet" METHOD=POST onSubmit="return
onSubmit(this)">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
	 <TR>
		 <TD ALIGN="LEFT">
<!-- Tittle -->
			 <CENTER>
			 <TABLE border="0" cellspacing="2" cellpadding="2" <%=bgcolorWhite%>>
				 <TR><TH ALIGN="CENTER"><%=fontTitle%>Alert Type</FONT></TH></TR>
			 </TABLE><BR>
			 </CENTER>
<!-- Main Table -->
			 <TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2">
				 <TR ALIGN="CENTER", VALIGN="MIDDLE">
					 <TH ALIGN="LEFT" <%=bgcolorTh%>><%=fontTh%>
						 ID
					 </FONT></TH>
					 <TD ALIGN=LEFT <%=bgcolorTd%>><%=fontTd%>
					   <INPUT TYPE="TEXT", NAME="alertId", ALIGN="CENTER", MAXLENGTH=50>
					 </FONT></TD>
				 </TR>
				 <TR ALIGN="CENTER", VALIGN="MIDDLE">
					 <TH ALIGN="LEFT" <%=bgcolorTh%>><%=fontTh%>
						 Name
					 </FONT></TH>
					 <TD ALIGN="LEFT" <%=bgcolorTd%>><%=fontTd%>
					   <INPUT TYPE="TEXT", NAME="name", ALIGN="CENTER", MAXLENGTH=250>
					 </FONT></TD>
				 </TR>
<!--      CARDINALITY AND PRIORITY, REMOVED FOR NOW, MAY NED LATER
				 <TR ALIGN="center", VALIGN="middle">
					 <TH ALIGN="LEFT" <%=bgcolorTh%> ><B><FONT face="Verdana, Geneva, Arial"
size="-2" color="#000000">
						 Cardinality</FONT></TH>
					 <TD ALIGN=LEFT <%=bgcolorTd%>><%=fontTd%>
						   One-to-One
						 <INPUT TYPE="radio", NAME="cardinality", VALUE="1", ALIGN="center",
CHECKED>
						   Broadcast
						 <INPUT TYPE="radio", NAME="cardinality", VALUE="2", ALIGN="center">
					 </TD>
				 </TR>
				 <TR ALIGN="center", VALIGN="middle">
					 <TH ALIGN="LEFT"  <%=bgcolorTh%>><B><FONT face="Verdana, Geneva, Arial"
size="-2" color="#000000">
						 Priority Code</FONT></TH>
					 <TD ALIGN=LEFT <%=bgcolorTd%>><%=fontTd%>
						   Nice
						 <INPUT TYPE="radio", NAME="priorityCode", VALUE="nice", ALIGN="center">
						   Normal
						 <INPUT TYPE="radio", NAME="priorityCode", VALUE="normal", ALIGN="center",
CHECKED>
						   Urgent
					     <INPUT TYPE="radio", NAME="priorityCode", VALUE="urgent",
ALIGN="center">
					 </TD>
				 </TR>
-->
				 <INPUT TYPE="HIDDEN", NAME="cardinality", VALUE="1">
				 <INPUT TYPE="HIDDEN", NAME="priorityCode", VALUE="urgent">
			 </TABLE>
			 </CENTER>
<!-- buttons-->
			 <CENTER>
			 <TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2" <%=bgcolorWhite%>>
				 <TR <%=bgcolorWhite%>>
					 <TD ALIGN="LEFT" ><%=fontTd%> </FONT></TD>
					 <TH ALIGN="right"><%=fontTh%><INPUT TYPE="SUBMIT" NAME="continueSubmit"
VALUE="Add Alert Type"></FONT></TH>
					 <TH ALIGN="right"><%=fontTh%><INPUT TYPE="BUTTON" NAME="cancelButton"  
VALUE="Cancel"   onClick="Cancel()"></FONT></TH>
				 </TR>
			 </TABLE>
			 </CENTER>
			 <!-- End Inner Table-->

		 <!--forwardAddress is the url that the servlet returns to -->
         <INPUT TYPE="HIDDEN", NAME="forwardAddress", VALUE="<%=
request.getParameter("forwardAddress") %>">
		 <!-- why is this here?  May be unnecessary?-->
         <INPUT TYPE="HIDDEN", NAME="clientId", VALUE="<%=clientId%>">
		 </TD>
	 </TR>
</TABLE>
</FORM>

<BR CLEAR=LEFT>
<BR CLEAR=LEFT>
<BR CLEAR=LEFT>

<%@ include file="/includes/admin_footer.jsp" %>


</BODY>
</HTML>



....................CUT HERE...........................................

#15266 From: Rahul Joshi <rjvml@...>
Date: Sat Dec 9, 2000 2:04 am
Subject: Word completion question
rjvml@...
Send Email Send Email
 
Hi,

I use word completion extensively but I am
unable to go back using a single keystroke
if I don't want the word completed by vim.

e.g.

I type

comple^p  =>  completed^p  =>  completion

If I don't want both these completions,
but I want to type "complement" then I am forced
to type multiple backspaces till I go to comple.

I would like to go to whatever I typed using
single keystroke (say M-BS)

I tried writing some keymappings, going to
ESC mode in between but couldn't figure out.

Any help?

Thanks.


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

#15267 From: Benji Fisher <benji@...>
Date: Sat Dec 9, 2000 2:48 am
Subject: Re: Word completion question
benji@...
Send Email Send Email
 
Rahul Joshi wrote:
>
> Hi,
>
> I use word completion extensively but I am
> unable to go back using a single keystroke
> if I don't want the word completed by vim.
>
> e.g.
>
> I type
>
> comple^p  =>  completed^p  =>  completion
>
> If I don't want both these completions,
> but I want to type "complement" then I am forced
> to type multiple backspaces till I go to comple.
>
> I would like to go to whatever I typed using
> single keystroke (say M-BS)
>
> I tried writing some keymappings, going to
> ESC mode in between but couldn't figure out.
>
> Any help?
>
> Thanks.

      This is on the todo list.

:help todo
/^Insert

Note that you can use <C-N> as many times as you typed <C-P>, instead of
<BS> for as many characters as have been added.

<plug>
You might consider my word-completion script.  This automatically invokes
<C-P> after every second character that you type.  The advantage is that
it selects the completion in Select mode, so that you can keep on typing
if it guessed wrong.  I do not actually use this myself, but I believe
some people like it.
http://sites.netscape.net/BBenjiF/vim/#wordcomplete
</plug>

HTH 			 --Benji Fisher

#15268 From: Peter Bismuti <bismuti@...>
Date: Sat Dec 9, 2000 3:53 am
Subject: opening gvim maximized automatically
bismuti@...
Send Email Send Email
 
I have a multiple monitor setup and the settings (font size, rows, cols)
that will make gvim full screen on one monitor are not the same for the
other.  Is there any way of starting gvim and making it maximize
automatically?

Thanks

   _____________________________________________________________________
  |                                                                     |
  |         Pete Bismuti                                                |
  |         Department of Computer Science                              |
  |         Florida State University                                    |
  |         bismuti@...  (850) 644-6835                          |
  |_____________________________________________________________________|

#15269 From: "Arjona, Ariel" <aarjona@...>
Date: Sat Dec 9, 2000 2:48 pm
Subject: RE: opening gvim maximized automatically
aarjona@...
Send Email Send Email
 
I'm using gvim 5.7 in Win2K and I accomplish this setting lines and columns
to very high values like say 999 (dunno other platforms.)

> -----Original Message-----
> From: Peter Bismuti [mailto:bismuti@...]
> Sent: Friday, December 08, 2000 10:53 PM
> To: vim@...
> Subject: opening gvim maximized automatically
>
>
> I have a multiple monitor setup and the settings (font size,
> rows, cols)
> that will make gvim full screen on one monitor are not the
> same for the
> other.  Is there any way of starting gvim and making it maximize
> automatically?
>
> Thanks
>
>
> _____________________________________________________________________
>  |
>          |
>  |         Pete Bismuti
>          |
>  |         Department of Computer Science
>          |
>  |         Florida State University
>          |
>  |         bismuti@...  (850) 644-6835
>          |
>
> |_____________________________________________________________
> ________|
>

#15270 From: Benji Fisher <benji@...>
Date: Sat Dec 9, 2000 11:08 pm
Subject: Re: opening gvim maximized automatically
benji@...
Send Email Send Email
 
I do not know about multiple monitors, but on Win32, the recommended
way is to add a line like this to your vimrc file:

:autocmd GUIEnter * simalt ~x

:help GUIEnter
:help simalt

					 --Benji Fisher

"Arjona, Ariel" wrote:
>
> I'm using gvim 5.7 in Win2K and I accomplish this setting lines and columns
> to very high values like say 999 (dunno other platforms.)
>
> > -----Original Message-----
> > From: Peter Bismuti [mailto:bismuti@...]
> > Sent: Friday, December 08, 2000 10:53 PM
> > To: vim@...
> > Subject: opening gvim maximized automatically
> >
> >
> > I have a multiple monitor setup and the settings (font size,
> > rows, cols)
> > that will make gvim full screen on one monitor are not the
> > same for the
> > other.  Is there any way of starting gvim and making it maximize
> > automatically?
> >
> > Thanks

#15271 From: Benji Fisher <benji@...>
Date: Sat Dec 9, 2000 11:09 pm
Subject: Re: is there a way to put color syntaxing into a debug mode?
benji@...
Send Email Send Email
 
David Gravereaux wrote:
>
> I'm having trouble "groking" the concepts and interactions of layered
> regions and matches and all that..
>
> Is there a way to see interactively where vim is stepping into and out of
> these things besides the edit and try approach?

      I am not sure what you want.  Can you ask a more specific question?

					 --Benji Fisher

#15272 From: Andre Berger <uzscd5@...>
Date: Sun Dec 10, 2000 9:58 am
Subject: Changing paste behavior
uzscd5@...
Send Email Send Email
 
I'd like to change vim's paste behavior, namely the paste to the
"left". By default the cursor is placed left to the pasted text, I'd
expect it on the right (just where it was before).

If this is FAQ, just point me to further reading...

Andre
--
Andre Berger <andre.berger@...> from Bonn, Germany

#15273 From: Benji Fisher <benji@...>
Date: Sun Dec 10, 2000 4:10 pm
Subject: Re: Changing paste behavior
benji@...
Send Email Send Email
 
Andre Berger wrote:
>
> I'd like to change vim's paste behavior, namely the paste to the
> "left". By default the cursor is placed left to the pasted text, I'd
> expect it on the right (just where it was before).
>
> If this is FAQ, just point me to further reading...
>
> Andre

      When you say 'paste to the "left",' I assume you mean P instead of
p.  If "where it was before" means "on the same character" then try using
gP instead of P.  If you want, you can do

:nmap P gP
:help gP

      If "where it was before" means "in the same cursor column" then try
this:

:nmap p p`[h
:nmap P P`[

:help `[  (or :help marks in general)

Note that vim does not get into an infinite recursion.  Read the exception
in

:help recursive_mapping

HTH 			 --Benji Fisher

#15274 From: Andre Berger <uzscd5@...>
Date: Sun Dec 10, 2000 5:05 pm
Subject: Re: Changing paste behavior
uzscd5@...
Send Email Send Email
 
Benji Fisher <benji@...> writes:

> Andre Berger wrote:
> >
> > I'd like to change vim's paste behavior, namely the paste to the
> > "left". By default the cursor is placed left to the pasted text, I'd
> > expect it on the right (just where it was before).
> >
> > If this is FAQ, just point me to further reading...
> >
> > Andre
>
>      When you say 'paste to the "left",' I assume you mean P instead of
> p.  If "where it was before" means "on the same character" then try using
> gP instead of P.  If you want, you can do
>
> :nmap P gP
> :help gP

I didn't know the gP command.

>      If "where it was before" means "in the same cursor column" then try
> this:
>
> :nmap p p`[h
> :nmap P P`[

This is exactly what I was looking for.

>
> :help `[  (or :help marks in general)
>
> Note that vim does not get into an infinite recursion.  Read the exception
> in
>
> :help recursive_mapping
>
> HTH 			 --Benji Fisher

Thank you very much. I'm a Vim newbie; I didn't even know there was
help for "composed" commands like "gP".

Andre

#15275 From: Walter Briscoe <wbriscoe@...>
Date: Mon Dec 11, 2000 8:25 am
Subject: vim 5.7;W 2000;cursor + mouse problems
wbriscoe@...
Send Email Send Email
 
I recently bought a laptop running Windows 2000 Professional on which I
have loaded the command line version of vim 5.7.

I have two problems which stump me.
1) the cursor disappears in insert mode; no-cursor typing is weird.
2) The machine has a touch pad mouse; the heel of my hand tends to brush
the touch pad and move the (visible or invisible) cursor. What can I do
to reduce the sensitivity of vim to touchpad action? (I think that
learning to type is not an option. I tend to use two fingers with
capitals formed with a left hand case selector and a right hand letter
selector.)
--
Walter Briscoe

Messages 15246 - 15275 of 138237   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help