Skip to content

execute line by line or combine them#23

Open
pcompassion wants to merge 1 commit intoahendriksen:masterfrom
pcompassion:line-by-line
Open

execute line by line or combine them#23
pcompassion wants to merge 1 commit intoahendriksen:masterfrom
pcompassion:line-by-line

Conversation

@pcompassion
Copy link
Copy Markdown

@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
Copy Markdown

can you provide some explanations and comment the function please ?

@pcompassion
Copy link
Copy Markdown
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.

2 participants