1*84d9c625SLionel Sambuc# @(#)autowrite 8.3 (Berkeley) 2/17/95 2*84d9c625SLionel Sambuc 3*84d9c625SLionel SambucVi autowrite behavior, the fields with *'s are "don't cares". 4*84d9c625SLionel Sambuc 5*84d9c625SLionel Sambuc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 6*84d9c625SLionel SambucCommands that are affected only by autowrite: 7*84d9c625SLionel Sambuc 8*84d9c625SLionel SambucCommand File Autowrite? Action: 9*84d9c625SLionel Sambuc modified? 10*84d9c625SLionel Sambuc----------------------------------------------- 11*84d9c625SLionel Sambuc^Z Y Y Write file and suspend. 12*84d9c625SLionel Sambuc^Z Y N Suspend. 13*84d9c625SLionel Sambuc^Z N * Suspend. 14*84d9c625SLionel Sambuc 15*84d9c625SLionel Sambuc# This behavior is NOT identical to :edit. 16*84d9c625SLionel Sambuc^^ Y Y Write file and jump. 17*84d9c625SLionel Sambuc^^ Y N Error. 18*84d9c625SLionel Sambuc^^ N * Jump. 19*84d9c625SLionel Sambuc 20*84d9c625SLionel Sambuc# The new nvi command ^T (:tagpop) behaves identically to ^]. 21*84d9c625SLionel Sambuc# This behavior is identical to :tag, :tagpop, and :tagpush with 22*84d9c625SLionel Sambuc# force always set to N. 23*84d9c625SLionel Sambuc^] Y Y Write file and jump. 24*84d9c625SLionel Sambuc^] Y N Error. 25*84d9c625SLionel Sambuc^] N * Jump. 26*84d9c625SLionel Sambuc 27*84d9c625SLionel Sambuc# There's no way to specify a force flag to the '!' command. 28*84d9c625SLionel Sambuc:! Y Y Write file and execute. 29*84d9c625SLionel Sambuc:! Y N Warn (if warn option) and execute. 30*84d9c625SLionel Sambuc:! N * Execute. 31*84d9c625SLionel Sambuc 32*84d9c625SLionel Sambuc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 33*84d9c625SLionel SambucCommands that are affected by both autowrite and force: 34*84d9c625SLionel Sambuc 35*84d9c625SLionel SambucNOTE: the "force" flag is never passed on, i.e. the write 36*84d9c625SLionel Sambucto the file caused by the autowrite flag is never forced. 37*84d9c625SLionel Sambuc 38*84d9c625SLionel SambucCommand File Autowrite? Force? Action: 39*84d9c625SLionel Sambuc modified? (!) 40*84d9c625SLionel Sambuc------------------------------------------------------- 41*84d9c625SLionel Sambuc# The first rule (YYY) is historic practice, but seems wrong. 42*84d9c625SLionel Sambuc# In nvi, :next and :prev commands behave identically to :rewind. 43*84d9c625SLionel Sambuc:next Y Y Y Write changes and jump. 44*84d9c625SLionel Sambuc:next Y Y N Write changes and jump. 45*84d9c625SLionel Sambuc:next Y N Y Abandon changes and jump. 46*84d9c625SLionel Sambuc:next Y N N Error. 47*84d9c625SLionel Sambuc:next N * * Jump. 48*84d9c625SLionel Sambuc 49*84d9c625SLionel Sambuc:rewind Y Y Y Abandon changes and jump. 50*84d9c625SLionel Sambuc:rewind Y Y N Write changes and jump. 51*84d9c625SLionel Sambuc:rewind Y N Y Abandon changes and jump. 52*84d9c625SLionel Sambuc:rewind Y N N Error. 53*84d9c625SLionel Sambuc:rewind N * * Jump. 54*84d9c625SLionel Sambuc 55*84d9c625SLionel Sambuc# The new nvi commands, :tagpop and :tagtop, behave identically to :tag. 56*84d9c625SLionel Sambuc# Note, this behavior is the same as :rewind and friends, as well. 57*84d9c625SLionel Sambuc:tag Y Y Y Abandon changes and jump. 58*84d9c625SLionel Sambuc:tag Y Y N Write changes and jump. 59*84d9c625SLionel Sambuc:tag Y N Y Abandon changes and jump. 60*84d9c625SLionel Sambuc:tag Y N N Error. 61*84d9c625SLionel Sambuc:tag N * * Jump. 62*84d9c625SLionel Sambuc 63*84d9c625SLionel Sambuc# The command :suspend behaves identically to :stop. 64*84d9c625SLionel Sambuc:stop Y Y Y Suspend. 65*84d9c625SLionel Sambuc:stop Y Y N Write changes and suspend. 66*84d9c625SLionel Sambuc:stop Y N Y Suspend. 67*84d9c625SLionel Sambuc:stop Y N N Suspend. 68*84d9c625SLionel Sambuc:stop N * * Suspend. 69*84d9c625SLionel Sambuc 70*84d9c625SLionel Sambuc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 71*84d9c625SLionel SambucCommands that might be affected by autowrite, but aren't: 72*84d9c625SLionel Sambuc 73*84d9c625SLionel SambucCommand File Autowrite? Force? Action: 74*84d9c625SLionel Sambuc modified? (!) 75*84d9c625SLionel Sambuc------------------------------------------------------- 76*84d9c625SLionel Sambuc#:ex, and :vi (executed while in vi mode) behave identically to :edit. 77*84d9c625SLionel Sambuc:edit Y * Y Abandon changes and jump. 78*84d9c625SLionel Sambuc:edit Y * N Error. 79*84d9c625SLionel Sambuc:edit N * * Jump. 80*84d9c625SLionel Sambuc 81*84d9c625SLionel Sambuc:quit Y * Y Quit. 82*84d9c625SLionel Sambuc:quit Y * N Error. 83*84d9c625SLionel Sambuc:quit N * * Quit. 84*84d9c625SLionel Sambuc 85*84d9c625SLionel Sambuc:shell * * * Execute shell. 86*84d9c625SLionel Sambuc 87*84d9c625SLionel Sambuc:xit Y * * Write changes and exit. 88*84d9c625SLionel Sambuc:xit N * * Exit. 89