Re: Subject: Re: vim on cygwin using win32 clipboard

2007-02-15 Thread Chris Sutcliffe

 Also, is there anything I can do to help get the original patch accepted?

Ask a few people to try it out and report their results here.


I'll give it a shot.  Is there somewhere I can grab the patch from, or
should I go through the list archives to find it?

Chris

--
Chris Sutcliffe
http://ir0nh34d.googlepages.com
http://ir0nh34d.blogspot.com
http://emergedesktop.org


Re: Vim crashing while starting nibbles game

2007-02-15 Thread Mikolaj Machowski
Dnia czwartek 15 luty 2007, Hari Krishna Dara napisał:
 After I updated the nibbles game, a user reported that his gvim crashes

Cannot start Nibble at all:

Error in function SNR29_Nibble..nibble#Nibble:
line   50:
E416: cleared

latest genutils and nibble.

m.



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

2007-02-15 Thread A. S. Budden

On 15/02/07, Pete Johns [EMAIL PROTECTED] wrote:

On Thu, 2007-02-15 at 03:31:21 +0100, Bram Moolenaar sent:
Web-based editor? Why not use Vim as your editor from within
Firefox? Works a treat for me!  ViewSourceWith
http://dafizilla.sourceforge.net/viewsourcewith/

Don't see something about Vim here...

Sorry, Bram, I should have mentioned that a little configuration
is required here. I should also mention that ViewSourceWith does
more than it says on the tin, insofar as you can do more than
viewing source with it. It provides a menu item for you to launch
your favourite text editor (Vim) from a textarea. I've been using
it for a while now under Windows. I suspect that to use it under
Linux then a shell script like the one you provided would be
needed.


I use ViewSourceWith under Windows  Linux and it doesn't need a shell
script: it polls for changes to the file (I guess), so it doesn't
matter whether gvim is forked or not.  However, It's All Text sounds
rather nice, so I may well switch to that now!

Al


Re: External command with arguments (WinXP): cmd /c problem

2007-02-15 Thread j.hofmann

Hm, this is strange, the windows shell cmd (not vim!) has problems with the
following:
cmd.exe /c C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE /a
c:\Dokumente und Einstellungen\hofjoa41\Eigene Dateien\test.txt

- C:\Programme\Microsoft not found

If I use the command above directly at the shell *without* the cmd /c part it
works properly!

I think I will ask also at alt.msdos.batch.nt if cmd /c has a special
problem.



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: External command with arguments (WinXP): cmd /c problem

2007-02-15 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

Hm, this is strange, the windows shell cmd (not vim!) has problems with the
following:

cmd.exe /c C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE /a

c:\Dokumente und Einstellungen\hofjoa41\Eigene Dateien\test.txt

- C:\Programme\Microsoft not found

If I use the command above directly at the shell *without* the cmd /c part it
works properly!

I think I will ask also at alt.msdos.batch.nt if cmd /c has a special
problem.



Joachim 
###


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





If you replace Microsoft Office by its 8.3 equivalent (MICROS~1 or similar) 
you can leave out the quotes around it and it will still work OK, because 
there won't be spaces then, to be mistaken for separators.


Best regards,
Tony.
--
10.0 times 0.1 is hardly ever 1.0.


Re: External command with arguments (WinXP): cmd /c problem

2007-02-15 Thread Dr. Uwe Schneider
Hi Joachim!

This seems to correlate with the space in the directory name.

Try C:\Programme\Microsoft\ Office\Office10\OUTLOOK.EXE

Regards, Doc


Hm, this is strange, the windows shell cmd (not vim!) has problems with the
following:
cmd.exe /c C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE /a
c:\Dokumente und Einstellungen\hofjoa41\Eigene Dateien\test.txt

- C:\Programme\Microsoft not found

If I use the command above directly at the shell *without* the cmd /c part it
works properly!

I think I will ask also at alt.msdos.batch.nt if cmd /c has a special
problem.



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: Web-based editing [Was :wq vs ZZ]

2007-02-15 Thread A. S. Budden

On 15/02/07, A. S. Budden [EMAIL PROTECTED] wrote:

On 15/02/07, Pete Johns [EMAIL PROTECTED] wrote:
 On Thu, 2007-02-15 at 03:31:21 +0100, Bram Moolenaar sent:
 Web-based editor? Why not use Vim as your editor from within
 Firefox? Works a treat for me!  ViewSourceWith
 http://dafizilla.sourceforge.net/viewsourcewith/
 
 Don't see something about Vim here...
 
 Sorry, Bram, I should have mentioned that a little configuration
 is required here. I should also mention that ViewSourceWith does
 more than it says on the tin, insofar as you can do more than
 viewing source with it. It provides a menu item for you to launch
 your favourite text editor (Vim) from a textarea. I've been using
 it for a while now under Windows. I suspect that to use it under
 Linux then a shell script like the one you provided would be
 needed.

I use ViewSourceWith under Windows  Linux and it doesn't need a shell
script: it polls for changes to the file (I guess), so it doesn't
matter whether gvim is forked or not.  However, It's All Text sounds
rather nice, so I may well switch to that now!


I've tried It's All Text now and the 'ergonomics' are definitely better, but
ViewSourceWith has one considerable advantage in my book: it names the
temporary text files according to the name of the website (e.g. this one
is mail.google.com_mailmsgbodyta_81171540646705.txt).  This makes it
nice and easy to set Vim up to get the right file type:

au BufNewFile,BufRead mail.google.com_mailmsgbody* setf mail

It's All Text seems to just use a random string of numbers, so it's less
directly configurable.

Just my 2p's worth.

Al


typing cmds 2x for cygwin shell

2007-02-15 Thread Kev

I use the cygwin shell from within Vim by using the following in my _vimrc
: set shell=c:\cygwin\cygwin.bat
If I use :r!date to insert the current date, the shell will open and I 
have to type the command date again. Then after typing exit the 
shell exits and the date is placed in the buffer. Any suggestions on how 
to avoid typing the command a second time?

Thanks, Kevin


Re: External command with arguments (WinXP): cmd /c problem

2007-02-15 Thread Fan Decheng

A.J.Mechelynck wrote:

[EMAIL PROTECTED] wrote:
Hm, this is strange, the windows shell cmd (not vim!) has problems 
with the

following:

cmd.exe /c C:\Programme\Microsoft Office\Office10\OUTLOOK.EXE /a

c:\Dokumente und Einstellungen\hofjoa41\Eigene Dateien\test.txt

- C:\Programme\Microsoft not found

If I use the command above directly at the shell *without* the cmd /c 
part it

works properly!

I think I will ask also at alt.msdos.batch.nt if cmd /c has a special
problem.



Joachim ###

This message has been scanned by F-Secure Anti-Virus for Microsoft 
Exchange.

For more information, connect to http://www.f-secure.com/





If you replace Microsoft Office by its 8.3 equivalent (MICROS~1 or 
similar) you can leave out the quotes around it and it will still work 
OK, because there won't be spaces then, to be mistaken for separators.


Best regards,
Tony.


I've also encountered this problem many times since I often call cmd 
with /c in my scripts or programs. The answer to this problem may be 
strange, but at least I found one thing: if the path of the executable 
contains no space, don't quote it. However, if the path does contain a 
space, and the problem still arises, I don't know what to do.




RE: typing cmds 2x for cygwin shell

2007-02-15 Thread Dr. Uwe Schneider
@Kevin

vim passes the date command somehow to the shell invoked. If you set the shell 
to your script, which is calling the real shell, the information about to 
invoke the date command gets lost.

Regards, Doc

I use the cygwin shell from within Vim by using the following in my _vimrc
: set shell=c:\cygwin\cygwin.bat
If I use :r!date to insert the current date, the shell will open and I 
have to type the command date again. Then after typing exit the 
shell exits and the date is placed in the buffer. Any suggestions on how 
to avoid typing the command a second time?
Thanks, Kevin


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

2007-02-15 Thread James Kanze

On 2/15/07, Bram Moolenaar [EMAIL PROTECTED] wrote:


I'm using It's All Text! now.  Just had to create a shell script to
start gvim, because it doesn't allow you to give arguments to the
command.  I'm using this (on Unix, obviously):



#!/bin/sh
gvim -f $@


I can't seem to get it to work; gvim comes up all right, but as
if it was started without any file arguments.  Adding an echo to
the shell script shows that in fact, it isn't being passed any
arguments.  Is there something special I have to do in the
preferences of It's All Text! to tell it how to pass a
filename.


Store this in a file, make it executable, and set it from
Tools/Add-ons/It's All Text/Preferences



The plugin can be found here:
https://addons.mozilla.org/firefox/4125/



Warning: If you set the preferences to use Vim firefox gets stuck.


Not if you've started it from an xterm; vim comes up in the
xterm.  (But Firefox does hang until you exit vim.)

--
James Kanze (GABI Software)mailto:[EMAIL PROTECTED]
Conseils en informatique orientée objet/
  Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34


^M [Was] how to read the file created in PC in Linux correctly?

2007-02-15 Thread Guillaume Bog

On 15/02/07, frank wang [EMAIL PROTECTED] wrote:

Thanks for the help.

My gvim version is 7.0. The files are edited by Matlab editor. gvim
cannot automatically handle the ^M. No matter what file format I set.
The only thing to do is repleace them with

%s/\r/\r/g.


This ^M is hard to find in help and highly useful. Type ctrl-v then
ctrl-m and you can easily search for CR. I often do

:%s/ctrl-vctrl-m//g

and for tabs:

:%s/ctrl-vtab/  /g


save a file

2007-02-15 Thread Michael Phillips
How do you save a file in a vim script? I have a script that modify a file and
I want to save it.  After that send it to an external command. The last two
lines are the important ones.  Any help would be greatly appreciate it. 

exe normal! :%j\r
while search(div class=\vpc_bcc_cell\,Wc) != 0
  exe normal! d^
  exe normal! /\\\/div\r
  exe normal! 2nf
  exe normal! a\r\e
endwhile
exe normal! /\\\/div\r
exe normal! 2nf
exe normal! a\r\e
exe normal! :g!/^div/d\r
%s#^.*window.open('\([^']\+\)'.*thumb
src=\([^]\+\).*_link[^]\+\([^]\+\).*class=vpc_bcc_cell_text[^]*\([^]\+\).*$#\1br
/\r\2br /\r\3br /\r\4br /\rbr /\r#
%s//amp;/g
exe normal! gg
exe normal! Ihtmlheadtitle/title/headbody\e
exe normal! Go/body/html\e
exe normal! :upd
exe normal! :!firefox.exe \.expand(%:p).\\r


Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.


 

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news


Re: save a file

2007-02-15 Thread Tom Whittock

exe normal! :%j\r


Hello Michael.

vim script can be thought of as a series of ex commands (colon
commands), therefore the first line of your script could be rewritten:

%j

which should give a clue as to how you might want to *write* your file.

also, you probably don't need the exe command all the way through your
script - exe allows an arbitrary expression to be executed, so you can
include variables in the command.

You might think that your firefox command would need to use exe, since
you are including the expand() call to find the path, but the
following would work just as well:

!firefox %:p

HTH


Encoding problem

2007-02-15 Thread David Woodfall
I have a bit of a problem with encoding. A particular file (made in windows
btw) shows characters wrong in vim, but ok in gvim. Example:

¹²³€

(made by holding alt-gr key and typing 1234).

Gvim shows encoding as utf-8 as does vim, so I thought maybe it was a
problem with my terminal (mrxvt) but in Irssi I have set char-set as cp1252
and these characters show correctly in my term. CP1252 doesn't appear to be
an option in vim though. Also the pound £  sign doesn't show correctly.

Any ideas how to get around this problem?

-- 
A fractal is by definition a set for which the Hausdorff Besicovitch
dimension strictly exceeds the topological dimension.
-- Mandelbrot, The Fractal Geometry of Nature



AW: External command with arguments (WinXP): cmd /c problem workaround

2007-02-15 Thread j.hofmann


 -Ursprüngliche Nachricht-
 Von: A.J.Mechelynck [mailto:[EMAIL PROTECTED]
 If you replace Microsoft Office by its 8.3 equivalent 
 (MICROS~1 or similar) 

OK, this works:

C:\PROGRA~1\MI1933~1\OFFICE10\outlook.exe /a %:p 

I found this strange short path by calling command.com from cmd.com set to
the desired path before.

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/



How to get destructive backspace in command mode?

2007-02-15 Thread Larry Alkoff
What is the proper way to have a destructive backspace key in command 
mode that works like the X key in vim version 6.4.6.
That is, the backspace key should move to the left and delete the 
character there.


Currently my backspace key backspaces but does not delete the character 
to the left.  All other programs in my Kubuntu 6.10 work properly.


Insert mode works correctly.

Is it possible to 'alias' the X key to backspace?
I do not want to change any Linix config files except .vimrc
to prevent unwanted side effects.

Larry

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: How to get destructive backspace in command mode?

2007-02-15 Thread Tim Chase
What is the proper way to have a destructive backspace key in command 
mode that works like the X key in vim version 6.4.6.
That is, the backspace key should move to the left and delete the 
character there.


Currently my backspace key backspaces but does not delete the character 
to the left.  All other programs in my Kubuntu 6.10 work properly.


Insert mode works correctly.

Is it possible to 'alias' the X key to backspace?
I do not want to change any Linix config files except .vimrc


You can easily add the following line to your .vimrc:

nnoremap bs X

(typed literally with greater-than and less-than signs) which 
will do exactly as you describe, aliasing the backspace key to 
behave like X.


This is actually described here:

:help bs

You can learn more about vim's remapping abilities here:

:help :map

and more about the key-notation used:

:help 

-tim





Re: How to get destructive backspace in command mode?

2007-02-15 Thread Larry Alkoff

Tim Chase wrote:
What is the proper way to have a destructive backspace key in command 
mode that works like the X key in vim version 6.4.6.
That is, the backspace key should move to the left and delete the 
character there.


Currently my backspace key backspaces but does not delete the 
character to the left.  All other programs in my Kubuntu 6.10 work 
properly.


Insert mode works correctly.

Is it possible to 'alias' the X key to backspace?
I do not want to change any Linix config files except .vimrc


You can easily add the following line to your .vimrc:

nnoremap bs X

(typed literally with greater-than and less-than signs) which will do 
exactly as you describe, aliasing the backspace key to behave like X.


This is actually described here:

:help bs

You can learn more about vim's remapping abilities here:

:help :map

and more about the key-notation used:

:help 




Thanks for your very prompt reply Tim.

After putting 'nnoremap bs X
in ~.vimrc I see that backspace works differently than X.

X will move the cursor left, deleting the character that was there, and 
'pulling' all the text that was to the right over one character.


Backspace now deletes the character to the left and 'pulls' the text, 
but the cursor does not move.  The result is that repeated backspaces 
now delete text to the _right_ instead of to the _left_ as X does.


This is quite unnerving to a longtime 'deleter'  g

I read the three :help items you mentioned and tried
:set backspace=indent,eol,start
and
:set backspace=indent,eol,start
but neither did want I want.
Frankly I didn't understand what :he map was getting at.

Is there any way to get the conventional backspace behavior I'm used to?

Larry



--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: Help needed on pt_BR spell checking

2007-02-15 Thread Leonardo Fontenelle

Hello, Bram, thanks for the reply!

I'm sorry, but I can't find the famous $RUNTIMEPATH/spell/*.diff
files. They are don't seem to be part of the vim or the vim-spell-xx
packages in gentoo, and I can't find them in vim's ftp server. I can't
find the a-a-p recipes either... I'm sorry if this should be more
obvious, but I'm stuck.

When I can make a good pt_BR vimspell file I'll contact the pt_PT
people to see how are we going to maintain vim dictionaries.

Thanks!

Leonardo Ferreira Fontenelle

2007/2/9, Bram Moolenaar [EMAIL PROTECTED]:


Leonardo Fontenelle wrote:

 I made a pt.utf-8.spl from myspell-pt_BR, and placed it in ~/.vim/spell/.
 When I run :set spell spelllang=pt_BR, I get an error message:
 Warning: region BR not supported. My locale is pt_BR, and I'm sure
 vim knows about that because :lang yields pt_BR.UTF-8. Curiously,
 running :set spell spelllang=~/.vim/spell/pt.utf-8.spl works!

If you have a spell file without regions, use :set spl=pt.  The
distributed spell file has both pt_PT and pt_BR.  See runtime/spell/pt/
in the distributed runtime files (before installing).

 http://ftp.vim.org/vim/runtime/spell/README_pt.txt doesn't have any
 contact information for the maintainers, and logs changes up to 2002,
 when the pt_PT and pt_BR dictionaries where based on the ispell ones.

 Since then the br.ispell maintainer has disappeared, and the myspell
 dictionary developed by BrOffice.org (OOo's pt_BR community) became
 circa ten times larger than br.ispell. I released recently an updated
 aspell6-pt_BR based on BrOffice.org's dictionay, and would like
 everyone to have an updated pt_BR dictionary for vim.

 Please help me:
 - Use the custom dictionay without region not supported errors.
 - Contact the pt.ENC.(spl|sug) maintainers.
 - Understand how to create a sug file.
 - How the better way to talk to Bram about pt dict maintainership.

I'll be very glad if someone wants to take over maintaining the spell
file for a specific language.  Look in the directory mentioned above,
you will find *.diff files.  These need to be applied to new .dic and
.aff files, as much as possible.  More info in runtime/spell/README.txt.

Generating the files is done with an Aap script.  Installing Aap should
be easy, it only requires Python.

--
From know your smileys:
 |-(Contact lenses, but has lost them

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///



Re: Encoding problem

2007-02-15 Thread David Woodfall
SOLVED!

Well I think I fixed by rtfm: 

:set termenc=cp1252

Seems to work, but I don't know yet whether it breaks anything else.


On (15:20 15/02/07), David Woodfall [EMAIL PROTECTED] put forth the 
proposition:
 I have a bit of a problem with encoding. A particular file (made in windows
 btw) shows characters wrong in vim, but ok in gvim. Example:
 
 ¹²³€
 
 (made by holding alt-gr key and typing 1234).
 
 Gvim shows encoding as utf-8 as does vim, so I thought maybe it was a
 problem with my terminal (mrxvt) but in Irssi I have set char-set as cp1252
 and these characters show correctly in my term. CP1252 doesn't appear to be
 an option in vim though. Also the pound £  sign doesn't show correctly.
 
 Any ideas how to get around this problem?
 
 -- 
 A fractal is by definition a set for which the Hausdorff Besicovitch
 dimension strictly exceeds the topological dimension.
   -- Mandelbrot, The Fractal Geometry of Nature

-- 
The society which scorns excellence in plumbing as a humble activity
and tolerates shoddiness in philosophy because it is an exalted
activity will have neither good plumbing nor good philosophy ...
neither its pipes nor its theories will hold water.



Re: How to get destructive backspace in command mode?

2007-02-15 Thread Tim Chase

You can easily add the following line to your .vimrc:

nnoremap bs X


Thanks for your very prompt reply Tim.

After putting 'nnoremap bs X
in ~.vimrc I see that backspace works differently than X.

X will move the cursor left, deleting the character that was there, and 
'pulling' all the text that was to the right over one character.


Backspace now deletes the character to the left and 'pulls' the text, 
but the cursor does not move.  The result is that repeated backspaces 
now delete text to the _right_ instead of to the _left_ as X does.


It sounds like you might have had a trailing space after the X 
perhaps?  This would move the cursor forward one character after 
doing what should be the correct behavior.  So rather than 
nnoremap bs X  you have nnoremap bs X   (note the 
additional space)


You can type it directly at the command-line:

:nnoremap bs X

and experiment without having to reload vim (to reload your 
vimrc) each time.



This is quite unnerving to a longtime 'deleter'  g


Understandably :)


I read the three :help items you mentioned and tried
:set backspace=indent,eol,start


This controls the behavior of what to do when you hit the 
beginning of a line/indentation/start-of-edit which is a handy 
option to have when you want it, but it sounds like your 
difficulties lie elsewhere.



Frankly I didn't understand what :he map was getting at.


It is a somewhat confusing section of the help to understand.  It 
stems partially from the fact that mappings are such powerful 
things, it's hard to make their description simple.  The whole 
file in which you arrive


:help map.txt

has volumes of information that elucidate the dark corners of 
mappings, but perhaps at the cost of clarity.


I suspect that an extra trailing-space slipped in, and that its 
removal should solve your problem, as the mapping worked for me 
as you want.


-tim








Re: How to get destructive backspace in command mode?

2007-02-15 Thread Larry Alkoff

Tim Chase wrote:

You can easily add the following line to your .vimrc:

nnoremap bs X


Thanks for your very prompt reply Tim.

After putting 'nnoremap bs X
in ~.vimrc I see that backspace works differently than X.

X will move the cursor left, deleting the character that was there, 
and 'pulling' all the text that was to the right over one character.


Backspace now deletes the character to the left and 'pulls' the text, 
but the cursor does not move.  The result is that repeated backspaces 
now delete text to the _right_ instead of to the _left_ as X does.


It sounds like you might have had a trailing space after the X 
perhaps?  This would move the cursor forward one character after doing 
what should be the correct behavior.  So rather than nnoremap bs X  
you have nnoremap bs X   (note the additional space)


You can type it directly at the command-line:

:nnoremap bs X

and experiment without having to reload vim (to reload your vimrc) each 
time.



This is quite unnerving to a longtime 'deleter'  g


Understandably :)


I read the three :help items you mentioned and tried
:set backspace=indent,eol,start


This controls the behavior of what to do when you hit the beginning of a 
line/indentation/start-of-edit which is a handy option to have when you 
want it, but it sounds like your difficulties lie elsewhere.



Frankly I didn't understand what :he map was getting at.


It is a somewhat confusing section of the help to understand.  It stems 
partially from the fact that mappings are such powerful things, it's 
hard to make their description simple.  The whole file in which you arrive


:help map.txt

has volumes of information that elucidate the dark corners of mappings, 
but perhaps at the cost of clarity.


I suspect that an extra trailing-space slipped in, and that its removal 
should solve your problem, as the mapping worked for me as you want.


Yes Tim that's exactly what happened.  Got rid of the extraneous 
character and backspace is working perfectly now.


Thanks very much for your help.

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Status Line problems on buffer refresh

2007-02-15 Thread Justin Randall
Hi everyone,

I've been having a problem with the non-gui mode of vim in any terminal 
emulator (xterm, gnome-terminal etc.). The problem is that whenever I try to 
scroll down the buffer, the status line becomes part of the buffer and scrolls 
up along with the rest of the text file. It's difficult to describe, so I've 
attached my personal .vimrc so that anyone can point out some obvious problems. 
I'd like to have the statusline always shown in both vim and gvim. I'm also 
trying to make it so that vim and gvim can both use my .vimrc flawlessly. The 
statusline works perfectly in gvim at the moment and the only time this problem 
occurs is with regular (inside a terminal) vim.

I think the best way to re-crate my problem would be to load up vim in a 
terminal with my .vimrc and press the down key until the buffer starts to 
scroll down the screen. It's possible that this problem is not related to vim 
or my configuration at all, and it's something to do with my X environment. 

Thanks for any help you can give me
Justin

P.S. Also if anybody would like a screen shot of my problem (I can't send .png 
files to the list) then just send me an email and I'll be more than happy to 
oblige. 




 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

.vimrc
Description: Binary data


Re: :wq vs ZZ

2007-02-15 Thread Richard England

 Theerasak Photha wrote the following on 02/13/2007 04:55 PM:

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


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


s/warrior/masochist/


s/vi/emacs/



Re: :wq vs ZZ

2007-02-15 Thread Theerasak Photha

On 2/15/07, Richard England [EMAIL PROTECTED] wrote:

 Theerasak Photha wrote the following on 02/13/2007 04:55 PM:
 On 2/13/07, Gene Kwiecinski [EMAIL PROTECTED] wrote:

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

 s/warrior/masochist/

s/vi/emacs/


To be fair, I think I'd rather use Emacs than something like elvis. *ULCH*

Brand me a heretic if you must.


Re: searching for a string that has many '/' characters

2007-02-15 Thread malahal
Gary Johnson [EMAIL PROTECTED] wrote:
 On 2007-02-02, [EMAIL PROTECTED] wrote:
  I have a string that has lots of forward slashes. I need to search it
  and delete it (e.g. unix path name).  I could use a backslash for
  everything forward slash and find it in vim. Is there a way I need not
  do that? For now, I use 'grep -n' to get the line number and then delete
  it. I don't actually type the string, I just use cut-and-paste!
 
 In addition to the techniques mentioned by others, you could just 
 search backwards instead of forwards, e.g.,
 
 ?/path/to/file

This works great! Thank you all for your responses.


Re: Workspace concept ala TextPad

2007-02-15 Thread Yegappan Lakshmanan

Hi Eric,

On 2/14/07, Eric Leenman [EMAIL PROTECTED] wrote:

Hi Yeggapan,

[...]
You can try using the workspace manager plugin:

http://vim.sourceforge.net/scripts/script.php?script_id=1410
[...]

I got it so far working.
One question.
When I give the command af(AddFile) in the filebuffer, the plugin comes
with
the message give file name (or something like that)
Do you then need to type the complete path (i.e.
C:\Projects\FPGA\VHDL\test.vhdl)
Or can you browse to it ?



In the prompt for adding a file to the workspace, you have to enter
the filename.
If you are using Vim7, you can make the attached change to the workspace
plugin to get filename completion at this prompt. With this change, you can
complete directory and filenames at the prompt.

- Yegappan

***
*** 521,527 
 let file_names = a:args

 if file_names == ''
! let file_names = input(Enter file name(s): )
 if file_names == ''
 return
 endif
--- 521,527 
 let file_names = a:args

 if file_names == ''
! let file_names = input(Enter file name(s): , '', 'file')
 if file_names == ''
 return
 endif


Re: entering copied text into command mode?

2007-02-15 Thread Theerasak Photha

On 2/15/07, Lev Lvovsky [EMAIL PROTECTED] wrote:

I often find myself copy/pasting via my GUI text that I might have on
the screen, and then pasting it into the command to be performed - is
there any way to cut/paste text into the command area when I have it
highlighted with just the keyboard?


Assuming you're talking about ex commands, yes.

You can type Ctrl-R to insert a register, then the name of any
register, including the expression register, =. In your case, the name
would probably be '+', so Ctrl-R+.


Re: :wq vs ZZ

2007-02-15 Thread Theerasak Photha

On 2/15/07, Kev [EMAIL PROTECTED] wrote:


My opinion, emacs and Vim are very powerful editors. (obvious)
I used emacs for years.  Within months of trying Vim, I was much more
productive.
Once you learn the basics and begin to build, you'll be amazed at what
you can
accomplish with Vim.
Kevin


Vim's design is *theoretically* limited compared to Emacs'. However,
working with Emacs (ESPECIALLY anything i18n) is a black art, and
Vim's support for things like Python editing is better de facto
because of the community.

Ultimately, Emacs doesn't do much of signifigance (i.e., related to
editing) better outside of Lisp.

python-mode.el, for instance, is barely worth mentioning.


entering copied text into command mode?

2007-02-15 Thread Lev Lvovsky
I often find myself copy/pasting via my GUI text that I might have on  
the screen, and then pasting it into the command to be performed - is  
there any way to cut/paste text into the command area when I have it  
highlighted with just the keyboard?


thanks!
-lev


Re: Encoding problem

2007-02-15 Thread A.J.Mechelynck

David Woodfall wrote:

SOLVED!

Well I think I fixed by rtfm: 


:set termenc=cp1252

Seems to work, but I don't know yet whether it breaks anything else.


'termencoding' tells Vim (in both the Console and GUI versions) how your 
keyboard translates data and (in the Console version only) how the terminal 
displays it. By default it is set to empty, which means use the value of 
'encoding'. This is OK as long as you don't change 'encoding' in your vimrc. 
If you do, then it is prudent to save in 'termencoding' your locale 
encoding, i.e., whatever 'encoding' was set to at startup, like this:


if has(multi_byte)if not, we don't have Unicode support
  if enc !~? '^u'  if 'encoding' starts with u or U,
then Unicode is already set
let tenc = encavoid clobbering the keyboard encoding
set enc=utf-8
  endif
  set fencs=ucs-bom,utf-8,latin1heuristics for existing files
  setglobal bomb fenc=latin1defaults for newly-created files
else
  echomsg Warning: No multibyte support
endif
 the following adds (among other things) the current 'fileencoding'
 to the statusline text
if has(statusline)
  exe 'set statusline=%%f\ %h%m%r%=%k[%{(fenc\ '
  \ . '==\ \\?enc:fenc).(bomb?\,BOM\:\\)}]\ %l,%c%V[%b=0x%02B]\ %P'
endif



Best regards,
Tony.
--
All true wisdom is found on T-shirts.


Re: entering copied text into command mode?

2007-02-15 Thread Gary Johnson
On 2007-02-15, Theerasak Photha [EMAIL PROTECTED] wrote:
 On 2/15/07, Lev Lvovsky [EMAIL PROTECTED] wrote:
  I often find myself copy/pasting via my GUI text that I might have on
  the screen, and then pasting it into the command to be performed - is
  there any way to cut/paste text into the command area when I have it
  highlighted with just the keyboard?
 
 Assuming you're talking about ex commands, yes.
 
 You can type Ctrl-R to insert a register, then the name of any
 register, including the expression register, =. In your case, the name
 would probably be '+', so Ctrl-R+.

I tried this on a Sun machine running vim in an xterm and running 
just gvim.  In both cases, '+' didn't work but '*' did.

HTH,
Gary

-- 
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
 | Spokane, Washington, USA


Re: tips project

2007-02-15 Thread Gary Johnson
On 2007-02-16, Bram Moolenaar [EMAIL PROTECTED] wrote:
 Hi all,
 
 Google code has now added support for a wiki.  This means open source
 projects can have a wiki that's free, fast and reliable (hopefully :-).
 
   http://code.google.com/hosting/
 
 During my presentation last Tuesday the idea came up (again) to move the
 Vim tips to a wiki.  The big advantage is that instead of having to read
 the notes below the tip to find out about improvements, the notes can be
 added in the right place, or even correct mistakes in the tip.
 
 I would like to ask for volunteers who want to take the current tips and
 notes, write some kind of script to move them to the wiki and set it up
 for use.  If this works well we can delete the tips from the Vim
 website.  They are currently closed for updates anyway, thus this is a
 good time to try it.

Can one get an RSS feed from a wiki?

Gary

-- 
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
 | Spokane, Washington, USA


Re: entering copied text into command mode?

2007-02-15 Thread A.J.Mechelynck

Theerasak Photha wrote:

On 2/15/07, Lev Lvovsky [EMAIL PROTECTED] wrote:

I often find myself copy/pasting via my GUI text that I might have on
the screen, and then pasting it into the command to be performed - is
there any way to cut/paste text into the command area when I have it
highlighted with just the keyboard?


Assuming you're talking about ex commands, yes.

You can type Ctrl-R to insert a register, then the name of any
register, including the expression register, =. In your case, the name
would probably be '+', so Ctrl-R+.



Of course, you should first copy the text to the clipboard in whatever program 
you're pasting from. Register + is the Vim name for the clipboard. Under 
Windows, but not under X11, register * is another name for the same thing.


If you're pasting within a single instance of Vim, then you don't have to go 
through the clipboard: just yank any text using one of the following:


y{motion}
to yant what the cursor moves over, or
[count]yy
to yank one (or [count]) line(s), or
{Visual}y
to yank the highlighted text;

then, in Command-line mode or in Insert mode, Ctrl-R  (i.e., 
control-R-for-Romeo double-quote) will insert the default register (containing 
whatever you just yanked).


Best regards,
Tony.
--
But soft you, the fair Ophelia:
Ope not thy ponderous and marble jaws,
But get thee to a nunnery -- go!
-- Mark The Bard Twain


Fwd: entering copied text into command mode?

2007-02-15 Thread Theerasak Photha

-- Forwarded message --
From: Theerasak Photha [EMAIL PROTECTED]
Date: Feb 15, 2007 8:45 PM
Subject: Re: entering copied text into command mode?
To: A. J. Mechelynck [EMAIL PROTECTED]

OOPS

On 2/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:


Of course, you should first copy the text to the clipboard in whatever program
you're pasting from. Register + is the Vim name for the clipboard. Under
Windows, but not under X11, register * is another name for the same thing.


On my system, + is for the Gtk clipboard, * is for the X clipboard.

Subtle difference.


Re: tips project

2007-02-15 Thread A.J.Mechelynck

Bram Moolenaar wrote:

Hi all,

Google code has now added support for a wiki.  This means open source
projects can have a wiki that's free, fast and reliable (hopefully :-).

http://code.google.com/hosting/

During my presentation last Tuesday the idea came up (again) to move the
Vim tips to a wiki.  The big advantage is that instead of having to read
the notes below the tip to find out about improvements, the notes can be
added in the right place, or even correct mistakes in the tip.

I would like to ask for volunteers who want to take the current tips and
notes, write some kind of script to move them to the wiki and set it up
for use.  If this works well we can delete the tips from the Vim
website.  They are currently closed for updates anyway, thus this is a
good time to try it.

Using the project name VimTips would be good.  Please don't create it
unless you are going to set up the wiki!



Ideally, the bulk of the work should be done by what wikis call a robot, 
i.e., some preprogrammed script. There will probably be a need for some 
hand-editing thereafter though.


Best regards,
Tony.
--
I'm fed up to the ears with old men dreaming up wars for young men to
die in.
-- George McGovern


Re: Encoding problem

2007-02-15 Thread A.J.Mechelynck

A.J.Mechelynck wrote:

David Woodfall wrote:

SOLVED!

Well I think I fixed by rtfm:
:set termenc=cp1252

Seems to work, but I don't know yet whether it breaks anything else.


'termencoding' tells Vim (in both the Console and GUI versions) how your 
keyboard translates data and (in the Console version only) how the 
terminal displays it. By default it is set to empty, which means use 
the value of 'encoding'. This is OK as long as you don't change 
'encoding' in your vimrc. If you do, then it is prudent to save in 
'termencoding' your locale encoding, i.e., whatever 'encoding' was set 
to at startup, like this:


ERRATUM



if has(multi_byte)if not, we don't have Unicode support
  if enc !~? '^u'  if 'encoding' starts with u or U,
then Unicode is already set


  if tenc == 


let tenc = encavoid clobbering the keyboard encoding


  endif


set enc=utf-8
  endif
  set fencs=ucs-bom,utf-8,latin1heuristics for existing files
  setglobal bomb fenc=latin1defaults for newly-created files
else
  echomsg Warning: No multibyte support
endif
 the following adds (among other things) the current 'fileencoding'
 to the statusline text
if has(statusline)
  exe 'set statusline=%%f\ %h%m%r%=%k[%{(fenc\ '
  \ . '==\ \\?enc:fenc).(bomb?\,BOM\:\\)}]\ %l,%c%V[%b=0x%02B]\ 
%P'

endif



Best regards,
Tony.


Best regards,
Tony.
--
Wagner's music is better than it sounds.
-- Mark Twain


Re: entering copied text into command mode?

2007-02-15 Thread Gary Johnson
On 2007-02-16, A.J.Mechelynck [EMAIL PROTECTED] wrote:
 Theerasak Photha wrote:
  On 2/15/07, Lev Lvovsky [EMAIL PROTECTED] wrote:
  I often find myself copy/pasting via my GUI text that I might have on
  the screen, and then pasting it into the command to be performed - is
  there any way to cut/paste text into the command area when I have it
  highlighted with just the keyboard?
 
  Assuming you're talking about ex commands, yes.
 
  You can type Ctrl-R to insert a register, then the name of any
  register, including the expression register, =. In your case, the name
  would probably be '+', so Ctrl-R+.
 
 
 Of course, you should first copy the text to the clipboard in 
 whatever program you're pasting from.

Under X11, at least on my system, you don't have to explicitly yank 
or copy the text:  text highlighted by the mouse automatically goes 
into the cut buffer (or the selection--I can't keep the two 
straight).  The last text highlighted with the mouse is immediately 
available in the * register.

Regards,
Gary

-- 
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
 | Spokane, Washington, USA


Re: Fwd: entering copied text into command mode?

2007-02-15 Thread A.J.Mechelynck

Theerasak Photha wrote:

-- Forwarded message --
From: Theerasak Photha [EMAIL PROTECTED]
Date: Feb 15, 2007 8:45 PM
Subject: Re: entering copied text into command mode?
To: A. J. Mechelynck [EMAIL PROTECTED]

OOPS

On 2/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Of course, you should first copy the text to the clipboard in whatever 
program
you're pasting from. Register + is the Vim name for the clipboard. 
Under
Windows, but not under X11, register * is another name for the same 
thing.


On my system, + is for the Gtk clipboard, * is for the X clipboard.

Subtle difference.



I don't know what the Gtk clipboard might be. On my system, + is for 
whatever is used for Edit = Copy, Edit = Cut and Edit = Paste in any 
X11 programs regardless of whether or not they are using Gtk widgets 
(Konqueror, for instance, uses Qt widgets and it has access to that same 
clipboard). I don't use the * register but I've been told it's used by 
middle-mouse pasting.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
35. Your husband tells you he's had the beard for 2 months.


Re: Fwd: entering copied text into command mode?

2007-02-15 Thread Theerasak Photha

On 2/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:


I don't know what the Gtk clipboard might be. On my system, + is for
whatever is used for Edit = Copy, Edit = Cut and Edit = Paste in any
X11 programs regardless of whether or not they are using Gtk widgets
(Konqueror, for instance, uses Qt widgets and it has access to that same
clipboard). I don't use the * register but I've been told it's used by
middle-mouse pasting.


Gtk and Qt share this clipboard then. Cool.


Re: entering copied text into command mode?

2007-02-15 Thread A.J.Mechelynck

Gary Johnson wrote:

On 2007-02-16, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Theerasak Photha wrote:

On 2/15/07, Lev Lvovsky [EMAIL PROTECTED] wrote:

I often find myself copy/pasting via my GUI text that I might have on
the screen, and then pasting it into the command to be performed - is
there any way to cut/paste text into the command area when I have it
highlighted with just the keyboard?

Assuming you're talking about ex commands, yes.

You can type Ctrl-R to insert a register, then the name of any
register, including the expression register, =. In your case, the name
would probably be '+', so Ctrl-R+.

Of course, you should first copy the text to the clipboard in 
whatever program you're pasting from.


Under X11, at least on my system, you don't have to explicitly yank 
or copy the text:  text highlighted by the mouse automatically goes 
into the cut buffer (or the selection--I can't keep the two 
straight).  The last text highlighted with the mouse is immediately 
available in the * register.


Regards,
Gary



Maybe -- I've never understood how to properly use the * register under X11. 
What comes from Edit = Copy (or Ctrl-C) in some non-Vim program arrives in 
the + register in gvim, and what I yank into the + register in gvim is 
available for Edit = Paste (or Ctrl-V) in any non-Vim program -- those I 
can understand.


Best regards,
Tony.
--
Confidence is the feeling you have before you understand the
situation.


Re: entering copied text into command mode?

2007-02-15 Thread Theerasak Photha

On 2/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:


Maybe -- I've never understood how to properly use the * register under X11.
What comes from Edit = Copy (or Ctrl-C) in some non-Vim program arrives in
the + register in gvim, and what I yank into the + register in gvim is
available for Edit = Paste (or Ctrl-V) in any non-Vim program -- those I
can understand.


Simple. You select text, keep it selected, and then middle click
somewhere to paste in. In Vim, you can of course use the * register.

If you don't have a middle button or don't care to set up
EmulateThreeButtons (click both buttons), depressing the mouse wheel
until it goes *click* does the same thing.

P.S. -- Don't use a Sun mouse with a PC even if it does have 3
buttons. Trust me.


--
Confidence is the feeling you have before you understand the
situation.


LOL @ your sig.


Re: entering copied text into command mode?

2007-02-15 Thread A.J.Mechelynck

Theerasak Photha wrote:

On 2/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

[...]

--
Confidence is the feeling you have before you understand the
situation.


LOL @ your sig.



  :-) Courtesy of the fortune program available on SuSE Linux. (One time in 
five I vary it with the fortunes from Bram's site).


Best regards,
Tony.
--
One seldom sees a monument to a committee.


Re: Feature request: off_t / off64_t

2007-02-15 Thread Mathieu Malaterre

On 2/8/07, Bram Moolenaar [EMAIL PROTECTED] wrote:


Mathieu Malaterre wrote:

   Could someone please add off_t / off64_t to the C syntax file.

I'll add off_t, I think it's a generic type.

I don't know off64_t.  Is that for Linux?


Yeah I am not sure, leave it alone. This comes from the 64bits hackish
API to read large file on unix. I don't know what microsoft came up
with. I guess they use __int64.

-Mathieu


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

2007-02-15 Thread Cameron Simpson
On 15Feb2007 15:30, James Kanze [EMAIL PROTECTED] wrote:
| On 2/15/07, Bram Moolenaar [EMAIL PROTECTED] wrote:
| I'm using It's All Text! now.  Just had to create a shell script to
| start gvim, because it doesn't allow you to give arguments to the
| command.  I'm using this (on Unix, obviously):
| 
| #!/bin/sh
| gvim -f $@
| 
| I can't seem to get it to work; gvim comes up all right, but as
| if it was started without any file arguments.  Adding an echo to
| the shell script shows that in fact, it isn't being passed any
| arguments.  Is there something special I have to do in the
| preferences of It's All Text! to tell it how to pass a
| filename.

Um, no? It should just work. IAT only lets you supply the path to the
edit command, so it must pass the file as an argument - it seems to for
my setup. You're certain the script gets not arguments - you're echoing
$# and $* ?

| Store this in a file, make it executable, and set it from
| Tools/Add-ons/It's All Text/Preferences
| 
| The plugin can be found here:
| https://addons.mozilla.org/firefox/4125/
| 
| Warning: If you set the preferences to use Vim firefox gets stuck.
| 
| Not if you've started it from an xterm; vim comes up in the
| xterm.  (But Firefox does hang until you exit vim.)

That's surprising.
-- 
Cameron Simpson [EMAIL PROTECTED] DoD#743
http://www.cskk.ezoshosting.com/cs/

Do not go gentle into that good night. Old age should burn and rave at the
closing of the day.  Rage, rage at the dying of the light!


Re: Feature request: off_t / off64_t

2007-02-15 Thread Cameron Simpson
On 15Feb2007 22:59, Mathieu Malaterre [EMAIL PROTECTED] wrote:
| On 2/8/07, Bram Moolenaar [EMAIL PROTECTED] wrote:
| Mathieu Malaterre wrote:
|Could someone please add off_t / off64_t to the C syntax file.
| 
| I'll add off_t, I think it's a generic type.
| I don't know off64_t.  Is that for Linux?
| 
| Yeah I am not sure, leave it alone. This comes from the 64bits hackish
| API to read large file on unix. I don't know what microsoft came up
| with. I guess they use __int64.

It's a standard type for POSIX. Include it! Look in unistd.h.
-- 
Cameron Simpson [EMAIL PROTECTED] DoD#743
http://www.cskk.ezoshosting.com/cs/

It's there as a sop to former Ada programmers.  :-)
- Larry Wall regarding 10_000_000 in [EMAIL PROTECTED]


Re: Help needed on pt_BR spell checking

2007-02-15 Thread Bram Moolenaar

Leonardo Fontenelle wrote:

 Hello, Bram, thanks for the reply!
 
 I'm sorry, but I can't find the famous $RUNTIMEPATH/spell/*.diff
 files. They are don't seem to be part of the vim or the vim-spell-xx
 packages in gentoo, and I can't find them in vim's ftp server. I can't
 find the a-a-p recipes either... I'm sorry if this should be more
 obvious, but I'm stuck.
 
 When I can make a good pt_BR vimspell file I'll contact the pt_PT
 people to see how are we going to maintain vim dictionaries.

You can find the spell *.diff files in the Unix archive and the PC
runtime archive.

-- 
hundred-and-one symptoms of being an internet addict:
131. You challenge authority and society by portnuking people

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


vim on calcs, PDAs, palms

2007-02-15 Thread John Doe
Calculators these days have plenty of RAM on them, as do the other
hand-held gadgets. C (cross)compilers exist for them all. I'd like to
know if any ports of vim to them are supported out of the box, without
changing the code. I've seen ports of vim to odd architectures, but I
think some of the ports have not been merged into vim's source code.


Re: entering copied text into command mode?

2007-02-15 Thread Erlend Hamberg
On Friday 16 February 2007, A.J.Mechelynck wrote:
 Maybe -- I've never understood how to properly use the * register under
 X11. What comes from Edit = Copy (or Ctrl-C) in some non-Vim program
 arrives in the + register in gvim, and what I yank into the + register in
 gvim is available for Edit = Paste (or Ctrl-V) in any non-Vim program --
 those I can understand.

In short:
X has, in addition to the regular clipboard, a selection buffer.
When you copy/cut text, it is placed in the clipboard (register + in vim). 
When you select text with the mouse it's placed in the selection buffer 
(register * in vim) without touching the clipboard.
-- 
Erlend Hamberg
[EMAIL PROTECTED]


setlocal enc=utf8 and mappings

2007-02-15 Thread DervishD
Hi all :)

I'm having a problem that I know how to solve, but I wonder if I'm
doing the right thing...

Some weeks ago I asked a couple of things about encodings on the
list, and based on the answers, I finally did a proper setup to edit
UTF-8 files from time to time in my latin1 terminal, while at the same
time treating new ASCII files as latin1 and not utf-8. This works OK.

But now my problem is the following. I've chosen ç as my
mapleader. This is due its position in my keyboard. BUT, its code in
latin1 is 0xe7 and, in utf8 it's 0xc3+0xa7.

This means (and this is my problem) that if I set setlocal
enc=utf8, I'm no longer able to use it as my mapleader as-is. I still
generate ç when I press it, of course, and vim translates it onto
something my terminal understands as ç. I assumed that it was doing
the same for mappings, but it is not.

Am I doing anything wrong? Should I set another thing so even with
enc=utf8 my high-bit-set-mapleader still works? Should I set
mapleader to the utf8 value?

Thanks a lot in advance :)

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!