🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#14513
From: Benjamín Albiñana Pérez
Date: Sat, 04 Nov 2000 00:00
39 lines
1815 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


  Nas,

  En vim, �como se puede pasar el nombre del fichero que
  est�s editando a una variable?  M�s o menos quiero hacer
  esto:

 
fun! Mocka()
	let uno = "XXX"
	exec '!/usr/bin/mocka -c' uno 
endfun

  donde XXX ser�a la forma de obtener el nombre del fichero
  que estoy editando, sin la terminaci�n. Es decir si estoy
  editando prueba.mi, necesito pasarle prueba. Por m�s que
  le doy vueltas, no soy capaz. Esto, que la l�nea de
  comandos funciona, no soy capaz de meterlo en la funci�n:

  :!basename % .mi

- -- 
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
Aquel que rie el �ltimo, es el que piensa m�s despacio.


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

iD8DBQE6BE9x633hg168lHwRAt3iAJ9xnD2Y74B/dq4ypNP2oCJ0441LZwCgvGWb
hrXLwinCmPzZFW1cLaOGi6E=
=Ozbd
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn908jrf.unk.benjamin@lamanonegra.net.dhis.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,d06250fd9289765b,start
X-Google-Attributes: gidf86c8,public
From: benjamin@lamanonegra.net.dhis.org (Benjamín Albiñana Pérez)
Subject: [vim] pasar el nombre del fichero a una variable.
Date: 2000/11/04
Message-ID: <slrn908jrf.unk.benjamin@lamanonegra.net.dhis.org>
X-Deja-AN: 689662447
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
X-Trace: fu-berlin.de 973361413 538240 212.73.56.82 (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