{"id":13565607,"url":"https://github.com/wch/SendText","last_synced_at":"2025-04-03T22:31:47.102Z","repository":{"id":3035981,"uuid":"4056518","full_name":"wch/SendText","owner":"wch","description":"A Sublime Text plugin to send text to a terminal or other program","archived":false,"fork":false,"pushed_at":"2016-08-08T17:04:29.000Z","size":16,"stargazers_count":70,"open_issues_count":8,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-03T08:11:09.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-17T19:48:41.000Z","updated_at":"2023-04-06T09:46:03.000Z","dependencies_parsed_at":"2022-08-26T03:10:14.432Z","dependency_job_id":null,"html_url":"https://github.com/wch/SendText","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2FSendText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2FSendText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2FSendText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2FSendText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wch","download_url":"https://codeload.github.com/wch/SendText/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247090284,"owners_count":20881942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:51.092Z","updated_at":"2025-04-03T22:31:46.818Z","avatar_url":"https://github.com/wch.png","language":"JavaScript","readme":"# SendText for Sublime Text 2 and 3\n\nThis package sends text to a terminal (or other program). If text is selected, it will send the selection to the terminal when you press cmd-Enter (Mac) or ctrl-Enter (Linux/Windows); if no text is selected, it will send the current line to the terminal and move the cursor to the next line.\nThis is very useful for coding in interpreted languages.\n\nSendText presently works with:\n\n* Terminal.app on Mac OS X. SendText will send the text to the most recently active Terminal window.\n* iTerm on Mac OS X. SendText will send the text to the most recently iTerm window.\n* GNU screen on any platform (Linux and Mac OS X). Screen is a terminal multiplexer which you can start in any terminal emulator. SendText will send the text to the most recently active screen session.\n* tmux on any platform (Linux and Mac OS X). tmux is a terminal multiplexer (like GNU screen) which you can start in any terminal emulator. SendText will send the text to the most recently active tmux session.\n\n\nHopefully in the future it will also be possible to do the following:\n\n* Attach a Sublime Text view to a particular terminal window.\n\nThis plugin was originally based on Rtools by Karthik Ram: https://github.com/karthik/Rtools\n\n## Installation\n\nThe easy way is to first install the [Package Control](http://wbond.net/sublime_packages/package_control/installation) plugin.\nOnce it's installed, press Ctrl-Shift-P (or Cmd-Shift-P), type `install`, and select \"Package Control: Install Packages\".\nThen type \"sendtext\", and choose to install the SendText plugin.\n\nThe other way is to clone this git repository into your `Sublime Text 2/Packages` or `Sublime Text 3/Packages` directory. This will be in different places depending on the OS (for ST3, replace the 2 with 3):\n\n* Windows: `%APPDATA%\\Sublime Text 2\\Packages`\n* OS X: `~/Library/Application Support/Sublime Text 2/Packages`\n* Linux: `~/.config/sublime-text-2`\n\n```\ngit clone https://github.com/wch/SendText.git\n```\n\n## Program configuration\n\nYou can configure SendText by going to:\n\n```\nPreferences -\u003e Package Settings -\u003e SendText -\u003e Settings - Default\n```\n\nFirst, choose which terminal program you want to use, and uncomment the appropriate line. For example, this tells SendText to use Terminal.app:\n\n```\n    \"program\": \"Terminal.app\",\n    // \"program\": \"iTerm\",\n    // \"program\": \"tmux\",\n    // \"program\": \"screen\",\n```\n\nIf you're using Terminal.app or iTerm, that's all you need to do.\nIf you use tmux or screen, you may need to explicitly set the path to make it work.\n(This seems to be necessary for me on Mac OS X and with tmux installed in `/usr/local/bin`, but YMMV.)\nIn the `paths`, set the value for tmux or screen to the full path to the executable. For example:\n\n```\n    \"paths\":\n    {\n        \"tmux\": \"/usr/local/bin/tmux\"\n        \"screen\": \"/usr/local/bin/screen\"\n    }\n```\n\n## Using SendText\n\nUsing SendText is simple. Start your terminal program (of the ones listed above), then, in Sublime Text, select some text and press cmd-Enter (or ctrl-Enter).\n\n\n## Configuring key bindings\n\nTo change the key bindings, go to:\n\n```\nPreferences -\u003e Package Settings -\u003e SendText -\u003e Key Bindings - Default\n```\n\nThe default value for Linux and Windows is:\n\n```\n[\n{ \"keys\": [\"ctrl+enter\"], \"command\": \"send_selection\" }\n]\n```\n\nAnd for Mac OS, it uses the Cmd key (`super`) instead of Ctrl:\n\n```\n[\n{ \"keys\": [\"super+enter\"], \"command\": \"send_selection\" }\n]\n```\n\nChange the value of `\"keys\"` to the key combination you want to use.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwch%2FSendText","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwch%2FSendText","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwch%2FSendText/lists"}