Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding macros that call TidalParagraphSend at a mark #40

Open
rseymour opened this issue Oct 3, 2019 · 1 comment
Open

Adding macros that call TidalParagraphSend at a mark #40

rseymour opened this issue Oct 3, 2019 · 1 comment

Comments

@rseymour
Copy link

rseymour commented Oct 3, 2019

I added a few shortcuts to my ftplugin/tidal.vim that move to a mark then send it. It's useful for marking certain lines or do blocks and then moving to them quickly in a live scenario (specifically when I'm singing).

This is what I have:

  nmap <buffer> <F1> 'a<Plug>TidalParagraphSend
  nmap <buffer> <F2> 'b<Plug>TidalParagraphSend
  nmap <buffer> <F3> 'c<Plug>TidalParagraphSend
  nmap <buffer> <F4> 'd<Plug>TidalParagraphSend
  nmap <buffer> <F5> 'e<Plug>TidalParagraphSend
  nmap <buffer> <F6> 'f<Plug>TidalParagraphSend
  nmap <buffer> <F7> 'g<Plug>TidalParagraphSend
  nmap <buffer> <F8> 'h<Plug>TidalParagraphSend

I could do a PR but it's the sort of customization that (a) favors folks with real function keys and (b) is sort of specialized and could stomp on other mappings folks might have.

Ideally this would live in my .vimrc, but adding them makes the function keys work, but ctrl-e stops working. Even with noremap, I assume this is something fixable, but I don't know enough vimscript to be sure.

At any rate thanks for your work, I try use tidalvim daily.

@munshkr
Copy link
Member

munshkr commented Oct 16, 2019

Nice one!

The plugin has some bindings for playing a paragraph that starts with d1 using localleader s 1 and so on, for each of the default streams, but this seems very useful too, especially like you say, for code blocks that do not resemble the "typical" use of streams in TidalCycles. Perhaps we can add them using a local leader instead of using the function keys, it would be less invasive as a local leader is only local the a Tidal buffer.
In the end, the user can always disable all of these bindings with a flag.

Otherwise we can add these as a suggestion in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants