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

execute line by line or combine them #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pcompassion
Copy link

@pcompassion pcompassion commented Aug 23, 2023

#+begin_src tmux :session local-vterm :line-mode below :combiner ;
echo hello111
echo hello222
echo hello333
#+end_src

line-mode

  • current
  • below
  • above

:line-mode line
executes a line where a cursor is at

:line-mode combine :newline-replace ;
executes src block as single command after combining with the ";"
@flintforge
Copy link

can you provide some explanations and comment the function please ?

@pcompassion
Copy link
Author

I use org file to write project setup history / instruction.

Often have to incrementally write the document, by executing lines.

:line-by-line current
executes code at cursor (on 2nd thought, i could have just created a function so that I can bind a key, so I don't have to switch the mode of operation whether to execute a line or a block of code

"below" would excute codes from cursor line to the remaining lines

i found sending multiple lines are not recognized as multiple commands so i added
:combiner
to do something like cmd1 && cmd2

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

Successfully merging this pull request may close these issues.

None yet

2 participants