Sonkil

approved

by ohyoungpark

Provides Emacs-style text operations like Kill/Yank (Kill Ring), multi-cursor editing, and visual mark selection.

2 stars182 downloadsUpdated 10mo agoUnlicense
View on GitHub

Sonkil - Emacs-style Text Operations for Obsidian

In Korean, 'Sonkil' means a helping hand with care or a delicate touch. This plugin aims to be a gentle assistant that respects your notes and provides help just where needed.

Features

Features

  • Kill Ring: Storage system with 120 entry capacity
  • Clipboard Sync: Cut/copied text automatically syncs with system clipboard
  • Multi-cursor Kill Line: Cut text from multiple cursor positions and store as a single paragraph
  • Visual Mark Selection: Selected text between mark and cursor is highlighted with a subtle background color
  • Multi-cursor Yank: Paste text at multiple cursor positions simultaneously
  • Status Bar Feedback: Shows current operation status in the status bar

Available Commands and Suggested Hotkeys

Important Note: Default hotkeys have been removed based on Obsidian's plugin guidelines to avoid potential conflicts with existing user configurations and ensure cross-OS compatibility. You can manually configure the hotkeys for Sonkil commands in Obsidian's settings (Settings > Hotkeys).

Here are the suggested key combinations based on the original defaults:

Suggested KeystrokesCommand NameDescription
Ctrl+Shift+ArrowDownSonkil: Add cursor downAdd a cursor on the line below
Ctrl+Shift+ArrowUpSonkil: Add cursor upAdd a cursor on the line above
Ctrl+gSonkil: Cancel mark and exit yank modeCancel current operation (mark, yank mode, multi-cursor)
Alt+wSonkil: Copy regionCopy text between mark and cursor (Copy Region)
Ctrl+kSonkil: Kill lineCut text from cursor position to end of line (Kill Line)
Ctrl+wSonkil: Kill regionCut text between mark and cursor (Kill Region)
Ctrl+lSonkil: Recenter editor viewRecenter editor view (cycles through Center/Top/Bottom)
Ctrl+SpaceSonkil: Set markSet mark at current cursor position
Ctrl+ySonkil: YankPaste most recent text from kill ring (Yank, imports from system clipboard if kill ring is empty)
Alt+ySonkil: Yank popCycle through previously cut text after yank (Yank Pop)

Installation

For Regular Users

Method 1: Community Plugins (Recommended)

  1. Open Settings in Obsidian.
  2. Go to Community plugins and turn off Restricted Mode.
  3. Click the Browse button, search for “Sonkil”, then click Install, and after that, click Enable.

Method 2: Manual Installation

Alternatively, you can install manually:

  1. Go to the GitHub Releases page for this repository.
  2. Download the main.js, manifest.json, and styles.css (if present) files for the desired version.
  3. Create a new folder named obsidian-sonkil inside your Obsidian Vault's plugins folder (YourVault/.obsidian/plugins/). (You can find the Vault path in Obsidian's Settings > About tab.)
  4. Copy the downloaded files into the newly created obsidian-sonkil folder.
  5. Completely quit and restart Obsidian.
  6. Go to Obsidian Settings > Community Plugins, ensure Safe Mode is disabled, and enable the "Sonkil" plugin.

Configuring Hotkeys

Since default hotkeys are not provided due to Obsidian's plugin guidelines, you need to set them manually:

  1. Go to Settings (gear icon in the bottom-left corner).
  2. Navigate to the Hotkeys section in the left sidebar.
  3. In the search bar at the top of the Hotkeys section, type Sonkil: to filter the commands provided by this plugin.
  4. Find the command you want to configure (e.g., Sonkil: Set mark).
  5. Click the + icon next to the command name.
  6. Press the key combination you want to assign (e.g., Ctrl+Space). You can use the combinations suggested in the table above or choose your own.
  7. Repeat steps 4-6 for all the Sonkil commands you wish to use with hotkeys.

For Developers

Requirements

  • Node.js 18 or higher
  • npm 10 or higher
  • Obsidian Desktop App

Development Environment Setup

  1. Clone the project:
git clone https://github.com/ohyoungpark/obsidian-sonkil
cd obsidian-sonkil
  1. Set Node.js version (using nvm):
nvm use
  1. Install dependencies:
npm install
  1. Configure development environment:
# Create .env file
echo "OBSIDIAN_PLUGIN_DIR=/path/to/your/obsidian/plugins/obsidian-sonkil" > .env

# Modify OBSIDIAN_PLUGIN_DIR in .env file to match your Obsidian plugin directory path
  1. Build and test:
# Build
npm run build

# Run tests
npm test

# Install in development mode (to local Obsidian vault)
npm run install-dev

Note:

  • .env file is added to .gitignore to prevent committing sensitive information
  • After installing in development mode, you need to restart Obsidian or reload the plugin for changes to take effect

License

This project is released into the public domain using The Unlicense. See the LICENSE file for details.

Translations

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.