[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [VI] Udførelse af shellscript på et ord



Hej Anders / sslug-vim

Quoting Palle Bratholm <sslug@sslug>:

> Hej Anders
> Nu fik jeg installeret en rigtig gammel VIM (på en rigtig gammel
> maskine, med en rigtig gammel Slackware 3.4).
> 
> De moderne tricks jeg foreslog i går virker ikke på VIM 4.6
> Men i den gode gamle online-manual blev der nævnt at i
> command-line mode (: - mode) virker konstruktionen <cword>,
> (faktisk står der at det kun virker for filnavne, så jeg testede
> det)
> 
> Eksempel: jeg oprettede et bibliotek tekst med en fil testfile i
> mit arbejdsbibliotek, så åbnede jeg vim og skrev en passende
> sætning som indeholdt ordene ls og tekst, derefter placerede
> jeg cursoren på ls og skrev:
> 
> :!<cword>
> 
> og fik samme output som med :!ls
> 
> Så jeg prøvede også, med cursoren på ordet tekst
> 
> :!ls <cword>
> 
> og fik samme output som med :!ls tekst
> 
> Håber du kan bruge det!
> 
> --
> 
> mvh
> 
> Palle Skov Bratholm
> 
> > 

Nogen kommer med guldkornene (Palle) andrer smider som jeg
et par småsten ind i ringen. 

Du skulle tage at søge efter cword i vim efter en :help
f.eks. er <cWORD> for <cword> hvad W er for w i vim.
Der er også andre varianter.

M.v.h.


Kasper.

--
Kasper Hald
Ph.D.-student in Theoretical Chemistry
Email: sslug@sslug
For further information : http://www.chem.au.dk/~khald


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *