[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] shortcut for tables..

From: Alvaro Tejero Cantero
Subject: Re: [Texmacs-dev] shortcut for tables..
Date: Wed, 9 Dec 2020 15:14:06 +0100

The theme of discoverability is very important for an editor that can be fully keyboard-driven. A helpful discoverability feature would be autocompletion of \commands. One (at first unintuitive) way to do it is like the helm emacs package to narrow down options (there are many others, e.g. ivy, with different philosophies, I am not an expert).


PS. apologies if it seems like a thread hijack.

On Wed, 9 Dec 2020 at 13:35, Massimiliano Gubinelli <m.gubinelli@gmail.com> wrote:
Hi Joris,
 (I'm moving the discussion to texmacs-dev).

Thinking about shortcuts I really like the idea of "discovery" new shortcuts via hints in the status bar.
This is partially implemented with the shortcut mentioned by Vincent, but there seems to be a slight bug because in table-kdb.scm we have

  (:mode in-table?)
  ("table N" "" "New table (t: tabular, b: block)")
  ("table H" "" "Horizontal table alignment (l: left, c: center, r: right)")
  ("table V" "" "Vertical table alignment: (b: bottom, c: center, t: top)")
  ("table B" "" "Modify table border (options: =, l, r, b, t)")


and the "New table" partial command would be also useful outside the table mode, so without the :mode attribute.

This kind of explorative commands are more commont nowadays, many interfaces provide a "spotlight" kind of input line where the user start to write something and the program provide possible command completions with the associated shortcuts.

Similarly we can provide some more systematic hints in the status line, as you do above. The status line is better than opening a window which disrupt the current operations (e.g. when doing a presentation).


On 9. Dec 2020, at 13:19, TeXmacs <texmacs@lix.polytechnique.fr> wrote:

Hi Vincent,

Note that the upcoming version contains a simplified interface
for user-defined keyboard shortcuts.  When you are inside
a wide block, you can now do 'Focus -> Preferences -> Create shortcut'
in order to associate a keyboard shortcut to this macro.
This shortcut should be visible automatically in the menus
(there was a small problem with wide-block, but that will be corrected).

The above mechanism works for the insertion of macro applications
using the TeXmacs-Scheme primitive 'make'.  More generally,
you can associate whatever Scheme command you like to keyboard shortcuts,
assuming that you are willing to do a bit of programming, of course.

Best wishes, --Joris

On Wed, Dec 09, 2020 at 09:52:40AM +0100, Massimiliano Gubinelli wrote:
  Dear Vincent,
   indeed these shortcuts are quite complex and I never use them. I've gave
  a look and they are defined as:
    ("table N t" (make 'tabular))
    ("table N T" (make 'tabular*))
    ("table N w" (make-wrapped 'wide-tabular))
    ("table N b" (make 'block))
    ("table N B" (make 'block*))
    ("table N W" (make-wrapped 'wide-block))
  in TeXmacs/progs/generic/generic-kbd.scm.
  "table" means Cltr+Cmd+T, then you have to type an *uppercase* N, so
  Shift+N, and then uppercase or lowercase letters according to what you
  want to obtain.
  The representation in the menu is not faithful (this is indeed a bug),
  since it does not make difference between uppercase and lowecase.
  If you want some help you can define
    ("table N" "" "New table (t: tabular, b: block)"))
  So that when you type "table N" you get an hint on the status bar on what
  are the options. It would be really nice to develop this hint system
  further. Seems snappier than reaching the mouse to use the menus...

    On 9. Dec 2020, at 09:34, Vincent Douce Mathoscope
    <[1]vincent.douce.mathoscope@netcourrier.com> wrote:
    i use very often "blocs" and wanted to try the shortcut but not managed
    to use it
    is it  control-apple-T, then n and b ? no it just writes "nb"
    is it control-apple pressed and while pressed, type T then N then B ?
    doesn't work 
    any idea ?
    PS : is there somewhere on the texmacs's vidéos an explanation about how
    to customize all the shortcuts ?

    cours de maths postbac par visio


  Visible links
  1. mailto:vincent.douce.mathoscope@netcourrier.com
  2. https://lemathoscope.com/
/usr/bin/xdg-open: line 402: htmlview: command not found
/usr/bin/xdg-open: line 402: firefox: command not found
/usr/bin/xdg-open: line 402: mozilla: command not found
/usr/bin/xdg-open: line 402: netscape: command not found

Texmacs-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]