tidalcycles / strudel

Web-based environment for live coding algorithmic patterns, incorporating a faithful port of TidalCycles to JavaScript
https://strudel.cc/
GNU Affero General Public License v3.0
687 stars 121 forks source link

vim / emacs mode problems #509

Open felixroos opened 1 year ago

felixroos commented 1 year ago

control based shortcuts don't seem to work as expected:

"

Just trying the emacs mode.. But didn't seem to work I tried:

"

felixroos commented 1 year ago

"

I activated Vim-Mode in Settings. Very cool!

Most things work as expected, but unfortunately, the Keys Ctrl-F/Ctrl-B are not working as they do in vim. In vim, these go a page down or up, respectively. However, here, they go a character forward or backward. This seems to be the default behaviour for CodeMirror (https://codemirror.net/5/doc/manual.html#commands) I've tried the local strudel in Chrome and Opera and in both browsers the behaviour is character-wise movement instead of jumping page down/up.

"

felixroos commented 8 months ago

more notes from loopology:

" Ctrl-B, Ctrl-F don't behave in vim's way (still do the described character-wise movement). Also, e.g. https://strudel.cc/?MTyZAXjUUTuS contains the line

.sound("[sawtooth:0:.3, gm_fx_atmosphere]")

When the cursor is on the [ and % is pressed, the cursor should jump to the matching ]. Instead it moves to the enclosing left (. This only happens with nested brackets, though. If pressing % again in this example, the cursor will jump to the matching ).

When pressing Ctrl-V, vim would change into visual block selection mode. However in strudel, the cursor jumps down (as Ctrl-F should but doesn't). However, Shift-V works in strudel in vim mode (visual line selection mode). "

Bubobubobubobubo commented 2 months ago

Adding to this: visual mode (Ctrl/Cmd+V) currently doesn't work with the Vim mode. It is quite useful to do structural editing on multiple lines. Potential use cases: commenting/indenting multiple lines, prefixing something in a table/object, etc.