[x]it! support for working with todo and check list files in Sublime Text

Overview

[x]it! for Sublime Text

This Sublime Package provides syntax-highlighting, shortcuts, and auto-completions for [x]it! files.

[x]it! demo

Features

  • Syntax highlighting
  • Shortcut commands for toggling the item status
  • Smart completions for due dates
    • Type e.g. 5w and have auto-complete resolve it to the date in 5 weeks from now. Works with d (days), w (weeks), m (months), and y (years), and any number prefix.
  • Some sensible default settings (e.g. indentation style)

Configuration

Keybindings for Commands

The following commands are available for you to put into your Default.sublime-keymap file. The key combination is up to you, of course.

[
	// Toggle checkbox status of the item.
	// It cycles through the statuses given in the
	// `xit_toggle` setting.
	{ "keys": ["ctrl+shift+t"], "command": "xit_toggle" },

	// Set item status to checked [x]
	{ "keys": ["ctrl+shift+x"], "command": "xit_check" },
	
	// Set item status to open [ ]
	{ "keys": ["ctrl+shift+o"], "command": "xit_open" },

	// Set item status to ongoing [@]
	{ "keys": ["ctrl+shift+a"], "command": "xit_ongoing" },

	// Set item status to obsolete [~]
	{ "keys": ["ctrl+shift+n"], "command": "xit_obsolete" },
]

Settings (Syntax Specific)

The following settings can be overriden via your syntax-specific xit.sublime-settings file. The values shown below are the default ones.

{
	// Auto-save after toggling checkboxes (via the commands `xit_check`, etc.).
	"xit_auto_save": true,

	// The checkbox statuses that the `xit_toggle` command
	// should cycle through.
	"xit_toggle": ["[ ]", "[x]"],
}

Syntax Highlighting / Colour overrides

The pre-defined syntax highlighting should look meaningful in most available colour schemes.

For [x]it! specific customisations or fixes, you can specify the following colour overrides:

  • markup.other.title.xit For the item group title
  • markup.other.checkbox.open.xit For an open checkbox: [ ]
  • markup.other.checkbox.checked.xit For a checked checkbox: [x]
  • markup.other.checkbox.ongoing.xit For an ongoing checkbox: [@]
  • markup.other.checkbox.obsolete.xit For an obsolete checkbox: [~]
  • markup.other.priority.exclamation.xit For the exclamation mark of the priority: !
  • markup.other.priority.dot.xit For the dot of the priority: .
  • markup.other.description.xit For the item description
  • markup.other.due_date.xit For the due date within the description: -> 2022-03-27
  • markup.other.tag.name.xit For a tag: #example
  • markup.other.tag.value.xit For the value of a tag: #example=value

Additionally, you can reference the following meta scopes to make adjustments based on the item status:

  • meta.item.status.open.xit
  • meta.item.status.checked.xit
  • meta.item.status.ongoing.xit
  • meta.item.status.obsolete.xit

Please also see here for a complete colouring example based on a dark scheme.

You can also configure Sublime to always use a specific colour scheme with [x]it!. This is especially useful if the default colours don’t work out in your regular colour scheme. You can specify this in your syntax-specific xit.sublime-settings file:

{
	// Always use the Monokai scheme for [x]it!
	"color_scheme": "Monokai.sublime-color-scheme"
}
Comments
  • Macros in `v1.0.0` don’t work

    Macros in `v1.0.0` don’t work

    This is reproducible installing via Git AND package control (it's LIVE 🎉 btw).

    When I enter a .xit file, if I try to start a checkbox (such as typing "[" to a new xit file), it gives the error "Unable to open res://Packages/xit/macros/Insert Open Checkbox.sublime-macro".

    opened by ryanolsonx 4
  • Add command for toggling checkbox

    Add command for toggling checkbox

    Resolves https://github.com/jotaen/xit-sublime/issues/4.

    Summary

    Add new command xit_toggle that toggles the status of a checkbox. By default, it toggles between [ ] and [x], but the sequence can be customised via the xit_toggle setting.

    opened by jotaen 3
  • Modfied the due date regex

    Modfied the due date regex

    Hi!

    I have played with xit! for Sublime a bit, and discovered that the due dates had no syntax support for Q1/Q2/Q3/Q4 yet. I have taken the liberty to add that.

    While I was taking a stab at the regex, I also made leading zeros optional, so a date like 2022-5-1 would be simply read as 2022-05-01. (Not sure if this actually violates the specs, but I think it's convenient.)

    I also added some sanity checks: Months must be 1-12, days 1-31, week numbers 1-53, quarters 1-4. This should catch most invalid dates, if not all of them. The limit I placed on years is somewhat arbitrary, although 1970-2100 should work for most cases. I finally disallowed mixing slashes and hyphens in dates, it's either one or the other.

    Feel free to use as much or as little of my suggestions as you want; it's working fine locally.

    Take care, Ingmar

    opened by igreil 2
  • ⚠️ Submit to Sublime Package Control

    ⚠️ Submit to Sublime Package Control

    ⚠️ This package is not yet available via Sublime Package Control, as it’s still under review. It will be available within the next few days.

    👉 Subscribe to this issue on the ride-hand-side, so that you get notified via Github once this issue is resolved.


    For testing purposes, you can temporarily install it by hand in the meantime:

    1. Download this repository
    2. Unpack the downloaded .zip file
    3. Rename the unzipped folder from xit-sublime-main to xit!
    4. In the Sublime Menu, click PreferencesBrowse Packages
    5. Move the xit! folder to that location
    opened by jotaen 2
  • xit formatting is unreadable with a Nord color scheme

    xit formatting is unreadable with a Nord color scheme

    Great idea with xit, really love idea of saving everything in a plain text file!

    I've immediately installed a plugin for sublime and tried this out. Unfortunately, I got a follow result:

    personal-xit-with-dark-theme

    Formatting style/coloring doesn't play with my color_scheme.

    Here is my current preferences.sublime-settings :

    {
    ...
    "color_scheme": "Packages/Nord/Nord.sublime-color-scheme",
    ..
    }
    

    Workaround

    Changing color-scheme helps

    Monokai theme already looks workable xit-monokai-theme

    But I've noticed, that Mariana theme is closer to my original Nord theme. So I'll stick with this one for a time being. xt-mariana-theme

    Expected result

    I am uncertain whether fix should be implemented in xit-sublime plugin or this is an issue related to nord scheme itself.

    But since this plugin is newer, I've decided to start off with writing this issue. I'd love to make this plugin play well with my original scheme.

    Any advice how I could do that? What could be the problem?

    Setup details:

    Sublime version 4126 OS: Manjaro OS (Arch based)

    opened by skatkov 1
  • Allow to fold item groups

    Allow to fold item groups

    If you have a group of items like this:

    Some todos
    [ ] One
    [ ] Two
    [ ] Three
    

    then it would be cool if you could fold (collapse) all the items if you don’t want to see them.

    I’m not sure this is possible by default in Sublime (via the little triangle-icon in the side bar).

    Otherwise it might be an option to write a macro that uses the regular “fold” command from the menu.

    enhancement 
    opened by jotaen 1
  • Support embedded `xit` blocks in Markdown files

    Support embedded `xit` blocks in Markdown files

    In Sublime Text, it’s possible to make packages work in embedded contexts, e.g. as xit code block within a Markdown file.

    That way, you’d have proper syntax highlighting, and maybe even the snippets and special commands would work (though I’m not sure about this).

    161813696-2772114f-3d7f-42e8-98e5-a1b3ee66c894

    enhancement 
    opened by jotaen 0
  • Spike: explore nested items

    Spike: explore nested items

    One of the most wanted features in the [x]it! file format is nested sub-items, so e.g.:

    [ ] Big project
        [ ] Task 1
        [ ] Task 2
            [ ] Sub-Task of Task 2
    

    I’ve already tried to implement support for this functionality in the Sublime plugin, but without success. Problems include the following:

    [x] Big project
            [ ] It shouldn’t be possible to “skip” a level
        [ ] If parent is checked, also mark all subitems as checked, regardless of their status
        It shouldn’t be possible to continue the description of “Big project” here
    

    I wasn’t able to make that happen, but if anyone else would be willing to give this a shot, feel free to create an explorative spike PR.

    Regarding the discussion itself, I think it’s important to have a least one working implementation to play around with, in order to assess the technical difficulties better, and in order to get a better feeling for the behaviour and corner cases of nesting.

    help wanted 
    opened by jotaen 0
  • Due dates: expand abbreviated date patterns

    Due dates: expand abbreviated date patterns

    Similar to how the plugin expands 5d to like -> 2022-05-16, it could also expand 22-5-16 or even 220516 in the same fashion. That way, the eventual formatting will still be spec-compliant, but it’s a bit more convenient to type in.

    enhancement 
    opened by jotaen 0
  • Command for moving or deleting “done” items

    Command for moving or deleting “done” items

    When an item is done, it could (optionally) be

    • just deleted
    • or moved to a separate group, e.g.
      Todos
      [ ] Something
      [ ] Some other thing
      
      Done
      [x] Do this
      [x] Do that
      

    Both could be somehow configured via the package settings (e.g. for the second option, what the “done” section is called).

    Another idea could be to offer some sort of “clean up” command, that does such things on-demand.

    enhancement 
    opened by jotaen 0
Releases(1.3.0)
Owner
Jan Heuermann
Freelance Software Developer & Consultant
Jan Heuermann
Wisdom Tree is a concentration app i am working on.

Wisdom Tree Wisdom Tree is a tui concentration app I am working on. Inspired by the wisdom tree in Plants vs. Zombies which gives in-game tips when it

NO ONE 241 Jan 01, 2023
Team Hash Brown Science4Cast Submission

Team Hash Brown Science4Cast Submission This code reproduces Team Hash Brown's (@princengoc, @Xieyangxinyu) best submission (ee5a) for the competition

3 Feb 02, 2022
An electron application to check battery of bluetooth devices connected to linux devices.

bluetooth-battery-electron An electron application to check battery of bluetooth devices connected to linux devices. This project provides an electron

Vasu Sharma 15 Dec 03, 2022
Some Python scripts that fx(hash) users might find useful.

fx_hash_utils Some Python scripts that fx(hash) users might find useful. get_images This script downloads all the static images of the tokens generate

30 Oct 05, 2022
contextlib2 is a backport of the standard library's contextlib module to earlier Python versions.

contextlib2 is a backport of the standard library's contextlib module to earlier Python versions. It also sometimes serves as a real world proving gro

Jazzband 35 Dec 23, 2022
Simple script to match riders with drivers.

theBestPooler Simple script to match riders with drivers. It's a greedy, unoptimised search, so no guarantees that it works. It just seems to work (ve

Devansh 1 Nov 22, 2021
Yakuake session management

yman is a python script used for saving/restoring yakuake sessions (currently running commands, working directories, environment variables, tab titles)

Szymon Borecki 6 Jun 25, 2022
A professional version for LBS

呐 Yuki Pro~ 懒兵服御用版本,yuki小姐觉得没必要单独造一个仓库,但懒兵觉得有必要并强制执行 将na-yuki框架抽象为模块,功能拆分为独立脚本,使用脚本注释器使其作为py运行 文件结构: na_yuki_pro_example.py 是一个说明脚本,用来直观展示na,yuki! Pro

1 Dec 21, 2021
A Python script to convert your favorite TV series into an Anki deck.

Ankiniser A Python3.8 script to convert your favorite TV series into an Anki deck. How to install? Download the script with git or download it manualy

37 Nov 03, 2022
Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat 📊 Stats 🧪 Get SESSION_NAME from below:

dark phoenix 12 May 08, 2022
Providing a working, flexible, easier and faster installer than the one officially provided by Arch Linux

Purpose The purpose is to bring more people to Arch Linux by providing a working, flexible, easier and faster installer than the one officially provid

André Luís 0 Nov 09, 2022
Convert a .vcf file to 'aa_table.tsv', including depth & alt frequency info

Produce an 'amino acid table' file from a vcf, including depth and alt frequency info.

Dan Fornika 1 Oct 16, 2021
A cheat sheet for streamlit

Streamlit Cheat Sheet App to summarise streamlit docs v1.0.0 There is also an accompanying png and pdf version https://github.com/daniellewisDL/stream

Daniel Lewis 221 Jan 04, 2023
Retrying library for Python

Tenacity Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Julien Danjou 4.3k Jan 02, 2023
Junos PyEZ is a Python library to remotely manage/automate Junos devices.

The repo is under active development. If you take a clone, you are getting the latest, and perhaps not entirely stable code. DOCUMENTATION Official Do

Juniper Networks 623 Dec 10, 2022
Used the pyautogui library to automate some processes on the computer

Pyautogui Utilizei a biblioteca pyautogui para automatizar alguns processos no c

Dheovani Xavier 1 Dec 30, 2021
This is a modified variation of abhiTronix's vidgear. In this variation, it is possible to write the output file anywhere regardless the permissions.

Info In order to download this package: Windows 10: Press Windows+S, Type PowerShell (cmd in older versions) and hit enter, Type pip install vidgear_n

Ege Akman 3 Jan 30, 2022
DC619/DC858 Mainframe Environment/Lab

DC619 Training LPAR The file DC619 - Mainframe Overflows Hands On.pdf contains the labs and walks through how to perform them. Use docker You can use

Soldier of FORTRAN 9 Jun 27, 2022
Model Quantization Benchmark

MQBench Update V0.0.2 Fix academic prepare setting. More deployable prepare process. Fix setup.py. Fix deploy on SNPE. Fix convert_deploy bug. Add Qua

500 Jan 06, 2023
Python implementation of an automatic parallel parking system in a virtual environment, including path planning, path tracking, and parallel parking

Automatic Parallel Parking: Path Planning, Path Tracking & Control This repository contains a python implementation of an automatic parallel parking s

134 Jan 09, 2023