you could create a short "wrapper" script, e.g. "vicp.sh" :

vi vicp.sh

        #!/bin/bash
        # vicp.sh - created 2015-09-01 jm - wrapper script to copy files before and after edit
        /usr/bin/cp $1 $1.before-`date +'%Y%m%d-%H%M'`
        ##################################################################################
                #  if desired, add an archive Directory path to copied file name, e.g.
                #    uncomment the following 2 lines and comment out the line above this comment
                #  mkdir BAK 
                #  /usr/bin/cp $1 BAK/$1.before-`date +'%Y%m%d-%H%M'`
        ##################################################################################
        /usr/bin/vi $1
        /usr/bin/cp $1 $1.after-`date +'%Y%m%d-%H%M'`
        ##################################################################################
                #  if desired, add an archive Directory path to copied file name, e.g.
                #    uncomment the following 2 lines and comment out the line above this comment
                #  /usr/bin/cp $1 BAK/$1.after-`date +'%Y%m%d-%H%M'`
        ##################################################################################
        /usr/bin/ls -l $1*
        /usr/bin/ls -l BAK/$1*


make it executable and put it in your "bin" directory:
------------------------------------------------
--> chmod 744 vicp.sh
------------------------------------------------
--> which vicp.sh 
/home/luser/bin/vicp.sh
------------------------------------------------
(you could also drop the .sh, so you'd only have to type:   vicp filename )

EXAMPLE: 
--> vicp dead.letter
-rw------- 1 luser users 324 Sep  1 15:39 dead.letter
-rw------- 1 luser users 324 Sep  1 15:39 dead.letter.after-20150901-1539
-rw------- 1 luser users 325 Sep  1 15:39 dead.letter.before-20150901-1539

copy below, and paste into a new file, save as vicp (or vicp.sh):

uncomment BAK versions and comment out the plain versions #!/bin/bash # vicp.sh - created 2015-09-01 jm - wrapper script to copy files before and after edit ################################################################################## # define variables (if your shell does not recognize the variables, export them) CP="/usr/bin/cp" # change path if which shows /bin/cp VI="/usr/bin/vi" # change path if which shows /bin/vi LS="/usr/bin/ls -l" # change path if which shows /bin/ls DATE="/usr/bin/date" # change path if which shows /bin/date MKD="/usr/bin/mkdir" # change path if which shows /bin/mkdir ########################################################################################## ## remove comments on the following lines to make a local directory for archived copies # $MKD BAK # $CP $1 BAK/$1.before-`$DATE +'%Y%m%d-%H%M'` # remove first comment to copy to BAK dir # $VI $1 # $CP $1 BAK/$1.after-`$DATE +'%Y%m%d-%H%M'` # remove first comment to copy to BAK dir # $LS BAK/$1* ########################################################################################## ## add comments on the following lines if you use the BAK directory for local archives $CP $1 $1.before-`$DATE +'%Y%m%d-%H%M'` # add a comment if you only want to copy to BAK $VI $1 $CP $1 $1.after-`$DATE +'%Y%m%d-%H%M'` # add a comment if you only want to copy to BAK $LS $1* $LS BAK/$1* ##################################################################################

ebook:
Full Size
Jeep Buyer's
Guide
ebook:
Practical Suggestions
for Microsoft
Windows
Linux Tackles Microsoft
12 hour Video Course by john:
The Art of Linux System Administration
published by O'Reilly Media
Study Guide for the LPIC-2 Certification Exams
search for:
on the internet, or:
JohnMeister.com-fotos
LinuxMeister-Linux
BibleTech-
Bible overview


An overview of Biblical history:
"Promises and Prophets"

Wagoneers

FULL SIZE JEEPS

JeepMeister
"Jeep is America's
only real sports car."
-Enzo Ferrari


MeisterTech
Diesels +

One Page Overview of Linux Commands

click for an image of the 5 essential Linux commands

An Intro to Linux
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983
purchase AMSOIL
at Midway Auto on SR9 in Snohomish,
or at Northland Diesel in Bellingham, WA


SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)