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