Wikia

Vim Tips Wiki

Changes: Make tar of all files in vim buffer

Edit

Back to page

(Move categories to tip template)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 4: Line 4:
 
|previous=1393
 
|previous=1393
 
|next=1431
 
|next=1431
|created=November 23, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
 
|author=Eric Smith
 
|author=Eric Smith
Line 27: Line 27:
   
 
---
 
---
You probably want to use <tt>:mksession</tt> to save your window setup also?
+
You probably want to use <code>:mksession</code> to save your window setup also?
   
 
----
 
----

Latest revision as of 06:25, July 13, 2012

Tip 1413 Printable Monobook Previous Next

created 2006 · complexity basic · author Eric Smith · version 5.7


The following command will make a tar file including path information of all files in the current Vim buffer. If you wish to omit paths, leave out the ':p'.

:silent bufdo !tar -rvf archive.tar %:p

I use it to copy projects (where all files are open in split screen), from one machine to another.

CommentsEdit

Zip version - zip all the files in your Vim session.

:silent bufdo !zip proj.zip %

--- You probably want to use :mksession to save your window setup also?


Around Wikia's network

Random Wiki