[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 14:48:13 +0200 Kim Schulz wrote:

> hejsa
> jeg skal have kørt en kommando på den fil som er i bufferen man arbejder
> i lige nu, så derfor vil jeg gerne have fat i filnavnet inkl. sti fra
> current workdir (hvor vim blev startet op).
> Jeg skal bruge det i forbindelse med en map jeg skal lave hvor jeg 
> pt kærer noget ala:
>:imap <F11> <ESC>:w<CR>:!./makedraft analysis/portability.tex<CR><CR>i

Ikke at færdigt svar, men noget i retningen af:

:echo getcwd()."/".expand("%")

> det er analysis/port... der skal være bufferens filnavn.
>
> kan ovenstående forresten gøres smartere? 

Jeg kan ikke lige se hvorfor du skal have cwd med ind i det. 

Til at compilere en enkelt .cpp-fil, har jeg mappen:

map ,k :exec "make " . expand("%:r") . ".o" <cr><cr>

Hvis det kan give nogen inspiration.

-- 
41 6E 64 65 72 73 


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