🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #14469

Re: [vim] pasar el nombre del fichero a una variable.

#14469
From: Benjamín Albiñana Pérez
Date: Tue, 07 Nov 2000 00:00
60 lines
2531 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 Cuando: 6 Nov 2000 22:27:45 GMT
 Quien: Jaime Suarez <jsuarez@cachonero.org>
 Que: Re: [vim] pasar el nombre del fichero a una variable.


>�Te sirve algo de esto? (en vim :help make_makeprg)
>==============
>    ":!{makeprg} [arguments] {shellpipe} {errorfile}".
>
>{makeprg} is the string given with the 'makeprg' option.
>Any command can be used, not just "make".  Characters '%'
>and '#' are expanded as usual on a command-line.  You can
>use "#<" to insert the current file name without extension,
>for example:
>  :set makeprg=make\ #<.o

  �Exactamente lo que necesitaba! Con esto la funci�n queda:

fun! Mocka()
    let inp = input ("Compile, Link, eXecute, Edit  ")
    if inp == "c"
        set mp=/usr/bin/mocka\ -c\ %<
        make
    elseif inp == "l"
        set mp=/usr/bin/mocka\ -p\ %<
        make
    elseif inp == "x"
        set mp=./%<
        make
    else
        echo ""
    endif
endfun

  Que se asemeja mucho al compilador de modula para windows
  (sobre todo que es igual de cutre :-)

  El resto de las funciones las dejo para cuando llegue a
  esa lecci�n ;-)

  Much�simas gracias, Jaime. 

- -- 
Benjam�n Albi�ana P�rez
Linux User N�78177                         http://www.escomposlinux.org/
Clave p�blica: wget http://www.escomposlinux.org/benalb/benjamin-gpg.asc
Come sano, mantente en forma, y muere de todos modos. 


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6CCAm633hg168lHwRAo4KAKCo4T4Wgl7m+cNSZH7bXNh14dJ0XwCgiQ9y
kmWYJe9YDboJUJ+WFbo2IIg=
=pe0V
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn90g814.k5u.benjamin@lamanonegra.net.dhis.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn908jrf.unk.benjamin@lamanonegra.net.dhis.org> <slrn90e14p.k9.jsuarez@cachonero.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,d06250fd9289765b
X-Google-Attributes: gidf86c8,public
From: benjamin@lamanonegra.net.dhis.org (Benjamín Albiñana Pérez)
Subject: Re: [vim] pasar el nombre del fichero a una variable.
Date: 2000/11/07
Message-ID: <slrn90g814.k5u.benjamin@lamanonegra.net.dhis.org>
X-Deja-AN: 690829727
Content-Transfer-Encoding: 8bit
References: <slrn908jrf.unk.benjamin@lamanonegra.net.dhis.org> <slrn90e14p.k9.jsuarez@cachonero.org>
Content-Type: text/plain; charset=iso-8859-1
X-Trace: fu-berlin.de 973612826 1284886 62.36.13.250 (16 [31308])
Organization: Debian: the biggest, still the best
Mime-Version: 1.0
User-Agent: vimnus.0.0.a1 (Linux)
Reply-To: benjamin@lamanonegra.net.dhis.org
Newsgroups: es.comp.os.linux.programacion