Re: [code] [textadept] Reorder tabs

From: Qwerky <mr.qwerky.att.gmail.com>
Date: Wed, 10 Jul 2019 11:33:21 -0600

Hi Lukas, after placing the module in /textadept/userdata/modules/, I
needed to "require" it in init.lua.  After that, it performs as
stated--well done!  It is unfortunate that positions, etc. are not
preserved, but that would obviously add much complexity to the code.

Thanks for your efforts!

qwerky

On 2019-07-10 11:21, Qwerky wrote:
>
> Hi, thanks for the response.  I have tried placing the module in
> /textadept/modules/, in /textadept/modules/textadept/, in
> /textadept/userdata/modules/ (here I have other module which I have
> made, which functions correctly), and in
> /textadept/userdata/modules/textadept/ (here also I have modified
> copies of some textadept modules which function correctly), but it
> does not function in any of these locations (right-click on any tab
> does not produce those added entries).  ??
>
> qwerky
>
> On 2019-07-10 08:34, Procházka Lukáš Ing. wrote:
>> Hello,
>>
>> On Thu, 04 Jul 2019 21:22:29 +0200, Qwerky <mr.qwerky.att.gmail.com> wrote:
>>
>>> Hi Lukas,
>>>
>>> Thanks for your efforts. Where should the module be placed?
>>
>> AFAIK the module is to be placed into "modules" directory in TA
>> installation dir.
>> Cons is that you have to "refresh" the module with each TA installation.
>>
>> Alternatively, you can put the TabBarMan.lua module in your home
>> directory/modules, i.e. "... Document and Settings ..." dir under
>> Windows.
>>
>> See
>>
>> https://foicica.com/textadept/manual.html#Modules
>>
>> especially "Installing Modules";
>> this allows you to have modules placed independently on TA installation.
>>
>> (Note also that "~/ denotes the user’s home directory. On Windows
>> machines this is the value of the “USERHOME” (or similar?)")
>>
>> Third option is to launch TA with -u option which redirect "~" to the
>> directory specified after "-u" option.
>>
>>> Once
>>> placed, how is it used?
>>
>> Just click with the RMB on the tab bar - 4 options will appear in the
>> bottom of the popup menu which allow to reorder tabs.
>> See the print-screen attached.
>>
>>> Does textadept need to be restarted?
>>
>> No, once TabBarMan has been loaded (which occurs automatically by TA
>> startup) no other restart is needed.
>>
>> Of course, if you play with TabBarMan to alter or improve its
>> functionality, you have to restart TA or at least TA Lua (press
>> Ctrl+E and type "restart" to achieve that) after you modify the
>> TabBarMan.lua.
>>
>> Best regards,
>>
>> Lukas
>>
>>
>>> qwerky
>>>
>>> On 2019-07-04 02:43, Procházka Lukáš Ing. wrote:
>>>> Hello,
>>>>
>>>> due to missing & often spoken absence of possibility to rearrange tabs
>>>> in tab bar I created a simple module which "somehow" provides such
>>>> base functionality.
>>>>
>>>> Limitations:
>>>>
>>>> - It doesn't preserve state of view, i.e. current line, cursor
>>>> position etc.
>>>> - It doesn't preserve bookmarks.
>>>> - It simply closes concerned buffers and reopens them [1] in a new
>>>> order - this is how tabs are reordered.
>>>> - Due to [1], concerned buffers are to be unmodified (just checked, no
>>>> action if they all are not saved so far).
>>>> - Just tested on my comp - here I'm having one buffer shown in just
>>>> one view.
>>>> - Report bugs on git or using my mail bellow.
>>>>
>>>> You can download the module here:
>>>>
>>>> https://github.com/CertHaramas/TextAdept.TabBarMan
>>>>
>>>> Just put the module so TA loads it on startup; there are no deps.
>>>>
>>>> The module lifetime depends on when/if TA will provide the
>>>> functionality by its core.
>>>>
>>>> Best regards,
>>>>
>>>> Lukas
>>>>
>>>>
>>>>>> I've given thought to this in the past. If there was an easy
>>>>>> solution
>>>>>> that didn't feel like a hack and worked well, it would probably be
>>>>>> done by now. As it is, I don't have much motivation for this feature
>>>>>> because I personally do not use tabs. I use the buffer browser.
>>>>>>
>>>>>> Cheers,
>>>>>> Mitchell
>>>>>
>>>>> Completely understand.  However, since very nearly all other
>>>>> multi-file
>>>>> editors offer this, it is something that potential new users (like
>>>>> myself) will immediately notice.  People don't like being made to
>>>>> change
>>>>> their habits.  Just sayin'.  :-)
>>>>>
>>>>> qwerky
>>>>
>>>>
>>
>>

-- 
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 Wed 10 Jul 2019 - 13:33:21 EDT

This archive was generated by hypermail 2.2.0 : Thu 11 Jul 2019 - 06:34:38 EDT