Re: [code] [textadept] How can I save the window size before quitting?

From: Mitchell <m.att.foicica.com>
Date: Fri, 3 Mar 2017 20:28:37 -0500 (EST)

Hi Dennis,

On Fri, 3 Mar 2017, dmccunney wrote:

> On Fri, Mar 3, 2017 at 8:43 AM, Mitchell <m.att.foicica.com> wrote:
>
>> Yes, the reason is that I don't like the idea of reloading a previous
>> session if I'm passing a single filename to Textadept. Also, if you use
>> Textadept as your $EDITOR on Linux where an external program spawns an
>> instance of Textadept to edit a file (e.g. e-mail, commit message, etc.),
>> then loading a previous session is quite wrong in my opinion.
>
> I concur, but I believe the original complaint concerned the *size* of
> the editor window. That's the sort of thing I think users prefer to
> always be the same whether loading an existing session or passing
> TextAdept a file on the command line when it's defined as $EDITOR
> under Linux. A default starting window size probably ought to be a
> separately configurable TA option (or something that could be passed
> on the command line.).
>
> A menu or some such to load a previous session in that instance would
> be one option. Another might be to make loading a previous session
> the default, with a parm that could be passed on the command line to
> *not* do that when TextAdept is $EDITOR, and that parm becomes part of
> the $EDITOR definition.

Thanks for reminding me about command line options. Textadept has an `-s`
switch[1]. If you want to load the previous session on startup, even if
you pass command line file arguments, use `-s session` (note: the name of
the default session is "session"). For example:

   textadept -s session foo.c

will load everything from the default session followed by the file
"foo.c". If you always want to do this, you can alias or shortcut
'textadept' to 'textadept -s session' on Linux/OSX or Windows,
respectively.

Cheers,
Mitchell

[1]: http://foicica.com/textadept/manual.html#Command.Line.Parameters

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 03 Mar 2017 - 20:28:37 EST

This archive was generated by hypermail 2.2.0 : Sat 04 Mar 2017 - 06:33:22 EST