This plugin is an alternative to common serial/UART terminals like TeraTerm, Putty, miniterm, and the like
This plugin is built upon pyserial
In sublime, go to Preferences -> Browse packages
. It will open a window of the packages location on your filesystem
To install via git, clone the repository into this directory. For Windows, the directory will look someting like C:\Users\${user}\AppData\Roaming\Sublime Text 3\Packages
To install without git, download the serial_monitor.sublime-package
file from the Releases page.
Navigate up one directory from the location taken in the Browse Packages
, then navigate into the folder Installed Packages
Copy the .sublime-package
file into this location
Restart Sublime
Commands are accessed through Menu->Tools->Serial Monitor
or the Command Palette (ctrl+shift+p
).
For all commands, if multiple ports are available a list will first be shown to choose the comport to run the command on
-
Connect
: Brings up dialogs to connect to a comport. If more than one comport is available, brings up a list of available comports before choosing a baud rate -
Disconnect
: Brings up a list of connected comports to disconnect from -
Write Line
: Brings up an input box at the bottom of the window to write a line to a comport.- Command/Write history is saved. In the input box, use
Page Up
andPage Down
to cycle through past entries
- Command/Write history is saved. In the input box, use
-
Write File
: Writes the active file to a comport -
Write Selection(s)
: Writes the selected text to the comport. Supports multiple selection regions (each selection will be on its own line). If no text is selected, writes the whole file. -
New Buffer
: Opens up a new output buffer for the comport -
Clear Buffer
: Clears the current output buffer for the comport -
Timestamp Logging
: Brings up dialog to enable or disable adding timestamps to the beginning of each line. Timestamps are formatted as[yy-mm-dd hh:mm:ss.xxx]
-
Local Echo
: Brings up dialog to enable/disable local echo. Local echo will write all input to the output window -
Filtering
: Brings up a menu to enable/disable filtering of the serial port using a filtering file (see next command). Filtering will create another buffer alongside the main output window to display filtered lines of text based on the filter file of your choice -
New Filter
: Creates a new filter template file for the above command. Template contains more details on the filtering as well. Right clicking a single-line highlighted selection in the output window will bring up an option to create a filter from the selected text -
Line Endings
: Set the line endings type of the comport so the data is correctly displayed in the output. Sublime only cares about Line Feeds, so the text will be edited based on the settingCR
: Line endings are carriage return characters only. AllCR
characters (\r
) will be converted toLF
(\n
)LF
: Line endings are line feed characters only. No text manipulation occursCRLF
: Line endings contain bothCR
andLF
.CR
characters are removed (default)
-
Layout
: Switches the layout of the sublime window. Left/Right puts all input files on the left and serial files on the right, Over/Under puts all input files on the top and output on the bottom
Global and port-specific preferences can be specified under Preferences->Package Settings->Serial Monitor->Settings - User
.
All of the preference possibilities go into more detail in the Settings - Default
option in the same menu; use that file as a template for your own preferences
For those who want to use these commands for keybindings, etc.
"command": "serial_monitor", "args":{"serial_command":"", ...}
Currently supported serial_command
values and optional args for each:
-
"connect"
:"comport": str
- The comport to connect to"baud": int
- The baud rate to connect with"enable_timestamps": bool
- Enable or disable timestamped logging upon connection"line_endings": str
- The line ending settings to use. Should beCR
,LF
, orCRLF
-
"disconnect"
:"comport": str
- The comport to disconnect from
-
timestamp_logging
:"comport": str
- The comport to enable/disable timestamp logging on"enable_timestamps": bool
- True to enable, False to Disable
-
local_echo
:"comport": str
- the comport to enable/disable local echo on
-
line_endings
:"line_endings": str
- THe line ending settings to use. See above for valid values
-
new_buffer
:"comport": str
- The comport to create a new buffer for
-
clear_buffer
:"comport": str
- The comport to create a clear the buffer on
-
"write_line"
:"comport": str
- The comport to write a line to"text": str
- The text to write to the comport (newline appended to end automatically)
-
"write_file"
:"comport": str
- The comport to write the currently active file to"override_selection": bool
- set to true if you want to write the whole file regardless if a region is currently selected
-
filter
:"comport": str
- the comport to enable/disable filtering on