Re: Bad QUOTESED expression in src/Makefile

2006-08-31 Thread A.J.Mechelynck

Alexey I. Froloff wrote:

* A.J.Mechelynck antoine.mechelynck@ [060831 02:48]:
Hmmm... it seems you configured a nonstandard location for your system 
vimrc and gvimrc.

I have CFLAGS with escaped quotes.  Backslashes should be escaped
too.

; compiling pathdef.c gives me no errors or warnings whatsoever. How did 
you configure yours?

CFLAGS=-DSYS_VIMRC_FILE=\/etc/vim/vimrc\ 
-DSYS_GVIMRC_FILE=\/etc/vim/gvimrc\



Try removing that line (undefining $CFLAGS), running make reconfig and 
making soft links, as follows:


cd /usr/local/vim
ln -sv /etc/vimrc /etc/gvimrc .

(don't forget the dot at the end). The -v (verbose) is optional; the -s 
is required to make a soft link. This way, when gvim looks for the 
system vimrc and gvimrc in $VIM, it will find your /etc/vimrc and 
/etc/gvimrc.



I see a configure argument --prefix, but I guess that's not what you 
want. The above assumes that you aren't using it, but the principle is 
the same if you are.



Best regards,
Tony.


Re: Fixing cweb.vim

2006-08-31 Thread Charles E Campbell Jr

David Brown wrote:


A.J.Mechelynck wrote:
 David Brown wrote:

 What I'm having difficulty with is figuring out what to put there.  Is
 there a way of finding out what region a given part of the buffer 
is in?


 I'm not a specialist of these matters; but try help completion on synID

Well, I did figure out how to get cweb working, by adding the line:

 syntax cluster texFoldGroup add=webCpart

to cweb.tex.  I figured this out by tracing through tex.vim by hand and
by finding a group that nearly everything included.  I still don't 
know how

to debug these, but at least I got things working.


That's the folding support stuff.  Folks wanted to have syntax-based folding
for LaTeX for things like sections, subsections, chapters, etc.  Hence, 
these

things had to be in foldable regions.

Glad you figured it out!
Chip Campbell



The location of dialog box

2006-08-31 Thread Akria Sheng

The dialog box which notice the file changed somtimes appear at strange
location.

my environment: 
1. vim7.0(gtk) 
2. Hummingbird Exceed to connect server and the display mode is multiple.
It make the total task will appear on the taskbar of winXP, like a
normal windows program.

When I click the vim windows with one file changed, the dialog box will
appear at the location which mouse click.
If I click the button of vim  on the taskbar, the dialog box will appear
below the taskbar.
It make user can't operate the dialog box by mouse and user can't see any
information on the dialog box.

If I do the same with vim64 or vim70(gnome or gtk2), the dialog box will
appear at the center of screen.
-- 
View this message in context: 
http://www.nabble.com/The-location-of-dialog-box-tf2194698.html#a6073769
Sent from the Vim - General forum at Nabble.com.



Re: vim modes switching problem

2006-08-31 Thread Radoslaw Garbacz
On Wednesday 30 August 2006 15:18, Benji Fisher wrote:
 On Thu, Aug 24, 2006 at 12:17:45PM +0200, Radoslaw Garbacz wrote:
   I have a problem with switching from the command-line mode to the normal
  one and back to the command-line.

 :help :execute
 
 Thank you very much for the hint.

-- 

Mit freundlichen Gruessen
Best regards
   
.Radoslaw Garbacz
.aycan Digitalsysteme GmbH
.Innere Aumuehlstrasse 5
.97076 Wuerzburg  .  Germany
.+49.(0)9 31.270 40 9.0  .  phone
.+49.(0)9 31.270 40 9.1  .  fax
.mailto:[EMAIL PROTECTED]
.http://www.aycan.de


Re: I have got one ml_get error

2006-08-31 Thread A.J.Mechelynck

Akria Sheng wrote:

I have got one error to crash vim.
It happened when meet the following condition:
   A. must in Linux(solaris and winxp is OK)
   B. vim7.0(6.4 is ok)
   C. open one huge file(exceed 368710 bytes) then type :sp ./

   In general, it will split one window to show the filebrowse.
   But Vim will crash.
   I don't know how to avoid this crash.

   There are two appendixed report file:
http://www.nabble.com/user-files/235811/bugreport.txt bugreport.txt 
http://www.nabble.com/user-files/235812/buginfo.txt buginfo.txt 





Do you see it every time? On this Linux box I have here one Vim session 
with a file of more than a million /lines/, 33.6 MB (almost 100 times as 
big as yours: a modified version of Unihan.txt from the Unicode site). I 
did :sp ./ and gvim opened a netrw window on my current directory with 
no prob. And yet, I have a somewhat fancier installation than you do, 
what with a GNOME2 GUI, a few user scripts, a color scheme... But I have 
1GB of live RAM and my CPU is an AMD running at 1.2 GHz (not that gvim 
uses it all, X and Firefox have the biggest memory allocations, and 
Firefox is also the most greedy of my CPU time). Also, I'm 76 bugfixes 
ahead of you. (Yours is 7.0.000.) Maybe you should apply the 76 patches 
published so far (at ftp://ftp.vim.org/pub/vim/patches/7.0/ ) and see if 
the problem recurs? See at (ftp: or) 
http://ftp.vim.org/pub/vim/patches/7.0/README what these patches are all 
about.



Best regards,
Tony.


Re: I have got one ml_get error

2006-08-31 Thread Akria Sheng


A.J.Mechelynck wrote:
 
 Akria Sheng wrote:
 I have got one error to crash vim.
 It happened when meet the following condition:
A. must in Linux(solaris and winxp is OK)
B. vim7.0(6.4 is ok)
C. open one huge file(exceed 368710 bytes) then type :sp ./
 
In general, it will split one window to show the filebrowse.
But Vim will crash.
I don't know how to avoid this crash.
 
There are two appendixed report file:
 http://www.nabble.com/user-files/235811/bugreport.txt bugreport.txt 
 http://www.nabble.com/user-files/235812/buginfo.txt buginfo.txt 
 
 
 
 Do you see it every time? On this Linux box I have here one Vim session 
 with a file of more than a million /lines/, 33.6 MB (almost 100 times as 
 big as yours: a modified version of Unihan.txt from the Unicode site). I 
 did :sp ./ and gvim opened a netrw window on my current directory with 
 no prob. And yet, I have a somewhat fancier installation than you do, 
 what with a GNOME2 GUI, a few user scripts, a color scheme... But I have 
 1GB of live RAM and my CPU is an AMD running at 1.2 GHz (not that gvim 
 uses it all, X and Firefox have the biggest memory allocations, and 
 Firefox is also the most greedy of my CPU time). Also, I'm 76 bugfixes 
 ahead of you. (Yours is 7.0.000.) Maybe you should apply the 76 patches 
 published so far (at ftp://ftp.vim.org/pub/vim/patches/7.0/ ) and see if 
 the problem recurs? See at (ftp: or) 
 http://ftp.vim.org/pub/vim/patches/7.0/README what these patches are all 
 about.
 
 
 Best regards,
 Tony.
 
 

I have already do the same test on vim with 76 patches, but it still
happened every time.
I have generate another big file for test, and it has the same error.
The vim70 on solaris is complied with the same complie-option and this has
no error.

I try to test the script of vim, and found the script
runtime/autoload/netrw.vim#4240,4242 is involved.
If I comment the two lines, Vim will not crash.
But I have no sense about this modification.

Best regards,
Akria Sheng
-- 
View this message in context: 
http://www.nabble.com/I-have-got-one-%22ml_get%22-error-tf2194557.html#a6074515
Sent from the Vim - General forum at Nabble.com.



Re: Can I make my sesion forget it's a session

2006-08-31 Thread Marius Roets

On 8/30/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:



A session is not only a number of settings, it's also one or more
editfiles etc. To make a session forget all that makes it a session, use

:qa

followed by

vim

or

gvim

(the latter may be entered in an Alt-F2 popup). Once you are satisfied
that you have what you want, use the :mksession command (q.v.). Or, if
you have a GNOME build of gvim, you can log out of the (kde or GNOME)
window manager and let gvim save its session transparently.

See
:help :mksession
:help :mkview
:help -o
:help -S
:help gnome-session

If the above (starting a new session afresh) is too drastic for you, you
may _first_ use :mksession, then edit the session file (e.g. by removing
the settings you don't want anymore) and finally :qa and gvim -S

Best regards,
Tony.


Hi Tony,
Thank for your suggestions. These were the sort of solutions I had in
mind, I was just hoping there might be something simpler. It just
means, for each session I have to reopen every window the way it was,
and then save the session again, which is what I was trying to avoid.
But if there is no other way.

Thanks
Marius


Re: I have got one ml_get error

2006-08-31 Thread Akria Sheng



A.J.Mechelynck wrote:
 
 Akria Sheng wrote:
 
 A.J.Mechelynck wrote:
 Akria Sheng wrote:
 I have got one error to crash vim.
 It happened when meet the following condition:
A. must in Linux(solaris and winxp is OK)
B. vim7.0(6.4 is ok)
C. open one huge file(exceed 368710 bytes) then type :sp ./

In general, it will split one window to show the filebrowse.
But Vim will crash.
I don't know how to avoid this crash.

There are two appendixed report file:
 http://www.nabble.com/user-files/235811/bugreport.txt bugreport.txt 
 http://www.nabble.com/user-files/235812/buginfo.txt buginfo.txt 


 Do you see it every time? On this Linux box I have here one Vim session 
 with a file of more than a million /lines/, 33.6 MB (almost 100 times as 
 big as yours: a modified version of Unihan.txt from the Unicode site). I 
 did :sp ./ and gvim opened a netrw window on my current directory with 
 no prob. And yet, I have a somewhat fancier installation than you do, 
 what with a GNOME2 GUI, a few user scripts, a color scheme... But I have 
 1GB of live RAM and my CPU is an AMD running at 1.2 GHz (not that gvim 
 uses it all, X and Firefox have the biggest memory allocations, and 
 Firefox is also the most greedy of my CPU time). Also, I'm 76 bugfixes 
 ahead of you. (Yours is 7.0.000.) Maybe you should apply the 76 patches 
 published so far (at ftp://ftp.vim.org/pub/vim/patches/7.0/ ) and see if 
 the problem recurs? See at (ftp: or) 
 http://ftp.vim.org/pub/vim/patches/7.0/README what these patches are all 
 about.


 Best regards,
 Tony.


 
 I have already do the same test on vim with 76 patches, but it still
 happened every time.
 I have generate another big file for test, and it has the same error.
 The vim70 on solaris is complied with the same complie-option and this
 has
 no error.
 
 I try to test the script of vim, and found the script
 runtime/autoload/netrw.vim#4240,4242 is involved.
 If I comment the two lines, Vim will not crash.
 But I have no sense about this modification.
 
 Best regards,
 Akria Sheng
 
 Which version of netrw are you using? In mine (version 102 dated Jul 24, 
 2006 as shown near the top of the file), lines 4240 to 4242 are one 
 blank line and two comments, of which the first one is just a horizontal 
 line and the other is the fold header for the function 
 NetrwStatusLine(). The version of netrw distributed with Vim is not 
 always the latest one. Later versions are usually available at 
 vim-online http://vim.sourceforge.net/ and even more recent ones on Dr. 
 Chip's personal site http://mysite.verizon.net/astronaut/vim
 
 
 Best regards,
 Tony.
 
 

Dear Tony,
I have update the netrw to version 102, but it still happened.
The two line are changed to be 4424  4426.
When I comment the two line again, vim open the fileexplorer success.

Best regards,
Akria Sheng
-- 
View this message in context: 
http://www.nabble.com/I-have-got-one-%22ml_get%22-error-tf2194557.html#a6075633
Sent from the Vim - General forum at Nabble.com.



Re: I have got one ml_get error

2006-08-31 Thread A.J.Mechelynck

Akria Sheng wrote:



A.J.Mechelynck wrote:

Akria Sheng wrote:

A.J.Mechelynck wrote:

Akria Sheng wrote:

I have got one error to crash vim.
It happened when meet the following condition:
   A. must in Linux(solaris and winxp is OK)
   B. vim7.0(6.4 is ok)
   C. open one huge file(exceed 368710 bytes) then type :sp ./

   In general, it will split one window to show the filebrowse.
   But Vim will crash.
   I don't know how to avoid this crash.

   There are two appendixed report file:
http://www.nabble.com/user-files/235811/bugreport.txt bugreport.txt 
http://www.nabble.com/user-files/235812/buginfo.txt buginfo.txt 



Do you see it every time? On this Linux box I have here one Vim session 
with a file of more than a million /lines/, 33.6 MB (almost 100 times as 
big as yours: a modified version of Unihan.txt from the Unicode site). I 
did :sp ./ and gvim opened a netrw window on my current directory with 
no prob. And yet, I have a somewhat fancier installation than you do, 
what with a GNOME2 GUI, a few user scripts, a color scheme... But I have 
1GB of live RAM and my CPU is an AMD running at 1.2 GHz (not that gvim 
uses it all, X and Firefox have the biggest memory allocations, and 
Firefox is also the most greedy of my CPU time). Also, I'm 76 bugfixes 
ahead of you. (Yours is 7.0.000.) Maybe you should apply the 76 patches 
published so far (at ftp://ftp.vim.org/pub/vim/patches/7.0/ ) and see if 
the problem recurs? See at (ftp: or) 
http://ftp.vim.org/pub/vim/patches/7.0/README what these patches are all 
about.



Best regards,
Tony.



I have already do the same test on vim with 76 patches, but it still
happened every time.
I have generate another big file for test, and it has the same error.
The vim70 on solaris is complied with the same complie-option and this
has
no error.

I try to test the script of vim, and found the script
runtime/autoload/netrw.vim#4240,4242 is involved.
If I comment the two lines, Vim will not crash.
But I have no sense about this modification.

Best regards,
Akria Sheng
Which version of netrw are you using? In mine (version 102 dated Jul 24, 
2006 as shown near the top of the file), lines 4240 to 4242 are one 
blank line and two comments, of which the first one is just a horizontal 
line and the other is the fold header for the function 
NetrwStatusLine(). The version of netrw distributed with Vim is not 
always the latest one. Later versions are usually available at 
vim-online http://vim.sourceforge.net/ and even more recent ones on Dr. 
Chip's personal site http://mysite.verizon.net/astronaut/vim



Best regards,
Tony.




Dear Tony,
I have update the netrw to version 102, but it still happened.
The two line are changed to be 4424  4426.
When I comment the two line again, vim open the fileexplorer success.

Best regards,
Akria Sheng


IIUC, the code snippet which crashes your gvim is:


   if seq == '*'
exe 'silent keepjumps 
'.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'

   else
exe 'silent keepjumps 
'.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'

   endif


in function s:SetSort() in file autoload/netrw.vim. I give up. I guess 
we'll have to wait until Dr. Chip looks at this one. (He usually visits 
these lists quite assiduously, but I'm adding him in the Cc headers, 
just in case.)



Best regards,
Tony.


Re: [VIM] Re: I have got one ml_get error

2006-08-31 Thread Walter Cazzola

On Thu, 31 Aug 2006, Akria Sheng wrote:


Dear Tony,
I have update the netrw to version 102, but it still happened.
The two line are changed to be 4424  4426.
When I comment the two line again, vim open the fileexplorer success.


just my 2¢, are you using a latin encode? I have noted your address come
from Taiwan so it could be an error linked to your specific encoding
that we cannot replicate because we use a different encoding.

Regards
Walter
--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [EMAIL PROTECTED] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --- · · · --- · · ·
   ... recursive: adjective, see recursive ...
· · · --- · · · --- · · ·

Re: utf-8 encoding without BOM

2006-08-31 Thread Yakov Lerner

On 8/31/06, Péter Zsoldos [EMAIL PROTECTED] wrote:

Greetings,

I'm using gVim 6.3 on Windows Xp Sp2 and I ran into a problem that I
need to edit files with UTF-8 encoding, but I just can't get VIM to do
so. If I create utf-8 encoded files in notepad, VIM accepts this, but
places the BOM into the file. This BOM causes me a lot of problems,
since I edit PHP files and quite often I need to send headers - anyone
with PHP experience can tell you BOM makes sending headers
impossible I tried :help encoding, but there is no 'enc' command
available and :set fileencodings=utf-8 doesn't seem to work either. I'll
continue googling, but help would be appreciated, because I'd need to
fix this in order to start working..


:e ++enc=utf-8 file

Yakov


utf8 vs string handling vs virtcol

2006-08-31 Thread Thomas

Hi,

In a plugin on mine, I have the following lines:

let col  = virtcol(.)
let line = strpart(getline(.), col - 1)

The idea is to get the line right of the cursor including the character 
under the cursor. This works fine for latin1 encoding but yields wrong 
results when the encoding is eg utf8 and if there is a 16bit character 
before the cursor -- the string in front of the cursor then obviously is 
longer than one would expect from the value of virtcol().


Do you have a suggestion on how to robustly extract the line right of 
the cursor?


Regards,
Thomas.



Re: utf8 vs string handling vs virtcol

2006-08-31 Thread Thomas

This is wrong. You need:
let col  = col(.)
let line = strpart(getline(.), col - 1)


Unfortunately, IIRC this doesn't work with wrapped lines which is why I 
chose virtcol() ... But, well can't reproduce what I did (or thought 
that I did) 10 minutes ago. Anyway, it doesn't work with enc=utf8 and 
when there are malformed characters (not valid utf8) that are displayed 
as xx. Interestingly, virtcol() doesn't work in this situation either.


But you're 99% right I guess. Thanks.

Regards,
Thomas.



Netrw closes on execute

2006-08-31 Thread Josh D

Hello,

when I have multiple tabs opened and I run some shell command (eg:
!ls), then all tabs where only netrw is running are closed. How can I
prevent that?

Versions:
vim: 7.0-035+0bpo1 (backport on debian-sarge)
netrw: v98 and also 102

Thank you

josh


Re: utf-8 encoding without BOM

2006-08-31 Thread Péter Zsoldos

A.J.Mechelynck wrote:
it may be that the headers you talk about must be in 7-bit US-ASCII: 
in that case it might be simplest to edit the headers as a separate 
file with
These headers I talk about are HTTP headers, and according to protocol, 
they should be sent out to the client *before* any content is sent. Now 
php files look the following:

?php
code comes here, where I send HTTP headers with a function
?
inside the file I use special characters (Hungarian), for which I need 
them to be encoded UTF-8, as the site is in that.
the interpreter executes code between ? and ?, and doesn't output it's 
content, but outputs everything else in the file. The BOM marks are 
located *before* the ?, and thus is considered content by the 
interpreter, and is sent to the client.


Peter


Re: utf8 vs string handling vs virtcol

2006-08-31 Thread Yakov Lerner

On 8/31/06, Thomas [EMAIL PROTECTED] wrote:

 This is wrong. You need:
 let col  = col(.)
 let line = strpart(getline(.), col - 1)

Unfortunately, IIRC this doesn't work with wrapped lines which is why I
chose virtcol() ... But, well can't reproduce what I did (or thought
that I did) 10 minutes ago. Anyway, it doesn't work with enc=utf8


Yes it does. Take simple example, Create line with 1 high utf-8 char
entering Ctrl-Vu1234 then a. Put cursor on 2nd character, on 'a'. (I
assume :set enc=utf-8).
Try
  :echo col('a')
You'll see that it prints 4 not 2.
It properly account for width of utf-8 characters!

From :help col():

col({expr}) The result is a Number, which is the byte index of the column
   position given with {expr}.

Yakov


Re: utf8 vs string handling vs virtcol

2006-08-31 Thread Yakov Lerner

Try
   :echo col('a')

Ooops my mistake. I meant to write:

Try
  :echo col('.')

Yakov


Re: vim 7 on win xp console slow

2006-08-31 Thread Yakov Lerner

On 8/31/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hello,

When i press ESC, it takes about one second to finish, i.e. switching from
insert into normal mode, or placing the cursor in the buffer window when
escaping from the commandline.

All other things don't seem to create delays.

This does not happen in vim 6.2.

Is there something I can try to check or tune?


Try these settings:
  set timeout timeoutlen=1500 ttimeoutlen=50

Yakov


Re: utf8 vs string handling vs virtcol

2006-08-31 Thread Thomas

Yes it does. Take simple example, Create line with 1 high utf-8 char
entering Ctrl-Vu1234 then a.


Ok, you're right as far as col() is concerned. I'm having here some 
problems though with enc=utf8  soft-wrapped lines  showbreak=¦, which 
I mistook as being a issue related to col(). The cursor appears to be 
slightly off position.


Regards,
Thomas.




Font problems on Linux after upgrade

2006-08-31 Thread Boris Dinkevich

Hello everyone,

I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
Unfortunately after the update, the lookfeel changed, I was able to restore
most of the settings but am unable to restore the font configuration.

My font was similar (or the same) to Monospace font as appears in Konsole
app.
But I am unable to set gvim7 to use the same font.

Any help will be greatly appreciated

Thanks in advance,
Boris Dinkevich


Re: Font problems on Linux after upgrade

2006-08-31 Thread Yakov Lerner

On 8/31/06, Boris Dinkevich [EMAIL PROTECTED] wrote:

Hello everyone,

I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
Unfortunately after the update, the lookfeel changed, I was able to restore
most of the settings but am unable to restore the font configuration.

My font was similar (or the same) to Monospace font as appears in Konsole
app.
But I am unable to set gvim7 to use the same font.


Difference in fonts may be due to difference in GUI libraries that
gvim is built with. Check 4th line of output of :version
command, both in your old vim, and in your new vim.

For example, mine reads :version ... Huge version with GTK2 GUI.

The vim that had font closest to Konsole possibly was Qt-based.

Yakov


Re: Netrw closes on execute

2006-08-31 Thread Josh D

Great. Thanks!

josh

On 8/31/06, Charles E Campbell Jr [EMAIL PROTECTED] wrote:

Josh D wrote:


 when I have multiple tabs opened and I run some shell command (eg:
 !ls), then all tabs where only netrw is running are closed. How can I
 prevent that?

 Versions:
 vim: 7.0-035+0bpo1 (backport on debian-sarge)
 netrw: v98 and also 102

You're running into g:netrw_fastbrowse (sol'n: set it to 2 in your .vimrc).

HTH,
Chip Campbell




Re: utf-8 encoding without BOM

2006-08-31 Thread Stefan Walk

the interpreter executes code between ? and ?, and doesn't output it's
content, but outputs everything else in the file. The BOM marks are
located *before* the ?, and thus is considered content by the
interpreter, and is sent to the client.


Also, if you are using multiple PHP files that include each other, a
BOM will be sent for every PHP file you are including, which will
return in BOMs in the middle of the produced document.

Regards,
Stefan


Re: Font problems on Linux after upgrade

2006-08-31 Thread Boris Dinkevich

Hello,

I have used the AAP utility for installation.
Is there a way to reconfigure  recompile for GTK2 (a howto/help perhaps)

Thanks alot for your help
Boris

On 8/31/06, Robert Cussons [EMAIL PROTECTED] wrote:

Yakov Lerner wrote:
 On 8/31/06, Boris Dinkevich [EMAIL PROTECTED] wrote:

 Hello everyone,

 I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
 Unfortunately after the update, the lookfeel changed, I was able to
 restore
 most of the settings but am unable to restore the font configuration.

 My font was similar (or the same) to Monospace font as appears in
 Konsole
 app.
 But I am unable to set gvim7 to use the same font.


 Difference in fonts may be due to difference in GUI libraries that
 gvim is built with. Check 4th line of output of :version
 command, both in your old vim, and in your new vim.

 For example, mine reads :version ... Huge version with GTK2 GUI.

 The vim that had font closest to Konsole possibly was Qt-based.

 Yakov


Hi Boris,

I had exactly the same problem and as Yakov says it was due to the GUI
libraries, the old one was GTK2 GUI and when I recompiled it, it was
motif and the font changed as you said, when I recompiled it for GTK2
GUI the appearance returned to the old one.



Re: [VIM] Re: [VIM] Re: I have got one ml_get error

2006-08-31 Thread Walter Cazzola

On Thu, 31 Aug 2006, Akria Sheng wrote:


Yes, I am using latin1 encoding. The linux which I use don't install any
function about chinese.
So the environment is english only. But I am not sure there is other strange
configuration to make this mistake. I have tried to change some options
include gui-option or multibyte or fontset to complie again, but it still
doesn't work. Furthermore, I have tried the same compile option with vim64
used, and vim64 is OK, vim70 will crash.


just another try nothing more: have you tried to open a different
directory? maybe some file has in the name characters that make vim
crash.

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [EMAIL PROTECTED] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --- · · · --- · · ·
   ... recursive: adjective, see recursive ...
· · · --- · · · --- · · ·

Using openssl bf encryption

2006-08-31 Thread Brian McKee

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi All
I'd like to be able to edit an encrypted plain text file using vim.
It's blowfish encoded with openssl.   I noticed right away that the  
contents

could end up in .viminfo, so I started doing some research.

I looked at these pages
http://www.vim.org/tips/tip.php?tip_id=1251
http://www.vim.org/tips/tip.php?tip_id=90
http://www.vim.org/htmldoc/usr_23.html
http://www.vim.org/scripts/script.php?script_id=661
and others trying to figure out the best way to do this.

I see related items listed as 21 and 36 on http://vim.sourceforge.net/ 
sponsor/vote_results.php


If I use this (untested)
- 
 Transparent editing of bf encrypted files.
 Originally By Wouter Hanegraaff [EMAIL PROTECTED]
 with alterations for bf by bmckee
augroup encrypted
au!

 First make sure nothing is written to ~/.viminfo while editing
 an encrypted file.
autocmd BufReadPre,FileReadPre  *.bf set viminfo=
 We don't want a swap file, as it writes unencrypted data to disk
autocmd BufReadPre,FileReadPre  *.bf set noswapfile
 Switch to binary mode to read the encrypted file
autocmd BufReadPre,FileReadPre  *.bf set bin
autocmd BufReadPre,FileReadPre  *.bf let ch_save = ch|set ch=2
autocmd BufReadPost,FileReadPost*.bf '[,']!openssl bf -d - 
salt 2 /dev/null

 Switch to normal mode for editing
autocmd BufReadPost,FileReadPost*.bf set nobin
autocmd BufReadPost,FileReadPost*.bf let ch = ch_save|unlet  
ch_save
autocmd BufReadPost,FileReadPost*.bf execute :doautocmd  
BufReadPost  . expand(%:r)


 Convert all text to encrypted text before writing
autocmd BufWritePre,FileWritePre*.bf   '[,']!openssl enc bf - 
salt 2/dev/null

 Undo the encryption so we are back in the normal text, directly
 after the file has been written.
autocmd BufWritePost,FileWritePost*.bf   u
augroup END
- 

The question is (yah I took a long time getting here) where does  
decrypted data end up?


It's obviously going to be in ram at some point - I figure that's  
unavoidable if I actually want to look at the data :-)
and thus might end up in operating system swap files - I can deal  
with that.


Does 'shelling out' using the ! end up writing the data to disc as a  
temp file somewhere then unlink it?
If that's the case isn't that really the same as decrypt it using  
program A, edit it using program B, then re-encrypt it?
That is fine for this application,  otherwise I'd be looking at whole  
file system encryption I think.


Is there some other exposure I'm not aware of?

Brian McKee
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE9wmsGnOmb9xIQHQRAoI4AJ9AXqovMNe5v2YTQrs8hsYuVcQyGACeJ1OW
FENk31mDuJ9GTqfQsGbxfXg=
=qXsg
-END PGP SIGNATURE-


Re: utf8 vs string handling vs virtcol

2006-08-31 Thread A.J.Mechelynck

Thomas wrote:

Hi,

In a plugin on mine, I have the following lines:

let col  = virtcol(.)
let line = strpart(getline(.), col - 1)

The idea is to get the line right of the cursor including the character 
under the cursor. This works fine for latin1 encoding but yields wrong 
results when the encoding is eg utf8 and if there is a 16bit character 
before the cursor -- the string in front of the cursor then obviously is 
longer than one would expect from the value of virtcol().


Do you have a suggestion on how to robustly extract the line right of 
the cursor?


Regards,
Thomas.




Here is a different approach on doing the same thing:

let s:temp = @@ 1
normal y$   2
let line = @@   3
let @@ = s:temp 4
unlet s:temp5

Lines 1, 4 and 5 above can be omitted if you accept to clobber the 
unnamed register, line 5 alone if you accept to leave a (script-local) 
variable lying about.



Best regards,
Tony.


Running a Set of Commands from a File

2006-08-31 Thread Mike Blonder
Hi.

I have saved a file called 'commands.'  This file has all of the
commands (g /foobar/,/goobar/ d, etc) I need to edit some very large
files.  I want to 'run' this commands file from within each of the large
files that I need to edit.  

1) do I have to chmod 'commands' as an executable?
2) can I invoke the file from within VIM?, if yes, then what is the
syntax?
3) would it be better to run it from the shell? (Linux/SuSE)

Thanks

Mike




Re: Running a Set of Commands from a File

2006-08-31 Thread Charles E Campbell Jr

Mike Blonder wrote:


I have saved a file called 'commands.'  This file has all of the
commands (g /foobar/,/goobar/ d, etc) I need to edit some very large
files.  I want to 'run' this commands file from within each of the large
files that I need to edit.  


1) do I have to chmod 'commands' as an executable?
 


No.


2) can I invoke the file from within VIM?, if yes, then what is the
syntax?
 



:so commands


3) would it be better to run it from the shell? (Linux/SuSE)
 


Not if its composed of vim commands.

Please be aware that the sourcing of commands is done in command mode; 
if you have
normal mode commands, you'll want to be looking into how to use 
:normal   (:help :normal).


Also, check out   :help -S  , a command line option to vim that allows 
the sourcing of files.


Regards,
Chip Campbell



Re: Font problems on Linux after upgrade

2006-08-31 Thread Boris Dinkevich

Hello Yakov

I have tried to configure manualy, but to not avail.
(By the way, I have KDE)

Tried compiling with: --enable-gui=gtk2

but when I try to start gvim I get the following error:
E25: GUI cannot be used: Not enabled at compile time

PS. I am not sure how I can start the old gvim (if its still present)
to check the settings it was compiled with.

Again thanks for your help,
Boris




On 8/31/06, Yakov Lerner [EMAIL PROTECTED] wrote:

On 8/31/06, Boris Dinkevich [EMAIL PROTECTED] wrote:
 Hello,

 I have used the AAP utility for installation.
 Is there a way to reconfigure  recompile for GTK2 (a howto/help perhaps)

aap downloaded all sources whcih contain, among other things,
configure script. Go to the directory of sources and do
 ./configure --enable-gui=gtk2 --with-features=huge
 ./make  make install

The --with-features=huge part is optional, up to you. Yuu can also use
my script vim7-install.sh , attached, which doanloads latest vim sources
 builds  instals them. With my script, command is:
   ./vim7-install.sh --enable-gui=gtk2 --with-features=huge

To see all available configure options, do ./configure --help, or
/vim7-install.sh --help

Yakov





Re: Font problems on Linux after upgrade

2006-08-31 Thread A.J.Mechelynck

Boris Dinkevich wrote:

Hello,

I have used the AAP utility for installation.
Is there a way to reconfigure  recompile for GTK2 (a howto/help perhaps)

Thanks alot for your help
Boris

[...]

Configure will select the GTK2 GUI by default, provided that:
a) it is installed, including development stuff;
b) you have not forbidden it via --disable-gtk2-check
c) you have not explicitly selected a different GUI via --enable-gui=

For (a) you need to install the gtk2 and gtk2-devel packages (or 
whatever they are called in your Linux distribution)
For (b) and (c) you need to REMOVE any --disable-gtk2-check or 
--enable-gui= parameter from your configure arguments.


If you changed anything under (a), (b) or (c) above, you need to run 
make reconfig, not in the top vim70 directory (whose Makefile has no 
reconfig target) but in the src/ directory, as follows:


cd src
make reconfig  ../make.log 21
cd ..

This will both re-run configure with your new settings, and recompile 
Vim. Once it has finished running:


ls -l src/vim
(and optionally)
less make.log

you should see a Vim executable with today's date; if you don't, the 
make log will tell you what went wrong. If you do:


src/vim --version |more

Check the features that are important to you. In particular, check that 
one of the first four lines of output includes with GTK2 GUI. If they 
are present:


make install

Note: If you include the GTK+2 GUI, you can also (optionally) include 
the Gnome2 interface, which will make Vim save its session transparently 
when you close the kde or Gnome window manager, and restart it when the 
window manager is restarted. For that, you need:


a) the gnome2 and gnome2-devel packages (or whatever they are called in 
your Linux distribution)

b) the --enable-gnome-check argument to configure.

For instance, on my system, sourcing the following file in the bash 
shell (with the source command or a period, followed by a space and the 
filename; just the filename at the command prompt is not enough), will 
cause a subsequent make to produce a Vim with Gnome/GTK2 GUI:


#!/bin/bash
#
# this file must be sourced, not run
#
# set environment variables
export CONF_OPT_GUI='--enable-gnome-check'
export CONF_OPT_PERL='--enable-perlinterp'
export CONF_OPT_PYTHON='--enable-pythoninterp'
export CONF_OPT_TCL='--enable-tclinterp --with-tcl=tclsh8.4'
export CONF_OPT_RUBY='--enable-rubyinterp'
export CONF_OPT_MZSCHEME='--enable-mzschemeinterp'
export CONF_OPT_CSCOPE='--enable-cscope'
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_OUTPUT='--enable-fontset'
export CONF_OPT_FEAT='--with-features=huge'
export CONF_OPT_COMPBY='[EMAIL PROTECTED]'

(in case my mailer beautified it: each line start with either # or 
export CONF_OPT_ without the quotes). You can use all or any of it, 
but please change at least the last line to show your name instead of 
mine ;-). Any feature not installed on your system (or whose 
development stuff is not installed) will be disabled by configure; to 
disable a feature for which you do have the software, replace --enable 
by --disable in the configure arguments.



Best regards,
Tony.


Re: utf8 vs string handling vs virtcol

2006-08-31 Thread Mikolaj Machowski
Dnia czwartek, 31 sierpnia 2006 13:09, Thomas napisał:
  This is wrong. You need:
  let col  = col(.)
  let line = strpart(getline(.), col - 1)

 Unfortunately, IIRC this doesn't work with wrapped lines which is why I
 chose virtcol() ... But, well can't reproduce what I did (or thought
 that I did) 10 minutes ago. Anyway, it doesn't work with enc=utf8 and
 when there are malformed characters (not valid utf8) that are displayed
 as xx. Interestingly, virtcol() doesn't work in this situation either.

Solution is in Vim7::

let linearray = split(getline('.'), '.\zs')

Now you have all characters in line in separate positions in array. This
method plays nice with utf-8 characters.

m.



Re: Running a Set of Commands from a File

2006-08-31 Thread striker
I have a set of quotes that I download as a .html file and then  
manipulate.  I use a file called data.vim to do everything I need.

I run the file in Vim with the command   :so data.vim

Here is an example from the file:

:e ~/Desktop/sf.html
:v/String('/d
:execute norm vf'df'D
:%s/|/\r/g
:%!sort
:sav! /Applications/Trendsetter/Data/SFU06
:bd

On Aug 31, 2006, at 12:32 PM, Charles E Campbell Jr wrote:


Mike Blonder wrote:


I have saved a file called 'commands.'  This file has all of the
commands (g /foobar/,/goobar/ d, etc) I need to edit some very large
files.  I want to 'run' this commands file from within each of the  
large

files that I need to edit.
1) do I have to chmod 'commands' as an executable?


No.


2) can I invoke the file from within VIM?, if yes, then what is the
syntax?



:so commands


3) would it be better to run it from the shell? (Linux/SuSE)


Not if its composed of vim commands.

Please be aware that the sourcing of commands is done in command  
mode; if you have
normal mode commands, you'll want to be looking into how to use  
:normal   (:help :normal).


Also, check out   :help -S  , a command line option to vim that  
allows the sourcing of files.


Regards,
Chip Campbell





silent make

2006-08-31 Thread Luis A. Florit
Hi,

I use Vim and Quickfix to compile C++ programs. I have set

let makeprg='g++ -o % %'

as the compiler. My problem is that while compiling, vim goes to
the console, distracting me. I don't need the console, if I use
Quickfix! I would like it to stay in the buffer window.

 I made the following map:

map silent EscEsc :echohl WildMenucr:echon Compiling 
file...cr:silent! makecr:cw 4crC-wUp:echohl Nonecr:echo crc-l

that works great in gvim. It stays in the buffer, printing a bottom
message Compiling file... while compiling. But this does not work
for vim (console).

How can I avoid vim to leave the buffer while compiling, without
making something like ':silent !g++..., since I want to use Quickfix?

Thanks!!

Luis.


RE: Problem with :normal?

2006-08-31 Thread Chuck Mason

If you do :normal vfld   then what happens is what you expect.  So, my
guess is that the script is simply stopped when f' doesn't do
anything. I.e. there is no ' so f' errs and the rest of the command is
terminated.

That's just my *guess*, though.

Chuck

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 10:49 AM
To: vim@vim.org
Subject: Problem with :normal?

Hey Vimmers,

after reading through a thread earlier on sourcing commands from a file
i did a little experimentation with :normal. If given the line:

test this line
^
with the cursor at the carat and you do :normal vf'df'D nothing is
deleted and
you are left in normal mode.  If on the other hand, you actually type
vf'df'D
in normal mode you are only left with test.  I've noticed some other
strange
behavior when using visual mode from :normal.  Not sure if this is a
bug.
It exists through patch 40 of vim7.  Looks like both linux and windows
versions are affected.
  Thanks!
Dan


RE: Problem with :normal?

2006-08-31 Thread Chuck Mason
Sorry for the added reply, but this is indeed very interesting. I get
the same results from recording:

qqvf'df'Dq -- does what you expect executing all commands
@q -- behaves like :normal vf'df'D and stops executing after
f'

:normal f'  is another example where the  are never executed.

I browsed through the help and couldn't find anything saying this is
intended behavior.  In fact, quite the opposite:

:norm[al]! {commands}
...
{commands} is executed like it is typed.
...


Chuck

-Original Message-
From: Chuck Mason 
Sent: Thursday, August 31, 2006 11:02 AM
To: [EMAIL PROTECTED]; vim@vim.org
Subject: RE: Problem with :normal?


If you do :normal vfld   then what happens is what you expect.  So, my
guess is that the script is simply stopped when f' doesn't do
anything. I.e. there is no ' so f' errs and the rest of the command is
terminated.

That's just my *guess*, though.

Chuck

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 10:49 AM
To: vim@vim.org
Subject: Problem with :normal?

Hey Vimmers,

after reading through a thread earlier on sourcing commands from a file
i did a little experimentation with :normal. If given the line:

test this line
^
with the cursor at the carat and you do :normal vf'df'D nothing is
deleted and
you are left in normal mode.  If on the other hand, you actually type
vf'df'D
in normal mode you are only left with test.  I've noticed some other
strange
behavior when using visual mode from :normal.  Not sure if this is a
bug.
It exists through patch 40 of vim7.  Looks like both linux and windows
versions are affected.
  Thanks!
Dan


Re: Problem with :normal?

2006-08-31 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

Hey Vimmers,

after reading through a thread earlier on sourcing commands from a file
i did a little experimentation with :normal. If given the line:

test this line
^
with the cursor at the carat and you do :normal vf'df'D nothing is deleted and
you are left in normal mode.  If on the other hand, you actually type vf'df'D
in normal mode you are only left with test.  I've noticed some other strange
behavior when using visual mode from :normal.  Not sure if this is a bug.
It exists through patch 40 of vim7.  Looks like both linux and windows
versions are affected.
  Thanks!
Dan



When entering it at the console, each apostrophe sounds an error beep. 
IIUC the first of these stops :normal and the latter does nothing.


Indeed,

:silent! normal vf'df'D

(where :silent! means disregard any errors) leaves us with only test.

Best regards,
Tony.


vim is too smart for its own good

2006-08-31 Thread Bruce Korb

Hi,

I'd like to use a plain text editor.
I don't want any surprises.
I don't want it to think it understands language syntax.
I don't want it to colorize things.
I don't want it to do anything at all for me, unless I explicitly
say it is okay for it to do so.

In short, I want vi.  Except Linux distributions now alias vi
to vim and all its wondrous wizardry.  ``set compatible'' is
insufficient.  I still get automated commenting when the silly
thing has decided that I must be editing a C file.  Leave me
alone, please.  I want it all turned off.  I have been unable
to find a simple way to do that.  Or even any way to do that,
because I have not found any way at all to turn off the
``you must want this line prefixed with a double slash''
feature.  Help!  Suggestions, please?  Thank you! - Bruce


Re: vim is too smart for its own good

2006-08-31 Thread Michael Hernandez


On Aug 31, 2006, at 3:19 PM, Bruce Korb wrote:


Hi,

I'd like to use a plain text editor.
I don't want any surprises.
I don't want it to think it understands language syntax.
I don't want it to colorize things.
I don't want it to do anything at all for me, unless I explicitly
say it is okay for it to do so.

In short, I want vi.  Except Linux distributions now alias vi
to vim and all its wondrous wizardry.  ``set compatible'' is
insufficient.  I still get automated commenting when the silly
thing has decided that I must be editing a C file.  Leave me
alone, please.  I want it all turned off.  I have been unable
to find a simple way to do that.  Or even any way to do that,
because I have not found any way at all to turn off the
``you must want this line prefixed with a double slash''
feature.  Help!  Suggestions, please?  Thank you! - Bruce


you might try nvi?

http://www.bostic.com/vi/

Mike 


Re: vim is too smart for its own good

2006-08-31 Thread Diwaker Gupta

alone, please.  I want it all turned off.  I have been unable
to find a simple way to do that.  Or even any way to do that,
because I have not found any way at all to turn off the
``you must want this line prefixed with a double slash''
feature.  Help!  Suggestions, please?  Thank you! - Bruce


And 'vim -u NONE' doesn't work for you?
--
Web/Blog/Gallery: http://floatingsun.net/blog


Re: vim is too smart for its own good

2006-08-31 Thread Bruce Korb

Michael Hernandez wrote:

you might try nvi?

http://www.bostic.com/vi/

Mike


$ type nvi
ksh: type: nvi: not found

Hi Mike,

If distributions were to normally install it, that would be fine.
Installing my own vi is way over the top for what my needs ought
to require.  Surely getting vim to act like a plain text editor
cannot be _that_ hard!!!

Thanks - Bruce


Re: vim is too smart for its own good

2006-08-31 Thread A.J.Mechelynck

Bruce Korb wrote:

Hi,

I'd like to use a plain text editor.
I don't want any surprises.
I don't want it to think it understands language syntax.
I don't want it to colorize things.
I don't want it to do anything at all for me, unless I explicitly
say it is okay for it to do so.

In short, I want vi.  Except Linux distributions now alias vi
to vim and all its wondrous wizardry.  ``set compatible'' is
insufficient.  I still get automated commenting when the silly
thing has decided that I must be editing a C file.  Leave me
alone, please.  I want it all turned off.  I have been unable
to find a simple way to do that.  Or even any way to do that,
because I have not found any way at all to turn off the
``you must want this line prefixed with a double slash''
feature.  Help!  Suggestions, please?  Thank you! - Bruce



alias vi='vim -u NONE'


Best regards,
Tony.


Re: vim is too smart for its own good

2006-08-31 Thread Bruce Korb

Diwaker Gupta wrote:

And 'vim -u NONE' doesn't work for you?


alias vi='vim -u NONE'

OK.  That works.  Can't that be done with something a little more
obvious in ~/.vimrc ??  So, I'll burn that in my brain and not be
bothered anymore.  Thank you all.  Bruce


RE: Copy/paste to another console

2006-08-31 Thread Gene Kwiecinski
I've a little problem, I do remote box A with console A using putty
(under MS) then using vim open file A, I do copy a line with yy in
file A, so I do remote to box B with console B using putty (under MS),
then open file B, the question how to do paste to file B in console B
without mouse (I do usually using mouse to block line then copy to
another file)

If you want to do what I think you want to do, you can copy to/from the
system clipboard or whatever it's called.  I do that to reply normally
from the braindead top-posting crap that's enforced on LookOut (as co.
policy; can be selected via menu options) to toss into 'vim', add
leading ''s, then 'gqap' to reflow/reformat the text, then move it back
to the reply window.  Worx like a charm..

Anyhoo, if ^c/^x/^v (copy/cut/paste, respectively) don't float yer boat
(and ^v will crash into a literal-character escape in 'vi' variants,
incl 'vim'), then ^ins will be the equivalent of copy, ^del the
equivalent of cut, and sh-ins the equivalent of paste.

Sooo, you can highlight your line visually with 'v' and then arrow
around to select however much of it you want, hit ^ins to copy it, then
on the remote machine, sh-ins it to put it into the file.


Re: vim is too smart for its own good

2006-08-31 Thread Tim Chase

If distributions were to normally install it, that would be
fine. Installing my own vi is way over the top for what my
needs ought to require.  Surely getting vim to act like a
plain text editor cannot be _that_ hard!!!


[tongue in cheek]

There's always ed...

-more ubiquitous in its presence
-consistent in its behavior
-powerful
-tools like diff interoperate with it
-it can be used on a slow TTY
-can be used on with a one-line display
-smaller executable size
-easier to remember: *ed*itor, not *vi*sual editor
-no time or machine cycles wasted on screen refreshes
-historically significant

so many other bountiful blessings to using ed. ;)

Granted, I haven't come across an ed users mailing list, let
alone one as helpful as this list.

Hmmm...I wonder how hard it would be to add syntax highlighting
to ed... ;)

-tim





Re[2]: vim is too smart for its own good

2006-08-31 Thread Alan G Isaac
On Thu, 31 Aug 2006, Tim Chase apparently wrote: 
 There's always ed...  
 -more ubiquitous in its presence 
 -consistent in its behavior 
 -powerful 
 -tools like diff interoperate with it 
 -it can be used on a slow TTY 
 -can be used on with a one-line display 
 -smaller executable size 
 -easier to remember: *ed*itor, not *vi*sual editor 
 -no time or machine cycles wasted on screen refreshes 
 -historically significant 
 so many other bountiful blessings to using ed. ;) 

For those missing the reference:
http://www.gnu.org/fun/jokes/ed.msg.html

Cheers,
Alan Isaac





Re: vim is too smart for its own good

2006-08-31 Thread Gary Johnson
On 2006-08-31, Bruce Korb [EMAIL PROTECTED] wrote:
 Diwaker Gupta wrote:
  And 'vim -u NONE' doesn't work for you?
 
 alias vi='vim -u NONE'
 
 OK.  That works.  Can't that be done with something a little more
 obvious in ~/.vimrc ??  So, I'll burn that in my brain and not be
 bothered anymore.  Thank you all.  Bruce

I was just looking through :help starting.txt and it seems to me 
that putting

set all
set compatible
set noloadplugins
filetype off

at the very start of your ~/.vimrc or ~/.exrc ought to give you as 
basic a vi as you can get from vim, even if a system vimrc has 
already been sourced.

I'm not sure about the proper ordering of those first two, or if it 
makes a difference.

HTH,
Gary

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