diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-22 18:10:49 +0100 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-22 18:10:49 +0100 |
| commit | d38df4805e2c4b2a7b8aeee6e53d557bef5d67e3 (patch) | |
| tree | fb3074e22b5e980831511293f541bf97d6428541 /teco.ini | |
| parent | a37daa872ce648f201d26d0d6c3deff2bb54c354 (diff) | |
added a buffer session module (session.tes)
This is a simple and straight-forward implementation of
buffer sessions in SciTECO. A session is merely a SciTECO script
that opens files when executed (and restores properties).
The current session is identified by this script's filename in
Q-Register "session.path": ~/.teco_session by default.
Users may set "session.path" to manage different profiles.
An abstraction of session "names" is not provided. Users are expected
to hack these on their own.
For the common task of having one session per profile, the
"session.git" macro is provided. It set's up the current session
relative to the current Git repository.
This will create ".teco_session" files in the root of Git
repositories, that may be added to a global ignore pattern (or they
may even be versioned!)
Diffstat (limited to 'teco.ini')
| -rw-r--r-- | teco.ini | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -4,13 +4,18 @@ EMQ[$SCITECOPATH]/color.tes :EMQ[$SCITECOPATH]/colors/terminal.tes -! Load lexer library ! +! Load lexer and buffer session libraries ! EMQ[$SCITECOPATH]/lexer.tes +EMQ[$SCITECOPATH]/session.tes -! Automatic lexing using ED hooks ! +! 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 !add! + ! Add code here to execute when a document is added ! M[lexer.auto] ! Set up margins ! 33ESTEXTWIDTH9U.w @@ -21,13 +26,16 @@ EMQ[$SCITECOPATH]/lexer.tes !edit! ! Add code here to execute when a document is edited ! + Oend !close! ! Add code here to execute when a document is closed ! + Oend !quit! ! Add code here to execute when SciTECO quits ! -} + M[session.save] +!end!} 0,32ED ! Keyboard macros ! @@ -35,8 +43,13 @@ EMQ[$SCITECOPATH]/fnkeys.tes ! Uncomment to enable default keyboard macros ! ! 0,64ED ! -! open all files specified on the commandline ! -[.f - <:L;R 0X.f EBQ.f EB L> -].f --EF +! open all files specified on the commandline + If no file is specified, load the last buffer session ! +Z"= + M[session.load] +| + [.f + <:L;R 0X.f EBQ.f EB L> + ].f + -EF +' |
