All Projects → acarabott → Chromerepl

acarabott / Chromerepl

Licence: mit
A Sublime Text plugin to execute JavaScript in Google Chrome

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Chromerepl

sublime-text-theme-switcher-menu
Painless theme selection in Sublime Text ⚡
Stars: ✭ 18 (-94.81%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
Sublime-Pretty-Shell
🐚 Shell Script Formatter / Syntax Checker (Powered by shfmt)
Stars: ✭ 28 (-91.93%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
sublime-live-server
🌍️ Launch a Development Server directly from Sublime Text
Stars: ✭ 49 (-85.88%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
Sublimeallautocomplete
Extend Sublime autocompletion to find matches in all open files of the current window
Stars: ✭ 906 (+161.1%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
CSSFontFamily
CSSFontFamily is a Sublime Text plugin with a collection of font stacks autocomplete.
Stars: ✭ 15 (-95.68%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
Carbonsublime
🚀 A Sublime Text 3 Plugin for Carbon. (https://carbon.now.sh)
Stars: ✭ 104 (-70.03%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
Sublime zk
A SublimeText3 package featuring ID based wiki style links, and #tags, intended for zettelkasten method users. Loaded with tons of features like inline image display, sophisticated tag search, note transclusion features, support for note templates, bibliography support, support for multiple panes, etc. to make working in your Zettelkasten a joy 😄.
Stars: ✭ 408 (+17.58%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
Sublime Jekyll
A Sublime Text package for Jekyll static sites.
Stars: ✭ 160 (-53.89%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
sublime-text
Subime Text 相关资源收集整理
Stars: ✭ 62 (-82.13%)
Mutual labels:  sublime-text, sublime-text-3, sublime-package
Coffeescript Sublime Plugin
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
Stars: ✭ 296 (-14.7%)
Mutual labels:  sublime-text, sublime-text-3
dotfiles
My personal dotfiles repository
Stars: ✭ 36 (-89.63%)
Mutual labels:  sublime-text, sublime-text-3
AFileIcon
Sublime Text File-Specific Icons for Improved Visual Grepping
Stars: ✭ 192 (-44.67%)
Mutual labels:  sublime-text-3, sublime-package
FileHistory
Sublime Text plugin that keeps track of files which have been recently closed, as well as files that have been recently accessed.
Stars: ✭ 51 (-85.3%)
Mutual labels:  sublime-text, sublime-text-3
alfred-sublime-text
Filter and open your Sublime Text (2 and 3) project files from Alfred.
Stars: ✭ 66 (-80.98%)
Mutual labels:  sublime-text, sublime-text-3
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (-76.37%)
Mutual labels:  sublime-text, sublime-text-3
Milotic
Color Full Theme for All Text Editors!
Stars: ✭ 23 (-93.37%)
Mutual labels:  sublime-text, sublime-text-3
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (-95.97%)
Mutual labels:  sublime-text, sublime-text-3
github markdown snippets
GitHub flavored Markdown with plain'ol HTML knowledge! Boom!
Stars: ✭ 23 (-93.37%)
Mutual labels:  sublime-text, sublime-text-3
sublime-profiles
Profile Switcher for Sublime Text
Stars: ✭ 59 (-83%)
Mutual labels:  sublime-text, sublime-package
Nineties
💾 Colors for World Wide Web pioneers
Stars: ✭ 16 (-95.39%)
Mutual labels:  sublime-text, sublime-text-3

ChromeREPL

Sublime Text 3 Python 3.3 apm

A SublimeText 3 Plugin to use Chrome as your REPL.

Execute JavaScript in your browser. Interact with your running webapps. Live code your brains out!

Why?

Because Chrome ain't no text editor. Anything longer than a line is a pain, and so is recalling what you typed earlier.

Screencast

Installation

Via Package Control (recommended! 👍👍👍)

Alternatively, clone this repo into your Packages directory. e.g. ~/Library/Application Support/Sublime Text 3/Packages/ on macOS. If you do this you will need to open the Command Palette and run Package Control: Satisfy Dependencies.

Starting Chrome

Chrome needs to be started with a special flag 🏳️ (--remote-debugging-port).

Don't worry, commands are provided to do this for you 😅.

Run them by opening the Command Pallete (macOS: cmd shift P, win/lin: ctrl shift P).

  1. If you haven't opened Chrome, use the Chrome REPL: Start Chrome command.
  2. If Chrome is already running, use Chrome REPL: Restart Chrome with remote debugging*

*this will quit and re-open Chrome, if you want to preserve your tabs, make sure you have set this behaviour in Chrome's settings: On start-up: Continue where you left off.

🚨 Security Warning: New User Profile 🚨

When Chrome restarts, it will use a new Chrome user profile. This is because the Chrome DevTools protocol (that is used for communication) opens a port for communication, but also exposes your cookies. To prevent people on your network from sniffing your important cookies (e.g. website logins), a temporary Chrome user profile is used.

Usage

  1. Start/Restart Chrome as above
  2. Run the Chrome REPL: Connect to Tab command
  3. Select the tab you want to connect to
  4. You should see "Sublime Text connected" in the Chrome Developer Tools console
  5. Use Shift Enter in Sublime Text to execute JavaScript code:
    • If you have nothing selected it will execute the current line
    • With code selected it will execute just the selection

Note: Each Sublime tab can be connected to one Chrome tab. The connected tab is displayed in Sublime in the status bar at the bottom of tab.

Additional commands

  • Clear Console Cmd/Ctrl Shift C
  • Reload Page Cmd/Ctrl Shift R
  • Reload Page (Ignore Cache) Cmd/Ctrl Shift Alt R

Settings

  • 📁 Path to Chrome (can be Chrome, Canary, or Chromium)
  • 👀 Automatically focus on connected Chrome tab (requires wmctrl on Linux)
  • 🔧 Automatically opening the Developer Tools for every new window
  • 🏳️ Additional chrome flags
  • ⌨️ Enabling the Command Line API
  • 🏠 Custom hostname and port

Thanks

The project was inspired by SublimeWebInspector, but is far less ambitious, not as opinionated, and thus easier to maintain.

This uses a ever so slightly modified version of PyChromeDevTools, and a stripped down version of Sublime Goto Window.

Known Issues

This plugin relies on psutil. The latest version of psutil requires Python 3.4. This means we are stuck with 5.4.1 which has a known issue on macOS to do with zombie processes. If the only option in the command palette is Restart Chrome then you may need to reboot your machine to clear the issue.

Author

Arthur Carabott - arthurcarabott.com

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].