Re: Makefile indentation with spaces for line continuation

2006-06-15 Thread Eric Arnold
If you want to flag errors, why not use highlighting? Actually, the makefile syntax I'm seeing already highlights correct backslashes. So, in general, you know there is an error if the code/text isn't colored right. I don't see a way to tell Vim to indent with tabs sometimes and not others. On

Re: search count from visual mode

2006-06-15 Thread Mathias Michaelis
Hi Gerald > For instance, with > >map / > > hitting "3" + will have the search do with a count of 3 (taken from > v:count and v:count1). How would we have it so it takes from g:mycount > instead? > What about: :map "" . g:mycount . "/" With best regards Mathias

Nread fails to browse remote ftp

2006-06-15 Thread Steve Hall
Vim 7.0.17, netrw version 99...when I do: :Nread ftp://ftp.vim.org/ after entering username/password, I get the following errors: Error detected while processing function 73_NetRead: line 179: local: ./tmp/v454568/0: No such file or directory Error detected while processing function 73_Ne

Makefile indentation with spaces for line continuation

2006-06-15 Thread John Orr
Hi, I'm currently implementing a make system with GNU Make and have been trying for a while to work out how to get the indentation working as I would like it to. I believe it is reasonably standard when editing makefiles to set noexpandtab such that tabs are inserted when you start the commands

Inability to map when completion popup is visible

2006-06-15 Thread Hari Krishna Dara
I am trying to map and to behave differently when pumvisible() returns true, but Vim seems to completely ignore this. E.g., if I create this unconditional map (a much simpler one than what I wanted): inoremap pressing ^N normally stops insertmode, but when popup is visible, Vim never execute

Re: Newbie notation question: hotkeys

2006-06-15 Thread A.J.Mechelynck
[EMAIL PROTECTED] wrote: Hi, I found a great perlsupport addon for vim, and love it so far. I am trying to figure out how to use the hotkeys, but cannot figure out how to translate the notation into keystrokes. can anyone walk me through what is meant by the hotkey definitions at: http:/

Newbie notation question: hotkeys

2006-06-15 Thread matt.pettis
Hi, I found a great perlsupport addon for vim, and love it so far. I am trying to figure out how to use the hotkeys, but cannot figure out how to translate the notation into keystrokes. can anyone walk me through what is meant by the hotkey definitions at: http://lug.fh-swf.de/vim/vim-doc/

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Gerald Lai
On Thu, 15 Jun 2006, Sylvain wrote: [snip] I'm using setline() function to replace the line..so I will delete it before I add mine, it's not very elegant so if anyone has a better way, I will take it also :-) [snip] I modified Vimtip#329 some time ago to be able to swap visual highlighted wor

Re: search count from visual mode

2006-06-15 Thread Gerald Lai
On Thu, 15 Jun 2006, Mathias Michaelis wrote: Hi Gerald Given a new buffer with these 2 lines: 1x2x3x4x 5x6x7x8x Put cursor on "1". Then type: v3:/x where is Ctrl-u and is Enter. Shouldn't the cursor be on the "x" between "3" & "4" instead of on "5", just like you would with typing:

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Eric Arnold
On 6/15/06, Sylvain <[EMAIL PROTECTED]> wrote: ... > I get a line break at the front. You don't say if you're using > setline() or what. Both setline() and append() will use the literal > values for \r and \n. As far as I know, the only way to get it to use > them as line breaks is to use some

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Eric Arnold
On 6/15/06, Sylvain <[EMAIL PROTECTED]> wrote: > > Also, keep in mind that \n is stored as a NULL (which is the ^@) you are > seeing. What ? \n stored as a NULL ? I don't understand.. For me \n is 0x0A so what you mean ? Yes, \n when stored in a Vim variable/register/etc, is stored as a N

Re: Bug 1492165 - Dictionary function chaining

2006-06-15 Thread Eric Arnold
Your example produces the result shown for me, gt6 = {'cylinder': 6, 'manufacture': 'Triumph'} without installing the patch. What is happening for you? On 5/20/06, Richard Emberson <[EMAIL PROTECTED]> wrote: Just an FYI, I've just submitted a demonstration patch that allows one to do diction

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Sylvain
Vim's line endings are a bit complicated. Whether a or is treated as a literal character or a line break depends on context. First, what is the value of "fileformat"? This will determine whether \n or \r\n is the standard line break. It's an unix file format Secondly, how are you using the

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Sylvain
No, or course it's not the same mistake, I don't precise but I try with \\r and so one.. Thanks anyway :) - Original Message - From: "Charles E Campbell Jr" <[EMAIL PROTECTED]> To: "Sylvain" <[EMAIL PROTECTED]> Cc: Sent: Thursday, June 15, 2006 6:20 PM Subject: Re: ***SPAM*** Problem

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Eric Arnold
Vim's line endings are a bit complicated. Whether a or is treated as a literal character or a line break depends on context. First, what is the value of "fileformat"? This will determine whether \n or \r\n is the standard line break. Secondly, how are you using the "lineString" value? When

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Charles E Campbell Jr
Sylvain wrote: But I have another little problem, if, always for example, I put let lineString="\r".substitute(lineString, '\(\w\+\)\(\s\+\)\(\w\+\)','\3\2\1', 'g') or change the \r by \n or \r\n or \n\r (always between double quote ;-)) Vim add ^M or ^@ Looks like the same mistake -- if you

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Sylvain
Thanks for the trick, I love it already :-) - Original Message - From: "Eric Arnold" <[EMAIL PROTECTED]> To: "Charles E Campbell Jr" <[EMAIL PROTECTED]> Cc: "Sylvain" <[EMAIL PROTECTED]>; Sent: Thursday, June 15, 2006 5:25 PM Subject: Re: ***SPAM*** Problem with regexp in macro > le

Re: Bug 1492165 - Dictionary function chaining

2006-06-15 Thread Bram Moolenaar
Richard Emberson wrote: > Just an FYI, I've just submitted a demonstration patch > that allows one to do dictionary function chaining. > Some of you might be interested in extending the > patch to include value access via applying a key > to the results of a function (if the function returns > a

Re: Fw: [Ctags] Ctags-5.6 released

2006-06-15 Thread Bram Moolenaar
Yegappan Lakshmanan wrote: > - Forwarded Message > From: Darren Hiebert <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Sent: Tuesday, May 30, 2006 4:26:23 PM > Subject: [Ctags] Ctags-5.6 released > > Hello friends, > > I know it has been an eternity since my previous release of ctags an

Re: Highlight macroses in source code

2006-06-15 Thread Benji Fisher
On Wed, Jun 14, 2006 at 02:29:59PM +0400, Agibov Dmitry wrote: > > Hi, All! > > In my source code I have some c-like macroses > How can I highlight this macroses? It it possible? > > What I want is > > file1 header_file.h > ... > #define MYVAR 1 > ... > > file2 my_source_code.c > > #include "

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Sylvain
Ok, thank you very much, it's works now :-) But I have another little problem, if, always for example, I put let lineString="\r".substitute(lineString, '\(\w\+\)\(\s\+\)\(\w\+\)','\3\2\1', 'g') or change the \r by \n or \r\n or \n\r (always between double quote ;-)) Vim add ^M or ^@ Note : a

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Eric Arnold
> let lineString=substitute(lineString, "\(\w\+\)\(\s\+\)\(\w\+\)", > "\3\2\1", "g") BTW, here's another trick (I've become a \v convert :-) let lineString=substitute(lineString, '\v(\w+)(\s+)(\w+)',

Re: Vim7 auto-downloading spell dictionary

2006-06-15 Thread Steve Hall
From: Bram Moolenaar, Jun 15, 2006 8:53 AM > Steve Hall wrote: > > > > But now I'm noticing that it won't offer to download the file > > unless my username has permissions on the runtime /spell > > directory. Surely Vim doesn't expect that by default, do I need to > > create someplace in userland o

Re: Vim 7 Syntax problems?

2006-06-15 Thread Benji Fisher
On Wed, Jun 14, 2006 at 10:13:37AM -0400, Jack Donohue wrote: > Just started using vim 7 (I know, I'm a "late adopter"), and mostly I like > it, but I've noticed a couple of quirks. One is that it seems to lose > syntax context when switching windows. I will have a perl source file > open, ev

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Charles E Campbell Jr
Sylvain wrote: Hi ! For example, consider this regexp : s:\(\w\+\)\(\s\+\)\(\w\+\):\3\2\1: It swap 2 first words on a line, if we test it, it's works.. Now I want to make a function to do this job so I put in my .vimrc : map :call Swap2Words() function! Swap2Words() let lineNumber=line("

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Yakov Lerner
On 6/15/06, Sylvain <[EMAIL PROTECTED]> wrote: For example, consider this regexp : s:\(\w\+\)\(\s\+\)\(\w\+\):\3\2\1: It swap 2 first words on a line, if we test it, it's works.. Now I want to make a function to do this job so I put in my .vimrc : map :call Swap2Words() function! Swap2Words

***SPAM*** Problem with regexp in macro

2006-06-15 Thread Sylvain
Hi ! For example, consider this regexp : s:\(\w\+\)\(\s\+\)\(\w\+\):\3\2\1: It swap 2 first words on a line, if we test it, it's works.. Now I want to make a function to do this job so I put in my .vimrc : map :call Swap2Words() function! Swap2Words() let lineNumber=line(".") let lineStri

Re: Vim7 auto-downloading spell dictionary

2006-06-15 Thread Bram Moolenaar
Steve Hall wrote: > On Wed, 2006-06-14 at 15:28 +0200, Bram Moolenaar wrote: > > > > Then Vim should offer you to download a missing spell file. I can't > > guess why this doesn't happen for you... > > I figured out my main problem: I had a beta (unstable) runtime with a > bad URL. > > But now

Re: Vim7 auto-downloading spell dictionary

2006-06-15 Thread Steve Hall
On Wed, 2006-06-14 at 15:28 +0200, Bram Moolenaar wrote: > > Then Vim should offer you to download a missing spell file. I can't > guess why this doesn't happen for you... I figured out my main problem: I had a beta (unstable) runtime with a bad URL. But now I'm noticing that it won't offer to d

Re: search count from visual mode

2006-06-15 Thread Mathias Michaelis
Hi Gerald > Given a new buffer with these 2 lines: > > 1x2x3x4x > 5x6x7x8x > > Put cursor on "1". Then type: > >v3:/x > > where is Ctrl-u and is Enter. > > Shouldn't the cursor be on the "x" between "3" & "4" instead of on "5", > just like you would with typing: > >3/x > > instead

Re: nmap, scripts and UTF-8

2006-06-15 Thread A.J.Mechelynck
Jan Weytjens wrote: Hi Tony, my impression is that autocmd EncodingChanged * call SpecialMaps() is not executed (for a reason unknown to me). The following makes the mappings work right a way: autocmd FileType xml,xsd,wsdl set encoding=utf-8 autocmd FileType xml,xsd,wsdl

search count from visual mode

2006-06-15 Thread Gerald Lai
Given a new buffer with these 2 lines: 1x2x3x4x 5x6x7x8x Put cursor on "1". Then type: v3:/x where is Ctrl-u and is Enter. Shouldn't the cursor be on the "x" between "3" & "4" instead of on "5", just like you would with typing: 3/x instead ? -- Gerald

Re: nmap, scripts and UTF-8

2006-06-15 Thread A.J.Mechelynck
Jan Weytjens wrote: Changing the order does not make a difference. Meanwhile I noticed that it is not necessary to first change the encoding to latin1. Simply setting encoding to utf-8 (in a file for with encoding is already set to utf-8!) suffices to make the mappings work. Alt-X to add XML

Re: nmap, scripts and UTF-8

2006-06-15 Thread Jan Weytjens
Hi Tony, my impression is that autocmd EncodingChanged * call SpecialMaps() is not executed (for a reason unknown to me). The following makes the mappings work right a way: autocmd FileType xml,xsd,wsdl set encoding=utf-8 autocmd FileType xml,xsd,wsdl call SpecialMaps()

Re: nmap, scripts and UTF-8

2006-06-15 Thread Jan Weytjens
Changing the order does not make a difference. Meanwhile I noticed that it is not necessary to first change the encoding to latin1. Simply setting encoding to utf-8 (in a file for with encoding is already set to utf-8!) suffices to make the mappings work. Alt-X to add XML comments (the last li

Re: nmap, scripts and UTF-8

2006-06-15 Thread A.J.Mechelynck
Jan Weytjens wrote: Hi Tony, with the error corrected: for files for which the encoding is set to utf-8 in my _vimrc the mappings don't work after the files are opened, but they do work if I change the encoding to latin1 (at the ex prompt), then back to utf-8. So, some progress ... Jan The f

Re: nmap, scripts and UTF-8

2006-06-15 Thread Jan Weytjens
Hi Tony, with the error corrected: for files for which the encoding is set to utf-8 in my _vimrc the mappings don't work after the files are opened, but they do work if I change the encoding to latin1 (at the ex prompt), then back to utf-8. So, some progress ... Jan