And in your general case of putting back ticks around text… instead of manually inserting them just select the text and do Format > Code.
This sounds neat, but I’m not sure it’s worth the implementation work, bugs, etc. I’m not sure if anyone would find it, and even my programmers Sublime text editor doesn’t seem to do anything special like that.
In the specific case of Backticks (which do inline code formatting) you can delete them automatically using Edit > Clear Formatting. You don’t even need to select all the text. If there’s interest I think a similar command (clear brackets) would be pretty easy to add and it wouldn’t make the existing autocompletion of brackets any more complicated.
Yes, I’ll remove single quotes from the smart pairs implementation. I agree a check to see if proceeding character is alphanumeric seems reasonable, I’ll look into it.
Can you please add the support for * instead of _ for marking text as italic ?
In the meanwhile you could assign this to a keystroke:
property pstrJS : "
function(editor) {
editor.toggleSelectionFormatting(editor, '*');
}
"
tell application "FoldingText"
set lstDocs to documents
if lstDocs ≠ {} then tell item 1 of lstDocs to (evaluate script pstrJS)
end tell
* happens to be my personal preference for italics too.
I had been typing *them* manually (FT does, of course, already recognise asterisk-delimited strings and display them as italicised) but prompted by your post I’ve now assigned ⌘I in FT to Italicise the selection with * using the KeyBoard Maestro macro in the utilities folder of this repository.
Hey Jesse, Been quiet of late as life has taken over from FT beta stuff for a few months. Looks like things are moving along at a rapid pace.
Quick reminder. You mentioned you were going to look at improving the core outliner functionality immediately after the 2.0 public release. The early talk was about maybe having an external palette to drag/drop the structure of your doc. Hoping this is still on your radar.
Hey Jesse: is full tag auto-completion going to happen in a release coming soon? Not bugging, just wondering how high it is on your priority list or whether I should attempt to hack together some kind of plugin…
Thanks, Sven— that was what I actually had in mind as a starting point for hacking something together!
In other news: 2.1 DEV 741 is telling me that it’s expired. Looking forward to 742, or perhaps 2.2…?
UPDATE: scratch that comment about the expiration notice. I’d tried out a disk cleaning utility and must have unwittingly cleaned out some caches or installation logs…
It does copy its own tab depths (or are you thinking of pasting into FT ?)
But of course the hash heading vs list difference means that its tab counts don’t map directly onto nesting levels.
If you want to copy an FT outline in a way that could be pasted (for example into TaskPaper), with full preservation of nesting levels (and of project/header status for hashed lines), you could do something like this:
-- Copy FT selection with full indentation (and trailling colon for project/headings) for TP pasting
property pstrJS : "
function(editor, options) {
function nestLevel(oNode) {
var lngLevel=0;
while (oNode.parent) {
lngLevel++;
oNode = oNode.parent;
}
return lngLevel;
}
var lstNodes = editor.selectedRange().nodesInRange(),
lstLines=[], varNode, strLine, strSuffix;
lstNodes.forEach(function (varNode) {
strLine = varNode.line().trim();
if (varNode.type() !== 'heading') strSuffix='';
else strSuffix=':';
lstLines.push([Array(nestLevel(varNode)).join('\\t'), strLine, strSuffix].join(''));
});
return lstLines.join('\\n');
}
"
on run
set varResult to missing value
tell application "FoldingText"
set lstDocs to documents
if lstDocs ≠ {} then
tell item 1 of lstDocs to set varResult to (evaluate script pstrJS)
set the clipboard to varResult
end if
end tell
return varResult
end run
Thought I’d fixed it, but I’m still getting an expiration notice on 2.1dev741, even though I’ve purchased via the App store. My guess is that I’ve overwritten something after my upgrade to Yosemite— can anyone suggest a pointer in the right direction?
Thanks in advance for any suggestions.
(…and if you’ve seen my other posts this morning, apologies for storming the board, just clearing a few issues from the queue!)