sponsor Vim development Vim logo Vim Book Ad

basic Tip #1413: Make tar of all files in vim buffer

 tip karma   Rating 160/43, Viewed by 1530 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   November 23, 2006 3:44      complexity:   basic
author:   Eric Smith      as of Vim:   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.

 rate this tip  Life Changing Helpful Unfulfilling 

<< Automatically create/set tmp or backup directories | manage a tasklist of TODO code snippets (e.g. //TODO) >>

Additional Notes

Anonymous, November 25, 2006 6:56
You probably mean

:silent bufdo !tar -rvf archive.tar %:p
http://successtheory.com/tips/, November 25, 2006 12:30
Zip Version
Zip all the files in your vim session

:silent bufdo !zip proj.zip %
jake, November 25, 2006 18:29
you probably want to use mksession to save your window setup also?
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Sponsored by Web Concept Group Inc. SourceForge.net Logo