Repeat Last Commands
unlistedby 3C0D
Repeat last command(s). toggle pinned command with tab. get last command id
Repeat Last Commands
An Obsidian plugin that enhances your workflow by allowing you to quickly repeat your most recently used commands.
Features
- Last Command: Quickly execute the most recently used command
- Last Commands modal: Access your recent command history in a menu
- Command Aliases: Create custom names for frequently used commands (manageable in settings)
- Command Exclusions: Hide/show specific commands from the command palette (manageable in settings)
- Keyboard Shortcuts: Quickly configure shortcuts for commands directly from the palette
- Quick Switcher Preview: Enhanced Obsidian native Quick Switcher with hover preview functionality (press
Ctrl+Sto toggle)
How to Use
Basic Commands
- Last Command: Execute your most recently used command
- Last Commands modal: Open a modal with your command history to select from
- Copy Command ID: Copy the ID of the last executed command to clipboard
Quick Switcher Enhancement
When using the native Obsidian Quick Switcher:
- Press
Ctrl+Sto toggle file preview - Hover over any file in the list to see its preview
- The preview appears centered in the switcher modal
Command Aliases
- Open the command palette
- Press
Ctrl+A(or your configured shortcut) when a command is selected - Enter an alias name for the command
- The command will now appear with your custom name in the command palette
- You can manage all your aliases from the plugin settings
Keyboard Shortcuts in Command Palette
When the command palette is open, you can use these shortcuts:
Ctrl+A: Create an alias for the selected commandCtrl+P: Pin/unpin the selected commandCtrl+-: Hide the selected command from the paletteCtrl++: Open modal to manage hidden commandsCtrl+H: Open hotkey settings for the selected command
Settings
Each setting below will appear if you have created aliases or hidden commands:
-
Command Aliases: View and manage your custom command aliases
- Shows commands with custom names you've created
- You can remove aliases to restore original command names
-
Hidden Commands: View and manage commands you've hidden from the command palette
- Shows commands you've excluded from the command palette
- You can restore hidden commands to make them visible again
Installation
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "Repeat Last Commands"
- Install the plugin and enable it
Manual Installation
- Download the latest release from the releases page
- Extract the zip file to your Obsidian plugins folder:
<vault>/.obsidian/plugins/ - Enable the plugin in Obsidian settings
Support
If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.
License
This project is licensed under the MIT License.
Development Environment Setup
File Structure
main.tsmust be in the src folderstyles.csscan be in the src folder or root folder
Development Options
-
First install yarn:
npm install -g yarn -
Inside the vault's plugins folder:
- Delete the
.envfile or put empty paths.
- Delete the
-
From another folder:
- Set the vault paths in the
.envfile:TestVaultfor developmentRealVaultfor production simulation
- Necessary files will be automatically copied to the targeted vault
- Set the vault paths in the
Available Commands
yarn start: Opens VS Code, runsyarn install, thenyarn devyarn dev: For developmentyarn build: Builds the projectyarn real: Simulates a traditional plugin installation in your REAL vaultyarn bacp: Builds, adds, commits, and pushes (prompts for commit message)yarn acp: Adds, commits, and pushes (without building)yarn voryarn update-version: Updates version, modifies relevant files, then adds, commits, and pushesyarn release: Creates a GitHub release (prompts for release title, can be multiline using\n)yarn lint: Lints the projectyarn lint:fix: Fixes linting issues
Recommended Workflow
yarn startyarn bacpyarn v(oryarn update-version)yarn r(oryarn release)
Additional Features
- obsidian-typings: This template automatically includes obsidian-typings, providing access to additional types not present in the official API.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.