ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Tiny​Code​Counter

Character counter that helps you keep track of how close you are to 280 characters and allows you to easily remove whitespace when writing tiny code to be posted on Twitter!

Details

Installs

  • Total 268
  • Win 131
  • Mac 104
  • Linux 33
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8
Windows 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

TinyCodeCounter

TinyCodeCounter is a Sublime Text plugin to show character count, show how close you are to 280 characters, and easily remove whitespace when writing tiny code to be posted on Twitter under #tinycode, #p5t, #つぶやきProcessing, etc.

Installation

Via Package Control (Recommended)

If you have Package Control installed, you can install TinyCodeCounter as follows:

  1. Open the command palette: cmd + shift + p on Mac and ctrl + shift + p on Windows/Linux.
  2. Search Package Control: Install Package and press enter.
  3. Search TinyCodeCounter and press enter.

Manually

Download and unpack, or git clone, the latest TinyCodeCounter release as TinyCodeCounter in the Sublime Text packages directory. You can find the packages directory by navigating to Preferences > Browse Packages in Sublime Text. On macOS or Linux, open a terminal and type:

cd /path/to/Sublime Text 3/Packages
git clone https://github.com/gkpotter/Sublime-TinyCodeCounter.git TinyCodeCounter

After installing manually, make sure to restart Sublime Text.

Usage

Character Counting

TinyCodeCounter looks for markers (by default #tinycode, #p5t, and #つぶやきProcessing) in files of specified languages (by default Javascript, Java, and Python) and counts characters in all lines preceeding and including the line containing the marker not including whitespace. The difference between the number of characters not including whitespace and the specified character limit (by default 280) is also displayed.

Removing Whitespace

Clicking on the counter will copy all of the characters preceeding and including the line containing the marker not including whitespace to the clipboard.

For example given the following code, TinyCodeCounter displays after the marker at the end:

example

After clicking on the counter, the following is copied to the clipboard:

F=[];p=0;draw=_=>{createCanvas(400,400);F.push([0,0,0]);F=F.slice(0,365);translate(200+40*cos(p),200+40*sin(p));rotate(p+=0.02);F.forEach(f=>text('🌸',f[1]=88*cos(t=(f[0]+=0.1))-48*cos(11*t/6),f[2]=88*sin(t)-48*sin(11*t/6)));text('💮',0,0)}//#tinycode #p5t #つぶやきProcessing

Settings

All of the settings are documented in the settings file. You can override the defaults by navigating to Preferences > Package Settings > TinyCodeCounter > Settings in Sublime Text.