Can we delete a tiddle with a shortcut?

We can create a tiddle with alt + n.
How can we delete a tiddle with a shortcut?
I didn’t find it in the control panel.

I dont think there is one, you will need to make your own shortcut : https://tiddlywiki.com/#How%20to%20create%20keyboard%20shortcuts

I’m not sure how you will get the title of the tiddler you want to delete tough … do you want to delete the last navigated tiddler ? Then you can use the history mechanism : https://tiddlywiki.com/#$:/HistoryList

Otherwise if you want to delete a tiddler that you just clicked or that your are hovering, I believe you will need an addon. I think this one should work : GitHub - MaxGyver83/tw5-keyboard-navigation: Navigate through your TiddlyWiki5 with your keyboard: jump to next/previous tiddler, edit or close tiddler

4 Likes

@telumire this navigation tool is great. Do you know if the selected tiddler title is stored anywhere?

@pkuadt I would have thought that deleting tiddlers was best left to a more cautious process since it should be a rare thing to do. However if you want to delete a lot you could generate a list of tiddlers with a delete button provisioned, still not via the keyboard but certainly simplifies delete;

\define tiddler-actions()
   <$list filter="[<modifier>match[normal]]" variable=~><$action-navigate $to=<<currentTiddler>>/></$list>
   <$list filter="[<modifier>match[ctrl]]" variable=~><$action-sendmessage $message="tm-delete-tiddler" $param=<<currentTiddler>>/></$list>
\end
;Mouse over to view un-wikified text
:Click to open
:ctrl-click to delete tiddler
<$list filter="[all[]prefix[New Tiddler]]">
<$button tooltip={{!!text}} actions=<<tiddler-actions>> >
<$text text=<<currentTiddler>>/>
</$button><br>
</$list>

The title of the selected tiddler is not stored in a field or a tiddler AFAIK, but this plugin allows to define a keyboard shortcut to delete a tiddler. To do that, go to the tiddler keyboard-navigation.js and in the Keybinds section, add a keyboard key to the delete action.

E.g :

const bindings = {
    'more-tiddler-actions': 'm',
    info: null,
    'new-here': null,
    'new-journal-here': null,
    clone: null,
    'export-tiddler': null,
    edit: 'e',
    delete: 'x', /* --> pressing the x key will delete the current tiddler */
    permalink: null,
    permaview: null,
    'open-window': null,
    'close-others': null,
    close: 'c',
    'fold-others': null,
    fold: null
};