diff options
-rw-r--r-- | lib/session.tes | 9 | ||||
-rw-r--r-- | sample.teco_ini | 11 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/session.tes b/lib/session.tes index 99dce52..9b924bc 100644 --- a/lib/session.tes +++ b/lib/session.tes @@ -1,16 +1,18 @@ ! Macros for saving and loading buffer sessions ! ! Path of the session profile. - Change this to save/load a custom profile ! + Change this to save/load a custom profile. + If empty, no session will be saved. ! EU[session.path]Q[$SCITECOCONFIG]/.teco_session ! Save current session to the file specified by "session.path" ! @[session.save]{ + :Q[session.path]"= Oend ' Q*U.[curbuf] EJ< %.bEB ESGETFIRSTVISIBLELINEU.[fvline] ESGETXOFFSETU.[xoff] .U.[dot] :@EU.[session]{EBQ* \.[fvline]ESSETFIRSTVISIBLELINE \.[xoff]ESSETXOFFSET \.[dot]:J^M} - EQ* Z"= -1U.u ' + :Q*"= -1U.u ' > ! We always start with an unnamed file in the ring, so we may have to remove it: ! Q.u"F :@EU.[session]{EB -EF^M} ' @@ -18,11 +20,12 @@ EU[session.path]Q[$SCITECOCONFIG]/.teco_session E%.[session]Q[session.path] Q.[curbuf]EB -} +!end!} ! Load session specified by "session.path" ! @[session.load]{ EJ<-EF> + ! now we have only one unnamed buffer ! EQ.x ENQ[session.path] Z"= 1EB diff --git a/sample.teco_ini b/sample.teco_ini index 67ead44..9314859 100644 --- a/sample.teco_ini +++ b/sample.teco_ini @@ -8,9 +8,6 @@ EMQ[$SCITECOPATH]/color.tes EMQ[$SCITECOPATH]/lexer.tes EMQ[$SCITECOPATH]/session.tes -! Uncomment to use a separate session per Git repository ! -! M[session.git] ! - ! Automatic lexing and session management using ED hooks ! @#ED{ Oadd,edit,close,quit @@ -43,11 +40,15 @@ EMQ[$SCITECOPATH]/fnkeys.tes ! Uncomment to enable default keyboard macros ! ! 0,64ED ! -! open all files specified on the commandline - If no file is specified, load the last buffer session ! +! If files are given on the command-line, open them + and disable session saving. + Otherwise open a buffer session. ! Z"= + ! Uncomment to use a separate session per Git repository: ! + ! M[session.git] ! M[session.load] | + [session.path] ! disables session saving ! [.f <:L;R 0X.f [* EBQ.f ]* L> ].f |