Re: Fastest way to append line or char to a buffer

2006-08-30 Thread Chris Littell
On 8/30/06, Nikolai Weibull [EMAIL PROTECTED] wrote: On 8/29/06, Brad Beveridge [EMAIL PROTECTED] wrote: On 29/08/06, Ilya [EMAIL PROTECTED] wrote: Brad Beveridge wrote: static char string[2] = {0}; Should not you have = {0, 0} here? Second element never get initialized but it

Re: better recognising of tex vs plaintex filetype

2006-08-30 Thread Benji Fisher
On Tue, Aug 29, 2006 at 09:16:41PM +0200, Stefano Zacchiroli wrote: On Tue, Aug 29, 2006 at 03:06:39PM -0400, Benji Fisher wrote: I do not think there is any reliable way to distinguish between plain TeX and LaTeX. After my RFC, I decided to treat plain TeX as the default, since it is

vim mailing lists

2006-08-30 Thread Benji Fisher
On Sun, Aug 27, 2006 at 02:40:24PM +0200, Bram Moolenaar wrote: Apparently the sorbs blacklist mechanism is still being used, causing trouble for some people. I have asked the mail server maintainer to remove sorbs a few times now... Twice recently, sorbs has bounced my mails to the

Re: Fastest way to append line or char to a buffer

2006-08-30 Thread Nikolai Weibull
On 8/30/06, Chris Littell [EMAIL PROTECTED] wrote: On 8/30/06, Nikolai Weibull [EMAIL PROTECTED] wrote: On 8/29/06, Brad Beveridge [EMAIL PROTECTED] wrote: On 29/08/06, Ilya [EMAIL PROTECTED] wrote: Brad Beveridge wrote: static char string[2] = {0}; Should not you have = {0, 0}

Re: Fastest way to append line or char to a buffer

2006-08-30 Thread Nikolai Weibull
On 8/30/06, Chris Littell [EMAIL PROTECTED] wrote: On 8/30/06, Nikolai Weibull [EMAIL PROTECTED] wrote: In C99 you can initialize values out of order, yes, but you can't do it with ranges. Ranges are a GNU C extension. The propagation neither happens in any of the ANSI standards, nor in the

Re: better recognising of tex vs plaintex filetype

2006-08-30 Thread Stefano Zacchiroli
On Wed, Aug 30, 2006 at 08:42:52AM -0400, Benji Fisher wrote: If you maintain a vim package (for Debian, guessing from your sig?), then you can always define g:tex_flavor in a system vimrc if you want. BTW, the documentation for this is under Yes, sure, I was proposing it to you assuming

Re: better recognising of tex vs plaintex filetype

2006-08-30 Thread Gautam Iyer
On Wed, Aug 30, 2006 at 07:17:16PM +0200, Stefano Zacchiroli wrote: I agree with the comment that plain TeX users may also define such sectioning commands. Maybe it would be safe if you check for such definitions, using an include-file search ... but of course, that is more convenient

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread Alexey I. Froloff
* Alexey I. Froloff raorn@ [060830 21:21]: Solution is simple - source ftdetect/*.vim before conf fallback. Also, it would be nice to use StarSetf() from ftdetect/*.vim... -- Regards, Sir Raorn. signature.asc Description: Digital signature

session-file problem in presence of 'set acd'

2006-08-30 Thread Yakov Lerner
When 'acd' is set, 'vim -S' open files in wrong directory. To reproduce: 1. make your ~/.vimrc 1-liner 'set acd' (Alternatively, use use vim -u NONE -c 'set acd' instead of vim in commands below). 2. vim ~/xxx# or :he options.txt now you have two files open: (1) ~/xxx

Re: better recognising of tex vs plaintex filetype

2006-08-30 Thread A.J.Mechelynck
Gautam Iyer wrote: On Wed, Aug 30, 2006 at 07:17:16PM +0200, Stefano Zacchiroli wrote: I agree with the comment that plain TeX users may also define such sectioning commands. Maybe it would be safe if you check for such definitions, using an include-file search ... but of course, that is more

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread Ilya
Alexey I. Froloff wrote: filetype.vim looks like: augroup filetypedetect ... Generic configuration file (check this last, it's just guessing!) au BufNewFile,BufRead,StdinReadPost * \ ... some files are being setf'ed to conf Use the plugin-filetype checks last, they may overrule any

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread A.J.Mechelynck
Alexey I. Froloff wrote: filetype.vim looks like: augroup filetypedetect ... Generic configuration file (check this last, it's just guessing!) au BufNewFile,BufRead,StdinReadPost * \ ... some files are being setf'ed to conf Use the plugin-filetype checks last, they may overrule any

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread Bram Moolenaar
Alexey I. Froloff wrote: filetype.vim looks like: augroup filetypedetect ... Generic configuration file (check this last, it's just guessing!) au BufNewFile,BufRead,StdinReadPost * \ ... some files are being setf'ed to conf Use the plugin-filetype checks last, they may

Re: session-file problem in presence of 'set acd'

2006-08-30 Thread A.J.Mechelynck
Yakov Lerner wrote: When 'acd' is set, 'vim -S' open files in wrong directory. To reproduce: 1. make your ~/.vimrc 1-liner 'set acd' (Alternatively, use use vim -u NONE -c 'set acd' instead of vim in commands below). 2. vim ~/xxx# or :he options.txt now you have two

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread Alexey I. Froloff
* A.J.Mechelynck antoine.mechelynck@ [060830 23:53]: 1. You should never create, delete or modify any file in the $VIMRUNTIME By $VIMRUNTIME I mean rtp. Those file comes modified from vim-* rpm packages and I just want to _package_ system-specific settings in separate file instead of rediff'ing

Re: vim mailing lists

2006-08-30 Thread Yakov Lerner
On 8/30/06, Bram Moolenaar [EMAIL PROTECTED] wrote: Benji Fisher wrote: On Sun, Aug 27, 2006 at 02:40:24PM +0200, Bram Moolenaar wrote: Apparently the sorbs blacklist mechanism is still being used, causing trouble for some people. I have asked the mail server maintainer to remove

Re: vim mailing lists

2006-08-30 Thread Gautam Iyer
On Wed, Aug 30, 2006 at 10:12:44PM +0200, Bram Moolenaar wrote: Apparently the sorbs blacklist mechanism is still being used, causing trouble for some people. I have asked the mail server maintainer to remove sorbs a few times now... Twice recently, sorbs has bounced my mails to

Bad QUOTESED expression in src/Makefile

2006-08-30 Thread Alexey I. Froloff
There is QUOTESED expression for creating auto/pathdef.c: QUOTESED = sed -e 's//\\/g' -e 's/\\//' -e 's/\\;$$/;/' ... @echo 'char_u *default_vim_dir = (char_u *)$(VIMRCLOC);' | $(QUOTESED) $@ However: gcc -c -I. -Iproto -DHAVE_CONFIG_H -pipe -Wall -O2 -march=pentium4

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread A.J.Mechelynck
Alexey I. Froloff wrote: * Bram Moolenaar Bram@ [060831 00:14]: The current method is correct. In the ftdetect scripts you can check for 'filetype' being equal to conf and then do :set ft=anything to overrule it. Use :setf only when you don't want to overrule the default filetype. I want

Re: Unable to use :setf from $VIMRUNTIME/ftdetect/*.vim

2006-08-30 Thread A.J.Mechelynck
Alexey I. Froloff wrote: * A.J.Mechelynck antoine.mechelynck@ [060831 01:48]: If I misunderstood, please be more specific: do you or don't you want to override the filetype detected by filetype.vim ? No. Not override, but extend as if it was done in filetype.vim. What user scripts can break

Fixing cweb.vim

2006-08-30 Thread David Brown
I'm trying to get cweb.vim to work better, and am not sure how to go about this. Most of a cweb file is regular TeX (or LaTeX), with some occasional regions that are C code. The way it is implemented now, works with simple constructs. However, tex.vim frequently will enclose large sections of

Re: Fixing cweb.vim

2006-08-30 Thread A.J.Mechelynck
David Brown wrote: I'm trying to get cweb.vim to work better, and am not sure how to go about this. Most of a cweb file is regular TeX (or LaTeX), with some occasional regions that are C code. The way it is implemented now, works with simple constructs. However, tex.vim frequently will

Re: Fixing cweb.vim

2006-08-30 Thread David Brown
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

Re: Bad QUOTESED expression in src/Makefile

2006-08-30 Thread Alexey I. Froloff
* 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

Re: Re [2]: again: % does not work with ' ( '

2006-08-30 Thread Peter Hodge
Hey, Thanks for that important clue. It seems the secret to making it work is in the values of the b:match_skip and b:match_words variables. Thank you, this problem has been bugging me for a while. regards, Peter Addendum: It depends on the 'filetype' and possibly on whether %-jumping

Re: Re [2]: again: % does not work with ' ( '

2006-08-30 Thread A.J.Mechelynck
Peter Hodge wrote: Hey, Thanks for that important clue. It seems the secret to making it work is in the values of the b:match_skip and b:match_words variables. Thank you, this problem has been bugging me for a while. regards, Peter Addendum: It depends on the 'filetype' and possibly on

Re: Re [2]: again: % does not work with ' ( '

2006-08-30 Thread Benji Fisher
Yes, b:match_skip is relevant here. The matchit default is to skip strings and comments (unless you use % starting inside a string or comment). The matchit script relies on the syntax mechanism to recognize strings and comments. HTH --Benji Fisher On

Printing in Windows

2006-08-30 Thread Chris Sutcliffe
I'm using vim 7.0.076 on Windows and I'm trying to print the current buffer. Doing a ':ha' doesn't work because it is trying to copy the file to LPT1: C:\WINDOWS\system32\cmd.exe /c copy C:\WINDOWS\TEMP\VIp1C.tmp LPT1: C:\WINDOWS\TEMP\VIo1D.tmp 21 which on my system doesn't work because I

Re: Contextual highlighting problem

2006-08-30 Thread Yongwei Wu
On 8/28/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Yongwei Wu wrote: [...] However, it is only a *little* better. Scroll down to make the first comment line disappear on the top of the Vim window, and press Ctrl-L, highlighting will have problems. C comments have not this problem. More

Re: Printing in Windows

2006-08-30 Thread Noel Henson
On Wednesday 30 August 2006 07:09, you wrote: I'm using vim 7.0.076 on Windows and I'm trying to print the current buffer. Doing a ':ha' doesn't work because it is trying to copy the file to LPT1: C:\WINDOWS\system32\cmd.exe /c copy C:\WINDOWS\TEMP\VIp1C.tmp LPT1: C:\WINDOWS\TEMP\VIo1D.tmp

Re: [VIM] Re: search/replace from a given column

2006-08-30 Thread Walter Cazzola
On Tue, 29 Aug 2006, Tim Chase wrote: :%s/\%15cfoo\%30c/bar/g will substitute foo with bar only between columns 15 and 30 (adjust for the off-by-one that may or not may occur) great this one is doing exactly what I was looking for, thanks a lot. I imagine that regular expression

Re: Printing in Windows

2006-08-30 Thread Chris Sutcliffe
According to ':help ha' a dialog is supposed to be displayed to allow selection of printer, paper size, etc. Unfortunately this isn't happening, is there something I'm missing? Go to your printer and fax settings. Right-click on the printer and select properties. Click the Ports tab. Click

Re: Printing in Windows

2006-08-30 Thread Tim Chase
It will work. The problem is I have mulitple network printers and depending on where I am I will have to set the LPT1 port each time. I'm just curious since the help states that the print dialog should be displayed why it is not. You are correct...or your expectations are. :) It does work as

Re: Printing in Windows

2006-08-30 Thread Chris Sutcliffe
Though you didn't specify whether you're using vim or gvim, I don't know if using non-gvim would exhibit odd behaviors like you describe. Additionally, are you using the default build, or perhaps something like a cygwin build? Don't know if that has anything to do with it. I'm using gvim

Re: Printing in Windows

2006-08-30 Thread Tim Chase
I'm using gvim compiled from source with MinGW. I've tried using 'Print' from the 'File' menu as well as ':ha' and they both behave the same. Under the covers, they should be the same thing, so I'm not surprised you get the same behavior. :) pexpr? printexpr=system('copy' . ' ' .

Re: Printing in Windows

2006-08-30 Thread Tim Chase
:set pexpr= I get E15: Invalid expression errors. Additionally, the Compilation section of the output from :version might give further hints. Particularly information about being linked to comdlg32.lib, comctl32.lib, gdi32.lib, shell32.lib, and winspool.lib (though others might be

Re: Printing in Windows

2006-08-30 Thread Chris Sutcliffe
Solved!!! Strangely, I get an error about pexpr not being available in my default win32 build (I don't have +postscript built in). Maybe having +postscript precludes the use of the Win32 common print dialog? That is indeed the issue. I disabled postscript and now the print dialog displays

Re: Latex-Spellchecker and C-s freezes Vi

2006-08-30 Thread Yakov Lerner
On 8/30/06, Thomas Unternaehrer [EMAIL PROTECTED] wrote: 2. Every time I hit C-s Vi freezes immediately (have to close the window). I tried to unmap it with map C-s Nop and map! C-s Nop and tried to map it to something different with imap C-s ESC:wCRi but nothing helped. This is issue of your

Re: Printing in Windows

2006-08-30 Thread A.J.Mechelynck
Chris Sutcliffe wrote: Solved!!! Strangely, I get an error about pexpr not being available in my default win32 build (I don't have +postscript built in). Maybe having +postscript precludes the use of the Win32 common print dialog? That is indeed the issue. I disabled postscript and now the

Copy/paste to another console

2006-08-30 Thread budsz
Hi, 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

Re: Copy/paste to another console

2006-08-30 Thread Yakov Lerner
On 8/30/06, budsz [EMAIL PROTECTED] wrote: Hi, 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

Re: Copy/paste to another console

2006-08-30 Thread Gabriel B.
Shift+insert because it's a pain to have to use the mouse. btw, i think the first ctrl+ins, shift+ins, shift+del copy/paste/cut where intended to use with the mouse with the left hand. just a random tought :) On 8/30/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 8/30/06, budsz [EMAIL

Re: Copy/paste to another console

2006-08-30 Thread Tim Chase
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

Re: Copy/paste to another console

2006-08-30 Thread Gabriel B.
Ooops. i don't think you can do that btw. ignore my previous answer, please you are copying from two putty under windows. so you must pass the text to the windows clipboard. i don't have a windows box right now, but i'm pretty sure putty don't gets vim's yanks. but if you manage to pass it to

gvim + gnome nautilus

2006-08-30 Thread Gabriel B.
I've used gvim with gnome for some time. Now when i try to open a file with right click in the file nautilus' icon, open with gvim. I get: Erreur détectée en traitant BufReadCmd Auto commandes pour file://*: error detected treating BufReadCmd Auto commandes for file://*: is it something i

Re: Copy/paste to another console

2006-08-30 Thread A.J.Mechelynck
budsz wrote: Hi, 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

Re: Copy/paste to another console

2006-08-30 Thread Gary Johnson
On 2006-08-31, budsz [EMAIL PROTECTED] wrote: Hi, 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

Re: gvim + gnome nautilus

2006-08-30 Thread A.J.Mechelynck
Gabriel B. wrote: I've used gvim with gnome for some time. Now when i try to open a file with right click in the file nautilus' icon, open with gvim. I get: Erreur détectée en traitant BufReadCmd Auto commandes pour file://*: error detected treating BufReadCmd Auto commandes for file://*: is

I have got one ml_get error

2006-08-30 Thread Akria Sheng
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