Giter VIP home page Giter VIP logo

vscode-markdown-checkbox's Introduction


logo

Markdown Checkbox

Create and toggle checkboxes in Markdown documents

Version  Rating  Installs  Downloads

Description

With this extension for Visual Studio Code it's possible to create todo lists in markdown. The extension provides shortcuts and some workspace configurations to create checkboxes and mark them with a shortcut.

How to use

Preview

Information in status bar

Preview of status bar information

At least one checkbox must exist in a file to see this information.

Pick Checkboxes

Toggle all checkboxes in the current document with the Multi-Select QuickPick:

Preview of Multi-Select QuickPick

The QuickPick can be opened either from the command palette or by clicking on the status bar item.

Keybindings

Command Windows Mac
Create a checkbox CTRL + Shift + c + + c
Toggle checkbox CTRL + Shift + Enter + + Enter

These are the initial keyboard shortcuts, which can be customized by the Keyboard Shortcuts settings in VS Code.

Configuration

This extension can be customized with the following options.

Bullet points

If bullet points before the checkboxes are required, then they can be enabled with the following setting:

options: true | false
"markdown-checkbox.withBulletPoint": true

Example:

* [ ] todo

Type of bullet points

Select a type of bullet point:

options: "*" | "-" | "+"
"markdown-checkbox.typeOfBulletPoint": "*"

Example

* [ ] asterisk
- [ ] minus
+ [ ] plus

Type of checkmark

Select a type of checkmark:

options: "X" | "x"
"markdown-checkbox.checkmark": "X"

Example

- [X] uppercase checkmark
- [x] lowercase checkmark

Italic

Italic font style of line of the checkbox after the checkbox has been checked:

options: true | false
"markdown-checkbox.italicWhenChecked": true

Preview

  • this line is italic

Strikethrough

Strikethrough the line of the checkbox after the checkbox has been checked:

options: true | false
"markdown-checkbox.strikeThroughWhenChecked": true

Preview:

  • this line has been crossed out

Date when checked

Add date behind the checkbox item after the checkbox has been checked:

options: true | false
"markdown-checkbox.dateWhenChecked": true

Preview:

  • sample with date [2017-11-23]

Format date

If dates are enabled, they can be formatted with the following user setting:

"markdown-checkbox.dateFormat": "YYYY-MM-DD"

It makes use of the JavaScript library moment.js which means that the date format patterns can be found there.

In addition the syntax around in which the date is placed can be defined via template. {date} will be replaced by the actual date value:

"markdown-checkbox.dateTemplate": "({date})"

Preview:

  • sample with date (2017-11-23)

Specify language IDs

Besides markdown, this extension can also be used for other languages in VS Code. The language IDs can be specified in the user settings like this:

"markdown-checkbox.languages": [
    "markdown",
    "plaintext"
]

vscode-markdown-checkbox's People

Contributors

dependabot[bot] avatar geekpete avatar m-paternostro avatar mark-anders avatar pkief avatar reedspool avatar ryotatake avatar tkdennis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vscode-markdown-checkbox's Issues

`Mark checkbox` removes bold Markdown formatting

Executing Mark checkbox on

- [x] this is a **bold** action

incorrectly removes the bold Markdown formatting, resulting in

- [ ] this is a bold action

instead of just unchecking the checkbox and keeping the rest:

- [ ] this is a **bold** action

Environment: Visual Studio Code 1.79.2 on Windows 10, Markdown Checkbox 1.9.0

Slow!

Either toggling a checkbox with the keyboard shortcut, or opening the modal with the n/N buttom in the bottom bar are both very slow (like, 30s).

(After opening the modal, clicking a checkbox, and then clicking "OK", the file is modified within four seconds--still slow, but ok.)

This is in a Foam workspace with 2643 notes and about 500,000 files overall.

Option to support alternate brackets

From #32, I'm experimenting with using different types of brackets to have different meaning. So - [ ] is a task that should be executed. While - ( ) is a checkbox, but it's a checklist, that gets completed, then reset for example.

Would you be up for adding such a feature to this plugin?

Operational Procedure Checklist Features

Would love to use this for release procedures. Some features that would help:

  • Bullet numbering (after checkbox, before does not render) with numbering reflow
  • outline numbering with indenting
  • Time stamp control to add time or only have time (similar to #15)
  • Preview that allows checking boxes in graphic preview?

Recently started adding checkboxes without user intervention

I had to uninstall this today; it recently started adding checkboxes apparently without user intervention. This happened a few times. I'm guessing some interaction with VSCode version + Linux Version. Was working fine for a few months before this.

Keyboard shortcut on Mac not working.

DISREGARD THIS, works find if set the content type to markdown, my apologies. I suppose this could be conflict with something else, but Apple + Shift + c does not insert a checkbox markdown into the document, it doesn't appear to do anything for me.

[FR] have option to remove the ~~*

Is it possible to have an option remove the ~~* surrounding the text when making it checked?

Depending on what font you use the "~" character doesn't always render well.

image

Timestamp causes "No link definition found" warning

Thank you for the great plugin.
I found a problem when using the "Date when checked" option. The date is enclosed in square brackets [] which causes VS Code to assume it is the beginning of a link reference, throwing the "No link definition found" warning.
Is it possible to change the brackets to some other characters such as parenthesis () that won't confuse VS Code? If this user configurable, that would be ideal since I could see different linters complaining about different characters; or, just plain different user preferences.

Date string regex matches to-do item description in certain scenarios

Hey Philipp,
Thanks for making this lovely extension :).

I found a little issue. When unchecking a to-do item whose description contains open brackets (such as in a Markdown link) with leading whitespace, that part is matched and therefore removed. Here's a GIF showing this:

checkbox toggle

I think this is the line leading to this behaviour:

newText = newText.replace(/\s+\[[\s\S]+\]$/, '') + whitespace;

The set matching the date string could be modified to include any characters except an open bracket. I'm not sure the match should also be lazy, but I added it just in case. It seemed safer to me: \s+\[[^[]+?\]$

Take care of yourself and stay safe,
Simon-Claudius

Keybinding Issue

Hello PKief,

On Windows 11 I have a strange issue where the CTRL + Shift + c keybinding works fine, but the CTRL + Shift + Enter keybinding does not work.

I'm new to VS Code / VS Codium so it might be user error. I do not have any custom keybindings and the only change I have made to VS Codium is the theme.

I also tried to rename my C:\Users<username>\AppData\Roaming\VSCodium directory to .old as well as my C:\Users<username>.vscode-oss to .old thinking a full reset of VS Codium may fix the issue. However, I still have the same issue after reinstalling the extensions.

Any tips would be much appreciated. Great extension BTW!

Thanks!
zons

Option to disable checkbox info on status bar

Hi there,

I really like using your extension. But I also like a clean status bar and I was missing an option to disable the checkbox info there. Is this something you could consider for a future version? 🙏

Respect trailing whitespace on toggle

When toggling a checkbox, remaining whitespace not respected and removed.
Please note the whitespace on first lines!

This

- [ ] Checkbox  
  This is on second line
- [ ] Checkbox

become this when toggle the first Checkbox

- [ ] Checkbox [2019-03-03]
  This is on second line
- [ ] Checkbox

Command 'Markdown: Pick checkboxes' resulted in error

Command 'Markdown: Pick checkboxes' resulted in error (command 'markdown-checkbox.showQuickPick' not found)

There is already a comment on the vsc marketplace about this.

Setup:
Version: 1.73.0 (user setup)
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:34:06.111Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

Add timestamp if checkbox is created

complete action has a timestamp, but there is no timestamp when the checkbox is created.

if a create tmestamp is there , I can roughly know how long the TODO item take.

I am not a JS developer, so if this feature can be done, that will be great ;)

Tri-state checkboxes

I really enjoy using this extension, not only for simple to-do lists but also for "decision" lists. I start these lists by enumerating all the options I have and then I consider every single option in detail. What I now miss sometimes is a third state to distinguish between "unconsidered yet" and "rejected". I fully understand if this was not your intention, but maybe a third state is valuable in other use cases as well :-)

Multi-line operations

First - Love the extension!

Title explains it all. Would love to have the ability to mark multiple lines as checkboxes/toggle checkboxes, based on selection :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.