Antony Scriven | 1 Oct 01:14 2004

RE: Help!! :substitute problem

Hi Keith

Keith Roberts wrote:

 > Tim Chase
 > >[K.R.]
 > >> As I just replied to Antony, I don't want to require
 > >> all the args to be quoted when being typed in. [...]
 > 
 > [...]
 > 
 > I'm using Test() and :Test for testing, but the actual
 > func and cmd are Redir() and :Redir [redir the output of
 > any series of commands to a nofile window].
 > 
 >      :Redir map ls 'set all' abbrev let
 > 
 > But I wanted to make it as general as possible, allowing for:
 > 
 >      :Redir map|ls|set all|abbrev|let
 > 
 > [which works, btw, using <q-args> but wouldn't using <f-args>].

I think that for the flexibility you want, you'll have to
use <q-args> then parse the string yourself. Something like
this:

   fun! Test(cmdstring)
           let cmdstring = a:cmdstring
           while cmdstring != ''
(Continue reading)

Antony Scriven | 1 Oct 01:20 2004

RE: Help!! :substitute problem

I wrote:

 >    fun! Test(cmdstring)
 >            let cmdstring = a:cmdstring
 >            while cmdstring != ''
 >                    let pat = '^\v([' . "'" . '"])?(.{-})\1%(\s|$)(.*)'
 >                    let cmd = substitute(cmdstring, pat, '\2', '')
 >                    let cmdstring = substitute(cmdstring, pat, '\3', '')
 >                    echo cmd
 >            endwhile
 >    endfun
 >    command! -nargs=* Test call Test(<q-args>)
 > 
 >    :Test "a a a" a a 'aa aa'
 >    a a a
 >    a
 >    a
 >    aa aa

The `\s' in pat should be `\s+'.

Antony

Dave Silvia | 1 Oct 01:50 2004

RE: Help!! :substitute problem

Try

	echo substitute(kwa,"^\\(['".'\"]\)\(.\{-}\)\1$','\2',"")

thx,
Dave S. 

*** -----Original Message-----
*** From: Keith Roberts [mailto:kroberts <at> wpas-inc.com]
*** Sent: Thursday, September 30, 2004 2:36 PM
*** To: vim <at> vim.org
*** Subject: Help!! :substitute problem
*** Importance: High
*** 
*** 
*** I do the following ...
***    :let kwa = "'set all'"
***    :echo substitute(kwa,"^\(['\"]\)\(.*\)\1$",submatch(2),"")
*** 
*** I *expect* to get "set all", but instead I get "'set all'" (ie, nothing
*** changed).  Why?!?
*** 
*** -- 
*** Keith W. Roberts     Home: keith.roberts5 <at> xxverizonxx.net
*** WPAS, Inc.           Work: kroberts <at> xxwpas-incxx.com
*** P.O. Box 34203       Phone: (206) 441-7574 x. 3810
*** Seattle, WA  98124   Fax:   (206)682-5826 / 441-9110
*** (remove x's from email addresses)
*** 
***  
(Continue reading)

Sanjeev Sapre | 1 Oct 05:38 2004

RE: Whythere is folder called vimfiles?

I do used to use some plug ins and sytanx file changes but i used to do it in vim63 only ( or vim62 earlier ) now i
will do it in vimfiles.
in fact this has solved my another problem. i use one zip file ( customize.zip )containing all the
plugins/syntax files with path. so whenever i install vim on new machine i just have to unzip it so files go
into their proper path. so customizing to my taste was very fast and easy.  earlier i have problem that when
version changes say from vim61 to vim 62 then my path in zip files become invalid. with "vimfiles" i can use
same zip file to customize vim immediately.

regards
Sanjeev

-----Original Message-----
From: Keith Roberts [mailto:kroberts <at> wpas-inc.com]
Sent: Friday, October 01, 2004 1:14 AM
To: Sanjeev Sapre; vim <at> vim.org
Subject: RE: Whythere is folder called vimfiles?

>-----Original Message-----
>From: Sanjeev Sapre [mailto:SanjeevS <at> KPITCummins.com] 
>Sent: Tuesday, September 28, 2004 10:27 PM
>To: vim <at> vim.org
>Subject: Whythere is folder called vimfiles?
>
>Hello,
>When I install VIM on windows. I have two folders under vim. 
>viz. vim63 and vimfiles. It is observed that vim63 and 
>vimfiles have same subfolders. But vimfiles has no any files 
>in subfolders. What is the purpose of these folder? Can I remove it ?
>
>Regards,
(Continue reading)

BStrohhaecker | 1 Oct 08:36 2004

RE: vimrc on windows

Hi Mathias

> -----Original Message-----
> From: Mathias Michaelis [mailto:michaelis <at> tcnet.ch]
> Sent: Thursday, September 30, 2004 4:43 PM
> To: vim <at> vim.org
> Subject: Re: vimrc on windows
> 
> 
... 
> I see! But googling around gave me the impression that this is an
> undocumented feature of NTFS. So I was afraid to play with it and to
> spend an undefined amount of time to finding out how it works and
> how to restore data when my file system is down. Perhaps I am 
> wrong :-\
>

I think so. See:

<http://support.microsoft.com/default.aspx?scid=kb;en-us;q205524>

I prefer sysinternals's junction.exe to use them.

Regards, Bernd
--

-- 

> junction /?

Junction v1.03 - Win2K junction creator and reparse point viewer
Copyright (C) 2000-2002 Mark Russinovich
(Continue reading)

Carlos Beltran | 1 Oct 09:48 2004
Picon

binary value from "ga" command

Hello all,

I would like to get also the binary value of a caracter when using the "ga"
command. Is there a way to do this? is there another alternative to do this
a part of modifing somehow the "ga" command?

Thank you,

Carlos.

Mathias Michaelis | 1 Oct 10:50 2004
Picon

Re: vimrc on windows

Hi Bernd,

>> Perhaps I am wrong :-\
>>
> I think so. See:
> 
> <http://support.microsoft.com/default.aspx?scid=kb;en-us;q205524>
> 
> I prefer sysinternals's <http://www.sysinternals.com> junction.exe
> to use them.
>
Wow! Thanks for this hint! Now I have to think about to change my
configuration of vim :-)

Regards,
Mathias

--

-- 

Antoine J. Mechelynck | 1 Oct 11:21 2004
Picon

Re: binary value from "ga" command

Carlos Beltran <cbeltran <at> dist.unige.it> wrote:
> Hello all,
>
> I would like to get also the binary value of a caracter when using
> the "ga" command. Is there a way to do this? is there another
> alternative to do this a part of modifing somehow the "ga" command?
>
> Thank you,
>
> Carlos.

I suppose you could write a command or function using char2nr() on the 
character under the cursor and converting dec to bin yourself -- not very 
fast but no need to recompile.

Regards,
Tony. 

A. S. Budden | 1 Oct 12:57 2004

Re: Mandrake problems again

Thus spake Guido Milanese:
> Thanks for your kind answer.
> 
> > :help 'guioptions'
> no help available! I had already tried this.
> 
> > 
> > Likely, you want to add
> > 
> > 	:set guioptions+=m
> nothing happens...
> 
> very strange. I'm afraind I'll have to install Mandrake again...

That shouldn't be necessary.  If it helps, I have an rpm of my own for
vim 6.3 that was compiled on Mandrake 10 Official.  I can stick it
somewhere that you can have access to if you're interested.

Al

vim --version:

VIM - Vi IMproved 6.3 (2004 June 7, compiled Aug 20 2004 16:15:33)
Included patches: 1-13
Compiled by A. S. Budden <vim.mail <at> southparade.vispa.com>
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+cryptv +cscope +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval 
+ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer 
(Continue reading)

J.P. | 1 Oct 13:46 2004
Picon

Mapping ` to <Esc>

Whenever I try to map ` (back quote) to <Esc> (Escape), it doesn't work.

The command I'm using is:
:map ` <Esc>

However, whenever I'm in insert mode, it just types "<Esc>".  I've
tried using the :imap command, too; it doesn't help either.

Thanks in advance.

-- J.P.