Coder Social home page Coder Social logo

jot's People

Contributors

utagai avatar

Watchers

 avatar

jot's Issues

Syncing after each write can be slow/blocking

This can be a bad UX, since after finishing jotting something down, you have to wait for the sync to go through. We could try asynchronously doing this by forking off a child, connecting its stderr to ours and let it do the work, but this can cause some weird behavior.

Probably the best is to point this out in the --help output and note that an alias can handle this by avoiding sync-on-write and instead running jot sync in the the bg.

Or see if we can come up with something better. At the very least, logging something to suggest we are syncing (instead of staying quiet) is better than nothing.

Exiting $EDITOR without any changes causes an error

This is due to jot attempting to commit no changes, which gives a non-zero exit code from git since we aren't using --allow-empty. We probably shouldn't even be trying to commit unless the repository is dirty.

Consider _only_ supporting Markdown

There are some benefits here. For example, issue #3 becomes 'easier' in the sense that we don't really need to support an option, we just always run a known formatter/linter/etc. It reduces the number of unknowns.

Furthermore, issue #4 could become easier. The main reason we are not only committing the edited file is because there could be other files, namely image files, that were added and referenced in the edited file that should be committed as well. However, if we could assume that the file is Markdown, it isn't too difficult to find image references in the diff and make sure they are committed.

Potentially support multiple instances of `jot` simultaneously

Right now, if you are editing one document via jot and wish to open another one jot will complain about the directory being dirty:

Error: base-dir (/home/bob/foo/bar) is not clean, please fix the issue and run jot again

This can be annoying, but it isn't clear how to approach this, since if we don't enforce this, edits for both documents will get committed. It is possible that we made the wrong design choice initially -- we shouldn't stage everything for commit, but just the file you opened with $EDITOR. The problem with this of course is that you may have added other things as well, like an image file referenced in Markdown which wouldn't be captured.

Post-process script/command option

Having something run after $EDITOR, e.g., some kind of linter or compiler pass could make sense. One immediate use case is catching invalid/dangling image references in Markdown, or maybe compiling LaTeX to check for errors, or even to just to render things to .pdf and syncing that as well/instead.

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.