All Projects → jonlabelle → Trimmer

jonlabelle / Trimmer

Licence: mit
A Sublime Text plug-in for cleaning up whitespace.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Trimmer

Incrementselection
Add a number to each selection in Sublime Text, incremented once per selection
Stars: ✭ 105 (+5%)
Mutual labels:  plugin, sublime-text
Sublimeallautocomplete
Extend Sublime autocompletion to find matches in all open files of the current window
Stars: ✭ 906 (+806%)
Mutual labels:  plugin, sublime-text
Sublimetext Markdown Preview
markdown preview and build plugin for sublime text 2/3
Stars: ✭ 2,337 (+2237%)
Mutual labels:  plugin, sublime-text
Sublimall Server
Server behind Sublimall SublimeText plugin
Stars: ✭ 43 (-57%)
Mutual labels:  plugin, sublime-text
Coffeescript Sublime Plugin
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
Stars: ✭ 296 (+196%)
Mutual labels:  plugin, sublime-text
Sublime Text Plugins For Frontend Web Development
📝 Collection of plugins for Frontend Web Development
Stars: ✭ 1,127 (+1027%)
Mutual labels:  plugin, sublime-text
Hxd Plugin Framework
Plugin framework for HxD's data inspector
Stars: ✭ 98 (-2%)
Mutual labels:  plugin
Kibana Object Format
A Kibana plugin for displaying objects and arrays of objects.
Stars: ✭ 100 (+0%)
Mutual labels:  plugin
Ion Digit Keyboard V2
A digital keyboard plugin to use in Ionic 2 applications.
Stars: ✭ 97 (-3%)
Mutual labels:  plugin
Nuxt Netlify
Dynamically generate `_headers` and `_redirects` files for Netlify in your Nuxt.js projects
Stars: ✭ 97 (-3%)
Mutual labels:  plugin
Gitlink
A Jetbrains plugin that opens a local file under Git version control in its remote host using the default browser.
Stars: ✭ 101 (+1%)
Mutual labels:  plugin
Restfultoolkit
A Toolkit for RESTful services development.
Stars: ✭ 101 (+1%)
Mutual labels:  plugin
Qv2ray
⭐ Linux / Windows / macOS 跨平台 V2Ray 客户端 | 支持 VMess / VLESS / SSR / Trojan / Trojan-Go / NaiveProxy / HTTP / HTTPS / SOCKS5 | 使用 C++ / Qt 开发 | 可拓展插件式设计 ⭐
Stars: ✭ 12,886 (+12786%)
Mutual labels:  plugin
Dark Mode
Dark Mode for the WordPress dashboard.
Stars: ✭ 98 (-2%)
Mutual labels:  plugin
Pytest Repeat
pytest plugin for repeating test execution
Stars: ✭ 99 (-1%)
Mutual labels:  plugin
Klak
Creative coding library for Unity
Stars: ✭ 1,347 (+1247%)
Mutual labels:  plugin
Flutter iap
Flutter iap plugin
Stars: ✭ 101 (+1%)
Mutual labels:  plugin
Fork Ts Checker Webpack Plugin
Webpack plugin that runs typescript type checker on a separate process.
Stars: ✭ 1,343 (+1243%)
Mutual labels:  plugin
Typescript Eslint
✨ Monorepo for all the tooling which enables ESLint to support TypeScript
Stars: ✭ 10,831 (+10731%)
Mutual labels:  plugin
Wordless
All the power of Pug, Sass, Coffeescript and WebPack in your WordPress theme. Stop writing themes like it's 1998.
Stars: ✭ 1,374 (+1274%)
Mutual labels:  plugin

Trimmer

Travis CI Build Status AppVeyor Build status SonarQube Quality Gate Status Language grade: Python Package Control Installs Latest Release MIT License

Trimmer is a Sublime Text plug-in for cleaning up whitespace.

Features

  • Trim whitespace at the end of each line.
  • Trim whitespace at the start of each line.
  • Trim whitespace at the start and end of each line.
  • Trim whitespace from selection(s).
  • Delete empty, whitespace only lines.
  • Collapse multiple consecutive empty lines into one empty line.
  • Collapse multiple consecutive spaces into one space.
  • Trim empty, whitespace only lines at the beginning and end of file.
  • Remove blank space characters.
  • Normalize spaces (consecutive spaces reduced, empty lines removed and lines trimmed).
  • Tokenize a string by collapsing consecutive spaces, and trimming leading and trailing spaces.
  • Delete empty, whitespace only HTML and XML tags.
  • Remove code comments and collapse lines.

Additional Features

A Replace Smart Characters command that performs the following actions:

  • Smart single quotes: to '
  • Smart double quotes: to "
  • Prime: to '
  • Double Prime: to "
  • German quotes: to " and to '
  • Ellipsis: to ...
  • Em dash: to ---
  • En dash: to --
  • Bullet: to *
  • Middle dot: · to -
  • Em space to three spaces
  • En space to two spaces
  • Non-breaking space to one space
  • Thin space to one space
  • Hair space to one space
  • Left angle quote: « to <<
  • Right angle quote: » to >>
  • Copyright symbol: © to (C)
  • Trademark symbol: to (T)
  • Registered trademark symbol: ® to (R)

ScreenShot

Watch a Quick Demo

Install

Trimmer is compatible with both Sublime Text 2 and 3 and all supported Operating Systems.

Package Control

The easiest, and recommended way to install Trimmer is using Package Control.

From the main application menu, navigate to:

  • Tools -> Command Palette... -> Package Control: Install Package, type the word Trimmer, then select it to complete installation.

Git

To install Trimmer using Git, change to your Sublime Text Packages directory and clone the Trimmer repository.

For example, on OS X... start a new Terminal session and enter the following commands:

$ cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
$ git clone https://github.com/jonlabelle/Trimmer

Manually

Download and extract the zip or tarball to your Sublime Text packages directory.

Default Sublime Text Packages Paths:

  • OS X: ~/Library/Application Support/Sublime Text [2|3]/Packages
  • Linux: ~/.Sublime Text [2|3]/Packages
  • Windows: %APPDATA%/Sublime Text [2|3]/Packages

NOTE Replace the [2|3] part with the appropriate Sublime Text version for your installation.

Usage

All commands are accessible from the Command Palette using prefix Trimmer, and in the Main Menu under Edit -> Line -> Trimmer command.

Key Bindings

The default key binding will trim trailing whitespace at the end of each of line (entire file).

  • OS X: Ctrl + S
  • Linux: Ctrl + Alt + S
  • Windows: Ctrl + Alt + S

Trimmer Command API

Command Description Context
trimmer trim whitespace at the end of each line entire file
trim_leading_whitespace trim whitespace at the start of each line selection, or entire file
trim_leading_trailing_whitespace trim whitespace at the start and end of each line selection, or entire file
trim_selections trim whitespace from selection(s) selection
delete_empty_lines delete empty, whitespace only lines selection, or entire file
collapse_lines collapse multiple consecutive empty lines into one empty line selection, or entire file
collapse_spaces collapse multiple consecutive spaces into one space selection, or entire file
trim_edges trim empty, whitespace only lines at the beginning and end of the file entire file
remove_blank_spaces remove all blank space characters (tab, cr, ff, vt, space) selection, or entire file
normalize_spaces consecutive spaces reduced, empty lines removed and lines trimmed selection, or entire file
replace_smart_characters replace smart characters (smart quotes, em/en dash, ellipsis, nbsp) selection, or entire file
tokenize_string convert a string to a token by collapsing consecutive spaces, and trimming leading and trailing spaces selection, or entire file
delete_empty_tags delete empty, whitespace only html and xml tags selection, or entire file
remove_comments remove code comments and collapse lines selection, or entire file

Author

Jon LaBelle

License

Trimmer is licensed under the MIT license.

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].