*tome.txt* TOME Playbooks for your Terminal INTRODUCTION *tome* Tome allows to to manage playbooks for you terminal in either inside Vim or with tmux. PLAYBOOK Playbook mode is automatically activated for any file named `.playbook*`. When you open tome from tmux this happens automatically. See |TomePlayBook|. For more information and setup with tmux go to https://github.com/laktak/tome In the help below, target refers either to a `tmux pane` or the `Vim terminal` depending on your configuration. Default mappings *tome-default-mappings* p Play the current line in normal mode or the selection to the next (or [count] offset) target. P Play the current paragraph to the next (or [count] offset) target. When in playbook mode, execute `p`. Activated by |TomePlayBook|. To change these mappings see |TomeConfig|. COMMANDS *TomeCommands* *TomePlayBook* Set the current buffer to playbook mode by mapping ``. *TomeScratchPad* [name] Set the current buffer as a scratch pad that will be discarded when exiting Vim and map ``. *TomeScratchPadOnly* [name] Like |TomeScratchPad| but do not map ``. VARIABLES *TomeVariables* Your shell already has variables so typically you would not need them in Tome. However, if you prefer, or if the target has no variables, you can use Tome variables (string replacement only). $=VALUE Define a new variable called NAME. $ Any variable is replaced with its defined value, no other operations are performed. If a variable is undefined Tome will open a scratchpad with the missing variables. $< Escape, results in the literal string $. CONFIGURATION *TomeConfig* You can tell tome to either use tmux or the Vim terminal to execute commands. If the `g:tome_target` variable is not set, tome will use tmux if it is installed. ``` " use Vim let g:tome_target = 'vim' " use tmux let g:tome_target = 'tmux' ``` Tome will skip `$ ` at the beginning of a line because that is often used in markdown to indicate a shell command. You can adjust this prefix or disable it with '' (needs g:tome_vars enabled). ``` let g:tome_skip_prefix = '^\$\s\+' ``` You can disable the default keybindings with the `g:tome_no_mappings` option. It needs to be defined before tome is loaded. ``` let g:tome_no_mappings = 1 ``` Then add your own mappings: ``` nmap p (TomePlayLine) nmap P (TomePlayParagraph) xmap p (TomePlaySelection) ``` You can prevent tome to send commands to certain terminal apps. The defaults are: ``` let g:tome_no_send = ['vim', 'nvim', 'lf', 'gitui'] ``` Tome variable support can be disabled with ``` let g:tome_vars = 0 ``` HIGHLIGHT EXECUTED TEXT *TomeHighlight* Tome can briefly highlight the lines you executed. This is disabled by default. Note that TomePlaySelection will highlight the full lines. ``` " enable highlighting with > 0 let g:tome_highlight_ms = 500 ``` By default the highlight links to |IncSearch| through the `TomeExecuted` highlight group. You can customize it by setting your own highlight group definition for `TomeExecuted`. vim:tw=78:ts=8:ft=help:norl: