Local Text Tools

pending

by Nils Telleria

Text manipulation commands: case conversion, line numbering, and more. Works with single and multiple selections.

7 starsUpdated 26d agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Local Text Tools Plugin for Obsidian

Text Manipulation Tools Plugin for Obsidian with simple commands that run locally in your vault.

An Obsidian plugin that provides ~80 text manipulation commands accessible from the Command Palette with the prefix Local Text Tools:.

Commands Overview

CategoryRepresentative Commands
Case / FormatUpper case, Lower case, camelCase, PascalCase, CONSTANT_CASE, dash-case, snake_case, dot.case, Title Case, sPoNgE cAsE, Swap case, Slugify, Latinize
Line OperationsSort (6 modes), Shuffle, Remove/keep duplicates, Trim, Prefix/Suffix/Wrap lines, Split/Join lines, Pad start/end, Count occurrences
Filter LinesKeep or remove lines matching a string or regex — in-place or into a new note (8 commands)
EncodingURL encode/decode, HTML entity encode/decode, Base64 encode/decode, JSON escape/unescape, Decimal ↔ Hex
NumbersIncrease/decrease all integers by 1 or a custom step
Generate4 GUID formats, random int/float/hex, Lorem ipsum, 7 sequences (letters, NATO, months, days), 3 timestamp formats
AdvancedFormat as table, Extract with regex (capture groups), Duplicate selection
Text Slots5 persistent named clipboard entries (set / paste)
Line NumbersSequential (1, 2, 3…) or real file line numbers

Installation

  1. Open Obsidian SettingsCommunity PluginsBrowse.
  2. Search for "Local Text Tools" and click Install.
  3. Enable the plugin under Settings → Community Plugins.
  4. Optionally configure plugin parameters via Settings → Local Text Tools.

Manual install: Download main.js and manifest.json from the latest release and copy them into <vault>/.obsidian/plugins/text-tools/.


Usage

  1. Open the Command Palette (Ctrl/Cmd + P).
  2. Type Local Text Tools: followed by the command name (e.g. Local Text Tools: Upper case).
  3. The command is applied to each active selection. If nothing is selected, you will be prompted to select text first.

Some commands open a small modal to collect additional input (e.g. the delimiter for Split lines, or the range for Insert random integer).


Features

Case / Format

CommandDescription
Upper caseConvert selected text to UPPERCASE
Lower caseConvert selected text to lowercase
camelCaseConvert to camelCase
PascalCaseConvert to PascalCase
CONSTANT_CASEConvert to CONSTANT_CASE
Dash case (kebab-case)Convert to dash-case
Snake caseConvert to snake_case
Dot caseConvert to dot.case
Title caseConvert to Title Case
sPoNgE cAsEConvert to alternating sPoNgE cAsE
Swap caseSwap the case of each character
Separate words with spacesRemove separators, join with spaces
Separate words with slashesRemove separators, join with /
Separate words with backslashesRemove separators, join with \
Reverse characters on each lineReverse the character order per line
SlugifyConvert to URL-friendly slug
Latinize (remove diacritics)Strip accents and diacritical marks

Line Operations

CommandDescription
Sort lines (case sensitive / insensitive, A→Z / Z→A)4 alphabetical sort variants
Sort lines by length (shortest / longest first)2 length sort variants
Sort lines by word count (fewest / most first)2 word-count sort variants
Shuffle linesRandomise line order
Remove duplicate linesKeep only the first occurrence of each line
Remove adjacent duplicate linesDeduplicate consecutive identical lines
Keep only duplicate linesKeep only lines that appear more than once
Remove blank linesRemove lines that contain only whitespace
Remove empty linesRemove completely empty lines
Remove surplus blank linesCollapse multiple blank lines to one
Trim leading and trailing whitespaceTrim both ends of each line
Trim leading whitespaceTrim the start of each line
Trim trailing whitespaceTrim the end of each line
Remove all whitespace charactersStrip every whitespace character
Replace newlines with a spaceJoin lines with a space
Collapse whitespace to single spaceReduce all runs of whitespace to one space
Count line occurrencesPrefix each unique line with its count
Prefix linesAdd a string before every line
Suffix linesAdd a string after every line
Wrap linesAdd a prefix and suffix to every line
Split lines by delimiterSplit each line at a delimiter into multiple lines
Join all lines with a glue stringJoin all lines using a glue string
Join every N linesGroup lines into blocks of N and join each block
Pad lines at startLeft-pad each line to a target length
Pad lines at endRight-pad each line to a target length

Filter Lines

CommandDescription
Filter lines: keep matching stringKeep only lines containing a string
Filter lines: remove matching stringRemove lines containing a string
Filter lines: keep matching regexKeep only lines matching a regex
Filter lines: remove matching regexRemove lines matching a regex
Filter lines into new note: keep matching stringSame as above, output to a new note
Filter lines into new note: remove matching stringSame as above, output to a new note
Filter lines into new note: keep matching regexSame as above, output to a new note
Filter lines into new note: remove matching regexSame as above, output to a new note

Filter commands remember the last 10 queries used.

Encoding

CommandDescription
URL encodePercent-encode special characters
URL decodeDecode percent-encoded characters
HTML entity encodeEncode <, >, &, ", ' as HTML entities
HTML entity decodeDecode HTML entities
Base64 encodeEncode to Base64
Base64 decodeDecode from Base64
JSON escape (to string)Escape text as a JSON string literal
JSON unescapeUnescape a JSON string literal
Convert decimal to hexConvert each decimal integer to hexadecimal
Convert hex to decimalConvert each hexadecimal value to decimal

Numbers

CommandDescription
Increase numbers by 1Increment every integer in the selection
Decrease numbers by 1Decrement every integer in the selection
Increase numbers by custom stepIncrement by a specified amount
Decrease numbers by custom stepDecrement by a specified amount

Generate / Insert

CommandDescription
Insert GUID (with dashes)Insert a UUID v4 xxxxxxxx-xxxx-…
Insert GUID (no dashes)Insert a UUID v4 without dashes
Insert GUID (with braces)Insert a UUID v4 {xxxxxxxx-…}
Insert GUID (C# constructor)Insert new Guid("…")
Insert random integer from rangeRandom integer between min and max
Insert random real number from rangeRandom floating-point number
Insert random hexadecimal number from rangeRandom hex value
Insert lorem ipsum sentenceInsert a single Lorem Ipsum sentence
Insert lorem ipsum paragraphInsert a Lorem Ipsum paragraph
Insert sequence: uppercase lettersA, B, C…
Insert sequence: lowercase lettersa, b, c…
Insert sequence: NATO phonetic alphabetAlpha, Bravo, Charlie…
Insert sequence: long month namesJanuary, February…
Insert sequence: short month namesJan, Feb…
Insert sequence: long day namesMonday, Tuesday…
Insert sequence: short day namesMon, Tue…
Insert timestamp (local)Current date/time in local time
Insert timestamp (UTC / ISO 8601)Current date/time in UTC
Insert Unix timestampCurrent Unix epoch seconds

Advanced

CommandDescription
Format as tableAlign columns using a configurable delimiter
Extract with regexExtract and reformat lines using capture groups
Duplicate selectionDuplicate each selected block

Text Slots

CommandDescription
Text slot 1–5: setStore the current selection in a named slot
Text slot 1–5: pasteInsert the stored slot content at the cursor

Line Numbers

CommandDescription
Insert line numbers (sequential)Prefix lines 1, 2, 3…
Insert line numbers (real)Prefix lines with their actual file line number

Contributing

Contributions are welcome and appreciated! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.


License

This project is licensed under the MIT License — see the LICENSE file for details.


Changelog

See CHANGELOG.md for a history of changes.


Acknowledgements

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.