utagai / jot Goto Github PK
View Code? Open in Web Editor NEWWIP. Minimalism + scribbling.
WIP. Minimalism + scribbling.
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.
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.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.