Re: :wq vs ZZ

2007-02-13 Thread Theerasak Photha

On 2/14/07, Dr. Uwe Schneider <[EMAIL PROTECTED]> wrote:

Sure, "ZZ" is quite faster than ":wq", but ":wq" is more consistent, thinking about other 
actions, like ":wn".

Greetz, Doc


I think this is the idea we're getting at:

http://en.wikipedia.org/wiki/Agglutination


Re: titles of tabs

2007-02-13 Thread A.J.Mechelynck

A.J.Mechelynck wrote:

Simon Jackson wrote:

how do you change the text in the file tabs up at the top?



The 'tabline' option is similar to 'statusline', but for the tabs line. 
Here's what I use:

[...]

P.S. I also use ":set go-=e" to get a text-mode tab line even in gvim.


Best regards,
Tony.
--
Due knot trussed yore spell chequer two fined awl miss steaks.


Re: :wq vs ZZ

2007-02-13 Thread Dr. Uwe Schneider
Sure, "ZZ" is quite faster than ":wq", but ":wq" is more consistent, thinking 
about other actions, like ":wn".

Greetz, Doc


Re: titles of tabs

2007-02-13 Thread A.J.Mechelynck

Simon Jackson wrote:

how do you change the text in the file tabs up at the top?



The 'tabline' option is similar to 'statusline', but for the tabs line. Here's 
what I use:


- in the vimrc:

if exists("+showtabline")
function MyTabLine()
let s = ''
let t = tabpagenr()
let i = 1
while i <= tabpagenr('$')
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let s .= '%' . i . 'T'
let s .= (i == t ? '%1*' : '%2*')
let s .= ' '
let s .= i . ':'
let s .= winnr . '/' . tabpagewinnr(i,'$')
let s .= ' %*'
let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
let file = bufname(buflist[winnr - 1])
let file = fnamemodify(file, ':p:t')
if file == ''
let file = '[No Name]'
endif
let s .= file
let i = i + 1
endwhile
let s .= '%T%#TabLineFill#%='
let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X')
return s
endfunction
set stal=2
set tabline=%!MyTabLine()
map  :tabnext
map! :tabnext
map:tabprev
map!   :tabprev
endif

- in my "almost-default" colorscheme:

" define colors for the tab line:
" file name of unselected tab
hi TabLine gui=NONE guibg=#EE  guifg=black
\  cterm=NONE,bold  ctermbg=lightgrey  ctermfg=white
" file name of selected tab (GUI default is bold black on white)
hi TabLineSel  cterm=NONE,bold  ctermbg=green  ctermfg=white
" fillup and tab-delete "X" at right
hi TabLineFill gui=NONE,boldguibg=#CC  guifg=#99
\  cterm=NONE   ctermbg=lightgrey  ctermfg=red
" tab and file number 1:2/3 (meaning "tab 1: window 2 of 3) for selected tab
hi User1   gui=bold guibg=whiteguifg=magenta
\   ctermbg=green  ctermfg=black
" tab and file number 1:2/3 for unselected tab
hi User2guibg=#EE  guifg=magenta
\   ctermbg=lightgrey  ctermfg=black



Best regards,
Tony.
--
"Hey!  Who took the cork off my lunch??!"
-- W. C. Fields


titles of tabs

2007-02-13 Thread Simon Jackson

how do you change the text in the file tabs up at the top?


RE: search command in visual mode - how to?

2007-02-13 Thread Sibin P. Thomas
Thanks a lot Charles and Tim for providing me the answer.
(It really was just the case of missing the \r or \)

And surely there was no necessity for such complex steps for this particular
example, but it was just an "indicative" example of one of the steps I needed
for my script. But rest assured I really do need this.

Regards,
Sibin

-Original Message-
From: Charles E Campbell Jr [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 12:31 AM
To: Sibin P. Thomas
Cc: vim@vim.org
Subject: Re: search command in visual mode - how to?

Sibin P. Thomas wrote:

>Hi all, 
>
>I am stuck in one of my scripting attempts!
>
>The context :
>Suppose I want to delete the string "bio" from the following line "The
>biosphere is huge" and I want to do it in this way ->
>/bios
>v
>//e
>d
>
>Now I want to do the same thing, but conditionally...basically I want to use
>the :if construct.
>I tried -> :if (@0=~"something") | exe "/bios" | exe "normal v" | exe "//e"
|
>endif
>This where I am stuck; I am not able to reproduce the effect of //e
>through the :if construct.
>
>In this case I get the error "e481: No range allowed" and if I try -> exe
>"normal //e" it just stays in visual mode doing nothing.
>
>Can anyone help me out here? This is going to play a huge part in most of my
>scripts!
>  
>
Several notes

1. exe "/bios" might fail.  You probably should use  the search() function:
  if search('bios')
   ...
  endif

2. "bios" might be part of a word (example: symbiosis) and get found 
when you don't want it to be.
  Perhaps   search('\d"

Regards,
Chip Campbell



DISCLAIMER:
This message (including attachment if any) is confidential and may be 
privileged. Before opening attachments please check them for viruses and 
defects. MindTree Consulting Limited (MindTree) will not be responsible for any 
viruses or defects or any forwarded attachments emanating either from within 
MindTree or outside. If you have received this message by mistake please notify 
the sender by return  e-mail and delete this message from your system. Any 
unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited.  Please note that e-mails are susceptible to change and 
MindTree shall not be liable for any improper, untimely or incomplete 
transmission.


Re: Security Center Advisory !

2007-02-13 Thread A.J.Mechelynck

Christian Ebert wrote:

* A.J.Mechelynck on Tuesday, February 13, 2007 at 04:47:04 +0100:

Dave Land wrote:

Is there any way that the list managers can block these PayPal scam emails?
Maybe they can, but that won't block the Internet Pharmacy scams which will 
arrive tomorrow from a different posting IP address, nor the bogus eBay 
questions, BankAmerica warnings, or software offers of the day after. All 
in all, considering the low volume of spam that reaches me with @vim.org in 
"To or Cc" as compared to the proportion of spam in the rest of my email, I 
suspect that a lot of the worst crap is already filtered away by the Vim 
servers.


FWIW, I run Clamsmtpd
 here, and it
caught 3 virii in the last few days. So the stuff is not
completely harmless.

c


Like all email, it is harmless as long as you don't open it. This means you 
can even select it in the message-list pane provided that the Preview Pane (if 
your mailer has one) is closed. Viewing the _source_ of a message (if your 
mailer allows it) doesn't count as opening: it shows the raw text of the 
message, not triggering any HTML or javascript that it might contain.


If you delete a message _unopened_ it cannot harm you.

I don't know about Mutt; but in both Outlook Express (which I have used) and 
Thunderbird (which I use now) there is a preview pane which you can toggle 
(open/close) with F8, and a View => Source menu item.


Best regards,
Tony.
--
The makers may make
and the users may use,
but the fixers must fix
with but minimal clues


Re: :wq vs ZZ

2007-02-13 Thread A.J.Mechelynck

Vigil wrote:
I wonder why some people use :wq instead of ZZ. Maybe they just don't 
know about ZZ? Obviously that's not the case with Bram.


On Tue, 13 Feb 2007, Bram Moolenaar wrote:


:wq




Vim often has several ways to do the same thing. The best way is whichever 
suits you best: there is no "best way" in abstracto. In this case there are 
several related commands:


:x[it]
:exi[t]
ZZ
write if modified, then close window; quit if last window
:wq
write always, then close window; quit if last window
:q[uit] (with 'autowriteall')
becomes same as :x

Even though I have 'autowriteall' set, I use ":x" if the window is modified, 
otherwise ":q". Yes it means (typing one-handed) moving the hand from the 
colon (penultimate key at bottom right, no shift), to the x (third key at 
bottom left, after < and w) or to the q (far left on middle row, next to Caps 
Lock) then back to the Enter key; but I learnt piano (which I haven't kept up 
:-( ) before I had a typewriter, and never learnt to type without moving 
hands, so that's not a problem for me (ever seen a pianist play without moving 
hands? :-} ). I never learnt ZZ which is not mnemonic to me; and on my AZERTY 
keyboard there is no "rolling movement" either.



Best regards,
Tony.
--
Never try to outstubborn a cat.
-- Lazarus Long, "Time Enough for Love"


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

2007-02-13 Thread Cameron Simpson
On 14Feb2007 10:55, Pete Johns <[EMAIL PROTECTED]> wrote:
| On Tue, 2007-02-13 at 16:07:32 -0700, <[EMAIL PROTECTED]> sent:
| >>(Sorry guys, my web-based editor, which I must use at work
| >>becauseof IT paranoia about SMTP, simply will not let me reply
| >>at the end rather than beginning of the thread.) 
| >>
| Web-based editor? Why not use Vim as your editor from within
| Firefox? Works a treat for me!
| 
| ViewSourceWith 

While on this topic, let me point you at It's All Text! here:

  https://addons.mozilla.org/firefox/4125/

Puts a small "edit" button on every  text box, which pops
up the editor of your choice. I have it set to pop up a vim-inna-xterm
(well, rxvt-unicode). But Gvim would be as good a choice.

It's very very handy.
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

55 mph is fast enough to get you killed, but slow enough to make you think
you're safe.- The Gumball Rally


Re: :wq vs ZZ

2007-02-13 Thread Theerasak Photha

On 2/13/07, Gene Kwiecinski <[EMAIL PROTECTED]> wrote:


'vi' -- a *warrior's* editor...


s/warrior/masochist/


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

2007-02-13 Thread Pete Johns
On Tue, 2007-02-13 at 16:07:32 -0700, <[EMAIL PROTECTED]> sent:
>>(Sorry guys, my web-based editor, which I must use at work
>>becauseof IT paranoia about SMTP, simply will not let me reply
>>at the end rather than beginning of the thread.) 
>>
Web-based editor? Why not use Vim as your editor from within
Firefox? Works a treat for me!

ViewSourceWith 

Hope this helps;

--paj
-- 
Pete Johns   
Contact Information  
The Greatest Gig In The Sky!   
2007-02-04 Eric Clapton 015  


pgpfk1ua0bm47.pgp
Description: PGP signature


RE: :wq vs ZZ

2007-02-13 Thread Gene Kwiecinski
>To boot, ZZ isn't Vim. I started using vi in 1983 and it was already
there.
>In fact, I have never used :wq

Yeah, it's about the same for me, roughly '82 or so.  Regular 'vi' on
Unix SVR4 on a DEC PDP-11/45.

Still got PC/VI, a port of *real* AT&T 'vi' from probably Unix System V
that I still use on a regular basis on an old DOS box.  DOS even grexes
about

unknown option -i

when shelling out (ie, from 'sh -i' to get an interactive shell in
Unix).


'vi' -- a *warrior's* editor...


Re: :wq vs ZZ

2007-02-13 Thread Jean-Rene David
* Gene Kwiecinski [2007.02.13 17:00]:
> [...]
> I never liked ":wq", because you gotta do
> 
>   depress 
>   <:>
>   release 
>   
>   
>   

For most actions in vim, I too often look for the
very fastest, fewest-keystrokes way. However
quitting is not one of them.

I agree with Tim's point: when I quit I prefer
being forced to be explicit about *how* I quit.

-- 
JR


RE: :wq vs ZZ

2007-02-13 Thread Gene Kwiecinski
>>>I imagine there is a rationale for 'ZZ', but it's not readily

>>'z' is already used, and the  and  keys are adjacent on
>>Murrrcan keyboards, so you can easily just quit out of the editor in
>>almost a single hand-action.

>I understand the ergonomic value. Mentally it doesn't make as much
sense though.

Actually, to me, once I hit on the reason, it made *perfect* sense.  A
quick bang-bang way to quit a file, and even the placement of the keys
next to each other, and *order* of hitting the keys (a natural "rolling"
action from  to , as if rolling/tapping your fingers in
impatience (from pinky to index-finger, not the other way around)),
makes it a "natural" action.

That "rolling" action is the same reason why "qw" just feels natural and
is easy to do, but "wq" just feels "backwards".

I was quite pleased at figuring out the reasoning.  :D


>BTW, Murrrca---is that like this: http://www.langmaker.com/db/Amurica ?

Dunno if specifically attributed to GWB, but in general, that's how
locals slur words.  Eg, "Baltimore, Maryland" is pretty much pronounced
by the locals as "Ballmer, Merrlin", and around here, "Long Island"
similar to "Lawn Guyland".

I won't even touch the Brits and the way "Worcestershire" is mangled
into "Woostsher" or whatever.


Re: :wq vs ZZ

2007-02-13 Thread Theerasak Photha

On 2/13/07, Gene Kwiecinski <[EMAIL PROTECTED]> wrote:

>I imagine there is a rationale for 'ZZ', but it's not readily
>apparent. (Something to do with C-z in DOS, or the end of the
>alphabet?)

'z' is already used, and the  and  keys are adjacent on
Murrrcan keyboards, so you can easily just quit out of the editor in
almost a single hand-action.


I understand the ergonomic value. Mentally it doesn't make as much sense though.

BTW, Murrrca---is that like this: http://www.langmaker.com/db/Amurica ?


RE: :wq vs ZZ

2007-02-13 Thread russ
Hmmm... now I see it: I have to turn off HTML without which vim.org
rejects it anyway. Okay, well next time I'll repent (maxima mea culpa).

>  Original Message 
> Subject: RE: :wq vs ZZ
> From: [EMAIL PROTECTED]
> Date: Tue, February 13, 2007 4:04 pm
> To: Gene Kwiecinski <[EMAIL PROTECTED]>
> Cc: Theerasak Photha <[EMAIL PROTECTED]>, Vim ML 
> 
>  To boot, ZZ isn't Vim. I started using vi in 1983 and it was already
> there. In fact, I have never used :wq(Sorry guys, my web-based
> editor, which I must use at work becauseof IT paranoia about SMTP, simply
> will not let me reply at the end rather than beginning of the thread.)
>  
> 
>   Original Message 
> Subject: RE: :wq vs ZZ
> From: "Gene Kwiecinski" <[EMAIL PROTECTED]>
> Date: Tue, February 13, 2007 2:57 pm
>  To: "Theerasak Photha" <[EMAIL PROTECTED]>, "Vim ML" 
> 
> >I imagine there is a rationale for 'ZZ', but it's not readily
>  >apparent. (Something to do with C-z in DOS, or the end of the
> >alphabet?)
> 
>  'z' is already used, and the  and  keys are adjacent on
>  Murrrcan keyboards, so you can easily just quit out of the editor in
> almost a single hand-action.
> 
> I never liked ":wq", because you gotta do
> 
> depress 
> <:>
> release 
> 
> 
> 
> 
> instead of the nice, simple, easy bang-bang of
> 
> depress 
> 
> 
>  and you're out.  Releasing the  key doesn't even count.  :D
> 
>  Even ':' requires either 2 hands, or a weirdly-contorted 1-handed op. 



RE: :wq vs ZZ

2007-02-13 Thread Gene Kwiecinski
>I imagine there is a rationale for 'ZZ', but it's not readily
>apparent. (Something to do with C-z in DOS, or the end of the
>alphabet?)

'z' is already used, and the  and  keys are adjacent on
Murrrcan keyboards, so you can easily just quit out of the editor in
almost a single hand-action.

I never liked ":wq", because you gotta do

depress 
<:>
release 




instead of the nice, simple, easy bang-bang of

depress 


and you're out.  Releasing the  key doesn't even count.  :D

Even ':' requires either 2 hands, or a weirdly-contorted 1-handed op.


Re: :wq vs ZZ

2007-02-13 Thread Theerasak Photha

On 2/13/07, Vigil <[EMAIL PROTECTED]> wrote:

I wonder why some people use :wq instead of ZZ. Maybe they just don't know
about ZZ? Obviously that's not the case with Bram.


:wq and its components are among the easiest features to remember in
Vim's agglutinating command set, because they are mnemonic.

I imagine there is a rationale for 'ZZ', but it's not readily
apparent. (Something to do with C-z in DOS, or the end of the
alphabet?)


Re: File name completion for files residing in multiple directories

2007-02-13 Thread Erik Bergman

Looks good. Thanks!
I will go going away for a while and won't have access to a computer,
but I will try it out once I get back.

(Sorry for not replying directly to the mailing list the first time.
gmail's defaults are kinda funny at times)

/Erik Bergman

On 2/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hello,

Erik Bergman <[EMAIL PROTECTED]> wrote:

> I've been searching for a nice way to quickly open files that may reside in
> any of number of directories, similar to the "quick open" feature you find
> in some other editors. One solution is to mess around with the ** and *
> wildcards, but this gets terribly slow for large projects. Another
> "solution" is to set the 'path' variable, but vim does not perform
> completion on files opened that way. A third solution is to generate file
> name tags and use :tag to jump to files, but in that case you will perform
> completion on just not file names, but other tags as well. Finally, you can
> open all files you need to switch between and use :b, but for obvious
> reasons this isn't very practical.
> [...]
> Can anyone think of a better solution? Would it be possible to integrate
> this feature into vim in a nice way?

It may not be exactly what you are looking for, but still this is a good
approximation [1] I think.

I've been maintening a plugin called searchInRuntime. It provides various
commands to open (or do anything else on) files that can be found in lists of
directories. I often use
  :Hs foo.cpp
   -> horizontally split-open foo.cpp which is searched into &path ;
  If several files matches, a choice is proposed ;
  If the file is already opened, we jump to the window were the file
  is being edited
  :SearchInVar! $INCLUDE sp foo/bar*h
   -> searches all (-> bang) occurrences of foo/bar*.h into $INCLUDE
  and split-open the files found. We could use &path and its '**'
  with no problem

And there are many more similar commands. All support a "smart"-completion (i.e.
the completion on the first parameter of SearchInVar is made considering the
parameter must be a variable, the second a command, and the others pathnames).
The support of completion requires vim7.

There is a documentation bundled in the archive which could be found on SF
(script #229 IIRC), or on my web site at
   http://hermitte.free.fr/vim/ressources/
The version on my web site may be more recent.

[1] I'm of course 100% subjective. :)

HTH,

--
Luc Hermitte
http://hermitte.free.fr/vim/



Re: search command in visual mode - how to?

2007-02-13 Thread Charles E Campbell Jr

Sibin P. Thomas wrote:

Hi all, 


I am stuck in one of my scripting attempts!

The context :
Suppose I want to delete the string "bio" from the following line "The
biosphere is huge" and I want to do it in this way ->
/bios
v
//e
d

Now I want to do the same thing, but conditionally...basically I want to use
the :if construct.
I tried -> :if (@0=~"something") | exe "/bios" | exe "normal v" | exe "//e" |
endif
This where I am stuck; I am not able to reproduce the effect of //e
through the :if construct.

In this case I get the error "e481: No range allowed" and if I try -> exe
"normal //e" it just stays in visual mode doing nothing.

Can anyone help me out here? This is going to play a huge part in most of my
scripts!
 


Several notes

1. exe "/bios" might fail.  You probably should use  the search() function:
 if search('bios')
  ...
 endif

2. "bios" might be part of a word (example: symbiosis) and get found 
when you don't want it to be.

 Perhaps   search('\4. If for some odd reason you feel you absolutely must use visual mode 
for this, then try

  exe "norm! v//e\d"

Regards,
Chip Campbell



Re: How to diff in gvim

2007-02-13 Thread marc
Eric Leenman said...
> I'm trying to diff two files in (portable) gvim
> I have two files opened in two vertical windows.
> (Kind of Winmerge screen setup)
> 
> When I type :diff  I get the error
> E97: Can not create diffs

I use:

  :windo difft

Which, since I use it a lot, is:

  :wu

Also useful, I find, is this mapping:

  nmap  ,vs  :vs:ene " vsplit + empty new buffer

-- 
Cheers,
Marc



Re: search command in visual mode - how to?

2007-02-13 Thread Tim Chase

The context :
Suppose I want to delete the string "bio" from the following line "The
biosphere is huge" and I want to do it in this way ->
/bios
v
//e
d

Now I want to do the same thing, but conditionally...basically I want to use
the :if construct.
I tried -> :if (@0=~"something") | exe "/bios" | exe "normal v" | exe "//e" |
endif
This where I am stuck; I am not able to reproduce the effect of //e
through the :if construct.

In this case I get the error "e481: No range allowed" and if I try -> exe
"normal //e" it just stays in visual mode doing nothing.

Can anyone help me out here? This is going to play a huge part in most of my
scripts!


It seems like you're trying to retrofit a solution to one problem 
to a different class of problems.  The old "when all you've got 
is a hammer, everything looks like a nail" adage. :)


It sounds like the regexp

\(with or without that "c" or "g" flag)  The same can be done 
using a call to the substitute() function if needed in a script. 
   To do what you describe above, you could do something like


:/\Perhaps with more details on what you're trying to do, the list 
can provide more targeted responses.  To address the problems you 
were experiencing, I suspect that you need to include either a 
"\r" or "\n" in your "normal" command as the act of doing the 
search (as you would actually hit ).  However, I would 
recommend doing the process from Ex commands as they're a little 
less convoluted.


Just a few ideas,

-tim




search command in visual mode - how to?

2007-02-13 Thread Sibin P. Thomas
Hi all, 

I am stuck in one of my scripting attempts!

The context :
Suppose I want to delete the string "bio" from the following line "The
biosphere is huge" and I want to do it in this way ->
/bios
v
//e
d

Now I want to do the same thing, but conditionally...basically I want to use
the :if construct.
I tried -> :if (@0=~"something") | exe "/bios" | exe "normal v" | exe "//e" |
endif
This where I am stuck; I am not able to reproduce the effect of //e
through the :if construct.

In this case I get the error "e481: No range allowed" and if I try -> exe
"normal //e" it just stays in visual mode doing nothing.

Can anyone help me out here? This is going to play a huge part in most of my
scripts!

Regards,
Sibin



DISCLAIMER:
This message (including attachment if any) is confidential and may be 
privileged. Before opening attachments please check them for viruses and 
defects. MindTree Consulting Limited (MindTree) will not be responsible for any 
viruses or defects or any forwarded attachments emanating either from within 
MindTree or outside. If you have received this message by mistake please notify 
the sender by return  e-mail and delete this message from your system. Any 
unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited.  Please note that e-mails are susceptible to change and 
MindTree shall not be liable for any improper, untimely or incomplete 
transmission.


Re: External command with arguments (WinXP)

2007-02-13 Thread Tim Chase

C:>"C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE" /a
"c:\vimtemp\trigger.sql"

How can I run this inside of vim to attach the current buffer?


Have you tried putting a "!" in front of it?

For example, at the bottom of the vim window:

:!"C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE" /a >
"c:\vimtemp\trigger.sql"

I would have tried this command myself, but I don't have outlook on my
machine.  Hopefully it works.


Tom is correct that you should be able to just use that command. 
 You can also tweak it to be


:!"c:\...\outlook.exe" /a %

which, by using "%" as the file-name, will automatically replace 
the "%" with current file being edited.  That way, you can do 
something like


:nnoremap  :!"c:\path\to\outlook.exe" /a %

which will allow you to attach the currently saved version of the 
file you're editing.  It does have an annoying side-effect that 
it opens a shell-window that you usually have to close.


I've also had modest success with

:echo system('path/to/outlook.exe /a' . expand('%'))

though it hangs until the subprocesss completes.

It still gives an internal Vim message, but that can be worked 
around with


:sil! echo system('outlook.exe /a "'.expand('%').'"')

(adjust paths and escaping accordingly...I used "notepad" instead 
of "outlook" as that's what I had available)


Just a few more ideas.

-tim





Re: External command with arguments (WinXP)

2007-02-13 Thread Tom Purl
> C:>"C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE" /a
> "c:\vimtemp\trigger.sql"
>
> How can I run this inside of vim to attach the current buffer?

Have you tried putting a "!" in front of it?

For example, at the bottom of the vim window:

:!"C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE" /a >
"c:\vimtemp\trigger.sql"

I would have tried this command myself, but I don't have outlook on my
machine.  Hopefully it works.

HTH!

Tom Purl




Re: Security Center Advisory !

2007-02-13 Thread Christian Ebert
* A.J.Mechelynck on Tuesday, February 13, 2007 at 04:47:04 +0100:
> Dave Land wrote:
>> Is there any way that the list managers can block these PayPal scam emails?
> 
> Maybe they can, but that won't block the Internet Pharmacy scams which will 
> arrive tomorrow from a different posting IP address, nor the bogus eBay 
> questions, BankAmerica warnings, or software offers of the day after. All 
> in all, considering the low volume of spam that reaches me with @vim.org in 
> "To or Cc" as compared to the proportion of spam in the rest of my email, I 
> suspect that a lot of the worst crap is already filtered away by the Vim 
> servers.

FWIW, I run Clamsmtpd
 here, and it
caught 3 virii in the last few days. So the stuff is not
completely harmless.

c
-- 
Vim plugin to paste current GNU Screen buffer in (almost) any mode:



Re: :wq vs ZZ

2007-02-13 Thread Matthew Winn
On Tue, 13 Feb 2007 09:52:56 + (GMT), Vigil
<[EMAIL PROTECTED]> wrote:

> I wonder why some people use :wq instead of ZZ. Maybe they just don't know 
> about ZZ? Obviously that's not the case with Bram.

They do different things. ZZ writes the file if and only if it has
been modified, as does :x. :wq always writes the file.

I prefer ZZ, as it's easy to type with one hand on a UK keyboard. :wq
requires many more keystrokes: five keys instead of two, and three
transfers from one hand to the other. (Also, I found :wq a bad habit
to get into when working on large projects with "make", as files that
are written unnecessarily increase the build time.)

-- 
Matthew Winn


Re: How to diff in gvim

2007-02-13 Thread Jean-Rene David
* Naim Far [2007.02.13 07:54]:
>   When using diffsplit I have to supply the full
>   path of the second comparison file, what if I
>   simply want the comparison to be done with
>   another already opened buffer?!

I usually do this in two phases. First setup the
vertical split, then use:

:windo diffthis

To setup the split, here are two easy ways
depending on whether you know the buffer number or
not:

If you do (and say that number is 2):

:vert sb 2

If you don't:

:vert sb 

will give you a list of opened buffer to choose
from. You can use completion again after typing a
few characters. But it might be even quicker to
use ":ls" to find out the buffer number and use
the first method above.

HTH,

-- 
JR


Re: 8 bit problem

2007-02-13 Thread Albie Janse van Rensburg

Ulrich Lauther wrote:

A problem with German Umlauts

Under Linux I have modified my key map in a way that for instance ALT a
generates Umlaut a ("a in Tex notation).

Now when I start vi like this:

/usr/bin/X11 rxvt -meta8 -e vim

I can type in Umlauts using the ALT key.

This also worked with gvim, at least up to 6.1.88

However, with gvim 6.3.86 it does not seem to work anymore.

Do I need to set some option to get this functionality back?

Thanks for any help!

-ulrich

Ulrich Lauther  ph: +49 89 636 48834 fx: ... 636 42284
Siemens CT SE 6 Internet: [EMAIL PROTECTED]

Siemens Aktiengesellschaft:
Vorsitzender des Aufsichtsrats: Heinrich v. Pierer;
Vorstand: Klaus Kleinfeld, Vorsitzender; Johannes Feldmayer, Joe Kaeser,
Rudi Lamprecht, Eduardo Montes, Juergen Radomski, Erich R. Reinhardt,
Hermann Requardt, Uriel J. Sharef, Klaus Wucherer
Sitz der Gesellschaft: Berlin und Muenchen
Registergericht: Berlin Charlottenburg, HRB 12300, Muenchen, HRB 6684
WEEE-Reg.-Nr. DE 23691322




  

Hi Ulrich

Have you tried looking at Vim's digraphs?

:help digraph

should tell you more.  You could imap ALT-a to :a to get an 
umlaut a, and so forth for the other letters.  This requires that :ver 
has +digraphs of course.


Enjoy

--
Albie Janse van Rensburg (neonpill)

Registered Linux User 438873 | 


Re: How to diff in gvim

2007-02-13 Thread Jürgen Krämer

Hi,

Naim Far wrote:
> 
>   Does anyone know how to do "vert diffsplit" between two buffers?!
> When using diffsplit I have to supply the full path of the second
> comparison file, what if I simply want the comparison to be done with
> another already opened buffer?!

execute

  :diffsplit

in both buffers.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)


RE: How to diff in gvim

2007-02-13 Thread Naim Far
Hi,

  Does anyone know how to do "vert diffsplit" between two buffers?!
When using diffsplit I have to supply the full path of the second
comparison file, what if I simply want the comparison to be done with
another already opened buffer?!

Thanx in advance...

-Original Message-
From: Tom Purl [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 13, 2007 1:59 PM
To: Eric Leenman
Cc: vim@vim.org
Subject: Re: How to diff in gvim

> Hi,
>
> I'm trying to diff two files in (portable) gvim
> I have two files opened in two vertical windows.
> (Kind of Winmerge screen setup)
>
> When I type :diff  I get the error
> E97: Can not create diffs

I don't think that you're supposed to diff files this way, but I could
be wrong.  If I have a buffer that I want to diff with another, I
usually do the following:

1. "Un-split" all of your windows, leaving only one, and then load file
#1 in that window.
2. Type the following command:
* :vert diffsplit path_to_file2

This should give you the results that you want.

HTH!

Tom Purl




8 bit problem

2007-02-13 Thread Ulrich Lauther
A problem with German Umlauts

Under Linux I have modified my key map in a way that for instance ALT a
generates Umlaut a ("a in Tex notation).

Now when I start vi like this:

/usr/bin/X11 rxvt -meta8 -e vim

I can type in Umlauts using the ALT key.

This also worked with gvim, at least up to 6.1.88

However, with gvim 6.3.86 it does not seem to work anymore.

Do I need to set some option to get this functionality back?

Thanks for any help!

-ulrich

Ulrich Lauther  ph: +49 89 636 48834 fx: ... 636 42284
Siemens CT SE 6 Internet: [EMAIL PROTECTED]

Siemens Aktiengesellschaft:
Vorsitzender des Aufsichtsrats: Heinrich v. Pierer;
Vorstand: Klaus Kleinfeld, Vorsitzender; Johannes Feldmayer, Joe Kaeser,
Rudi Lamprecht, Eduardo Montes, Juergen Radomski, Erich R. Reinhardt,
Hermann Requardt, Uriel J. Sharef, Klaus Wucherer
Sitz der Gesellschaft: Berlin und Muenchen
Registergericht: Berlin Charlottenburg, HRB 12300, Muenchen, HRB 6684
WEEE-Reg.-Nr. DE 23691322




Re: How to diff in gvim

2007-02-13 Thread Tom Purl
> Hi,
>
> I'm trying to diff two files in (portable) gvim
> I have two files opened in two vertical windows.
> (Kind of Winmerge screen setup)
>
> When I type :diff  I get the error
> E97: Can not create diffs

I don't think that you're supposed to diff files this way, but I could
be wrong.  If I have a buffer that I want to diff with another, I
usually do the following:

1. "Un-split" all of your windows, leaving only one, and then load file
#1 in that window.
2. Type the following command:
* :vert diffsplit path_to_file2

This should give you the results that you want.

HTH!

Tom Purl




External command with arguments (WinXP)

2007-02-13 Thread j.hofmann
Hello,

at the shell cmd I can run the following to start ms outlook with a new
mail window and attachment of a sql file:

C:>"C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE" /a
"c:\vimtemp\trigger.sql"

How can I run this inside of vim to attach the current buffer?

Thank You

Joachim
###

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/



Re: :wq vs ZZ

2007-02-13 Thread Tim Chase
> I wonder why some people use :wq instead of ZZ. Maybe they just don't know 
> about ZZ? Obviously that's not the case with Bram.


I can't speak for others, but for myself, I prefer the
intentionality and tweakability of ":wq".  While it may be two
extra characters, I like that my mind goes through the process
(brief though it may be) of  "I want a command (:) that writes
the file (w) and quits (q)".  It allows me to adjust my intent on
the fly...do I mean "and overwrite any pre-existing file" then I
add a "!".  If I really mean "do it for all the files", I can add
an "a".  So my mind goes through the process of the checklist:

- do I want to write the file? (w)
- do I want to quit the file? (q)
- do I want to quit ALL the files? (a)
- do I want to write/abandon any changes? (!)

and build the command accordingly.  That's 16 different available
options in some situations, whereas ZZ and ZQ only account for
two of them.

Oh, and for some reason, I find ZZ and ZQ awkward to type
too...not killer, but just another small ding that prevents me
from using them.

And as another small plus for ":wq", it's easily recognizable for
its "vim-ness" (which may be why it Bram's email used it).  I've
strangely thought it would be fun to have a console-black t-shirt
with "vim" printed on the front ":wq!" printed on the back of it
in TTY-green.  ;)

Now if only they allowed the "colon" character (and
exclamation-point character) on license plates... ;)

Just my perspective...

-tim







Re: How to diff in gvim

2007-02-13 Thread Wolfgang Schmidt

Eric Leenman wrote:

Hi,

I'm trying to diff two files in (portable) gvim
I have two files opened in two vertical windows.
(Kind of Winmerge screen setup)

When I type :diff  I get the error
E97: Can not create diffs


Why is that?

When I type :verbose
I dont get more info


   Hi,

try

:help E97

to get a list of possible reasons and solutions.

Cheers,

   Wolfgang


How to diff in gvim

2007-02-13 Thread Eric Leenman

Hi,

I'm trying to diff two files in (portable) gvim
I have two files opened in two vertical windows.
(Kind of Winmerge screen setup)

When I type :diff  I get the error
E97: Can not create diffs


Why is that?

When I type :verbose
I dont get more info

Rgds,
Eric

_
Get in the mood for Valentine's Day. View photos, recipes and more on your 
Live.com page. 
http://www.live.com/?addTemplate=ValentinesDay&ocid=T001MSN30A0701




:wq vs ZZ

2007-02-13 Thread Vigil
I wonder why some people use :wq instead of ZZ. Maybe they just don't know 
about ZZ? Obviously that's not the case with Bram.


On Tue, 13 Feb 2007, Bram Moolenaar wrote:


:wq


--

.


alt gr on german keyboard not working in gvim

2007-02-13 Thread Wolfgang Schmidt


   Hi vimmers,

I just compiled an actual vim/gvim (7.0) on linux (2.4.21-226-smp4G). In 
the console, everything is fine, I can use ALTGR-q to get an atsign on a 
german keyboard. When I'm in gvim and try the same, I just get a 'q' 
typed, seems like ALT GR is deactivated in gvim (same for ALTGR-7, 
normally '{') etc.


Can anyone give me a hint what might be the problem?

Thanx in advance

   Wolfgang