[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 denbuffer man er i (inkl sti fra CWD)



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.


-- 
donald_j_axel donax snabela get2net.dk -- http://d-axel.dk/


 
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] *