tabby-backslash-newline
v1.0.4
Published
Tabby plugin that sends backslash newline (\\n) for line continuation
Maintainers
Readme
Tabby Backslash Newline Plugin
A Tabby terminal plugin that enables line continuation in terminal sessions by adding Shift+Enter hotkey to send backslash newline (\\\n) sequences. Perfect for writing multi-line shell commands, scripts, and command-line operations.
Features
- Line Continuation: Press Shift+Enter to send
\\\n(space + backslash + newline) for continuing commands across multiple lines - Shell Scripting Support: Perfect for writing long commands, complex pipes, and multi-line shell scripts
- Multi-tab Support: Works across all terminal tabs and split views
- Smart Terminal Detection: Automatically finds the active terminal instance, including in split views
- Cross-platform: Uses system-appropriate line endings (Windows/Unix compatible)
Installation
Via Tabby Plugin Manager (Recommended)
- Open Tabby
- Go to Settings → Plugins
- Search for "Backslash Newline"
- Click Install
Manual Installation
npm install -g tabby-backslash-newlineDevelopment Installation
- Clone this repository
- Install dependencies:
npm install - Build the plugin:
npx tsc - Copy the
distfolder to your Tabby plugins directory
Development
Build Commands
# Compile TypeScript to JavaScript
npx tsc
# Watch mode for development
npx tsc --watchProject Structure
src/
├── index.ts # Main plugin entry point
└── ...
dist/ # Compiled output
package.json # Dependencies and build config
tsconfig.json # TypeScript configurationHow It Works
The plugin sends a space + backslash + newline sequence ( \\\n) when you press Shift+Enter, which is the standard shell syntax for line continuation. This allows you to:
- Break long commands across multiple lines for better readability
- Write complex shell scripts interactively
- Continue pipe chains and command sequences
- Maintain proper shell escaping and formatting
Example usage:
# Instead of this long one-liner:
find /path -name "*.js" -type f -exec grep -l "function" {} \; | xargs wc -l
# Write it across multiple lines with Shift+Enter:
find /path -name "*.js" -type f \\
-exec grep -l "function" {} \; \\
| xargs wc -lTechnical Implementation
- HotkeyProvider: Registers the
shift-enter-newlinehotkey with Tabby - ShiftEnterHandler: Handles the hotkey event and sends the continuation sequence
- Terminal Detection: Finds the active terminal, including special handling for split views
Use Cases
- Long Commands: Break complex commands with many options across multiple lines
- Shell Scripts: Write and test multi-line scripts interactively
- Pipe Chains: Create readable command pipelines
- Configuration: Multi-line environment variable definitions and exports
Requirements
- Tabby Terminal v1.0.0 or higher
- Node.js and npm for building
License
MIT License
