Is there a kind of selection mode in TeXmacs?

I wonder whether there is a kind of selection mode in TeXmacs, like “visual mode” in vim. The simplest usage is that, I can select several paragraphs more easily: I select the start point and the end point. It is pretty difficult for me to achieve this by touchpad if there are many paragraphs which cover many screens. If I move my mouse downwards, it will quickly scroll to the end of the document, which makes a precise selection very difficult.

You can define a global variable say selection-mode or vi-visual-mode in Scheme,
then in this mode you can redefine key-bindings using keyboard-press api. Selecting text and moving cursor api are kbd-select, kbd-up, kbd-down, kbd-left, and so on.
You can find some example code by locating the progs/generic/ folder in the installation directory.

See also this https://github.com/chxiaoxn/texmacs-vi-experiment/ .

Thanks. That’s great. I am also looking for that kind of mode even for mouse selections: to select the beginning place and the end place.

there is go-start and go-end which moves the cursor at least. I have not tried selection though.

I think you can just move around the cursor with shift pressed. On the Mac you can also type Option+Space several times to enlarge your selection to the parent structure recursively. I’m not sure what is the keybinding in other systems.

I don’t see how “Shift pressed” solves anything. The problem is that, when move the cursor down, it will scroll too quickly and pretty many paragraphs are selected. I think that a mouse has the “middle button” which could be used to perform a preciser scrolling, but there is no such thing on a touchpad.

I’m talking to use keyboard to move around, not the touchpad. Maybe I didn’t understood well what you want?

OK, that works. It is me who misunderstood.