[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] [(g)vim]få fat i filnavnet fra den bufferman er i (inkl sti fra CWD)



On Mon, 04 Oct 2004 01:12:55 +0200
donald_j_axel <sslug@sslug> wrote:

> On Wed, 29 Sep 2004 15:54:01 +0200
> Anders wrote:
> 
> > >> Jeg kan ikke lige se hvorfor du skal have cwd med ind i det. 
> > > [snip]
> > > fordi min makedraft inkluderer den fil i en latex main fil inden
> > > den kompilerer den. 
> > 
> > Smart. Det lyder som en ide, jeg vil genbruge.
> 
> Ja det lyder praktisk. Men hvis der nu er noget med relativ sti
> til include filer, så kan det gå hen og blive et krav at
> vim-kommandoen udføres fra et bestemt "sted".
> 
> Og "%" filnavnet er uden full path hvis den ligger i current dir,
> ellers får den full path, så denne her
> 
> :echo getcwd()."/".expand("%")
> 
> kan i nogle tilfælde give "for meget path". Det triggede mig til
> at læse dokumentationen (uhaha), og jeg fandt ud af at gvim - 
> netop af denne grund - har en :p modifier til "%".
> 
> prøv lige denne her
> 
> :echo expand("%:p")
> 
> Desuden har vim/gvim en feature for directory-skift, :cd (det er
> altså også smart og rart!) så med fx. 
> 
> :cd /
> 
> kan man få alle filnavne til (default) at være full path.
> 

Det holder bare ikke for så smider den output filerne i / og ikke i den
mappe hvor vim er startet op. 
jeg kan godt bruge den fulde path, men lige nu er mit største problem
hvordan jeg får det ind i den anden linje
% forstår den, men resten kan den ikke finde ud af når det er i
forbindelse med min map/imap

-- 
   Kim Schulz   | Fundanemt Content Management system:         
 Geek by nature | http://www.fundanemt.com                    
   schulz.dk    | http://www.fundusers.org                    


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:45 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] *