I've been using quire for a little while now and totally love it. I've tried dozens of other task managers but none of them comes close to quire. What I use it for is organizing the development of a program I'm making and I write quite a bit of pseudo-code in the descriptions, inside markdown-codeblocks. One thing that I kept feeling I missed was the ability to easily indent rows. Mostly for the code, but also to put things on the right level in nested lists.
I actually just made a script to do just this in quire and thought maybe you'd be interested in it? Maybe even consider adding it to quire? I'm using the chrome-extension Tampermonkey to load it automatically when i open quire. To try it one could also copy&paste and execute in the code in the developer panel.
To then make use of it, just highlight some text then do ctrl+left or ctrl+right.
The code could definitely be cleaned up and improved upon, but it works - at least in chrome which is the only browser I've tried.
If it's of any interest at all I'd be happy to fix it and make it function properly corss-browser.
$(function(){$('#task-unit .u-desc-input')./*unbind("keydown").*/keydown(indention);});
function indention(e) {
if (e.ctrlKey&&!e.shiftKey) {
if (e.keyCode===37||e.keyCode===39) {
indent(e.target,e.keyCode===39);
e.preventDefault();
}
}
}
function indent(element,right) {
var text=element.value;
var rows=text.split("\n");
var selStart=element.selectionStart;
var selEnd=element.selectionEnd;
var indentionPositions=[];
for (var selPosStartEnd=0; selPosStartEnd<2; selPosStartEnd++) {
var selPos=selPosStartEnd?element.selectionEnd:element.selectionStart;
var searchPos=0;
for (var rowI=0; rowI<rows.length; rowI++) {
var rowLength=rows[rowI].length+1;
if (searchPos+rowLength>selPos) {
indentionPositions[selPosStartEnd]=searchPos;
break;
}
searchPos+=rowLength;
}
}
if (!right)
indentionPositions[1]+=rowLength;
var indentionPart=text.slice(indentionPositions[0],indentionPositions[1]);
var indentionPartOldLength=indentionPart.length;
if (right) {
indentionPart=indentionPart.replace(/(^|\r?\n|\r)/g, "$1 ");
} else {
indentionPart=indentionPart.replace(/(^|\r?\n|\r) /g, "$1");
}
element.value=text.slice(0,indentionPositions[0])+indentionPart+text.slice(indentionPositions[1]);
element.setSelectionRange(indentionPositions[0], indentionPositions[1]+indentionPart.length-indentionPartOldLength+(right?rowLength-1:-1));
return text;
}
Also attaching the Tampermonkey-file.
⭐️ We have closed this thread in order to optimize the performance of our Quire Feedback Forum.
Please see our Quire Feedback Official Guideline for more information. Thank you.
Peggy, Apr 22, 2021
Hi Oscar, Great, would love to read your list! And your suggestion shall be considered when we move on to bring an even better text editor. 😃
Crystal, May 9, 2017
Hi Oscar, Happy to hear you have been enjoying Quire! 😃 What do you like about the app? And what are some of the other ones you have tried? Getting back to your suggestion, thank you for the code and file! But first allow me to double check: You would like a way (eg. a shortcut like Tab) to let you indent rows inside clockblocks in task description/comment?
Crystal, May 8, 2017
What I like about Quire? A lot of things, one being that you're obviously very serious about user feedback. But I have a lot of concrete things that I can list which I love about it. I'm on the go right now though but I'd be happy to write something up later. Yeah, you understood the suggestion correctly. Although it is also useful outside of codeblocks, but just not as much. Thank you
Oscar Jonsson, May 8, 2017