Dedlin is an interactive line-by-line text editor and a DSL, similar to edlin or ed.
It is scriptable, which makes it useful for find, insert, replace, delete, and reorder operations on existing files.
Soon it will support non-line number ranges, e.g. "/Done/ DELETE
Dedlin extends on edlin enough that it is not backwards compatible.
I have made changes to make the app less user hostile than classic ed or edlin, but there is a --vim_mode
where all help, warnings, feedback will be suppressed.
Requires Python 3.13 or higher.
Install globally in an isolated tool environment:
uv tool install dedlinOr use pipx:
pipx install dedlinRun pre-built image with docker. Painful, but you're using an edlin clone, so that is what you're looking for.
# This is should work in powershell or linux bash. Not windows git-bash.
docker run --rm -it -v "${PWD}/:/app" ghcr.io/matthewdeanmartin/dedlin:latest file.txtLaunch and edit file_name.txt
If you installed with pip or pipx
dedlin file_name.txtCommand line help
> python -m dedlin --help
Dedlin.
An improved version of the edlin.
Usage:
dedlin [<file>] [options]
dedlin (-h | --help)
dedlin --version
Options:
-h --help Show this screen.
--version Show version.
--macro=<macro> Run macro file.
--echo Echo commands.
--halt_on_error End program on error.
--promptless_quit Skip prompt on quit.
--vim_mode User hostile, no feedback.
--verbose Displaying all debugging info.
--blind_mode Optimize for blind users (experimental).
--headless Run without interactive prompts.
Sample session
_ _ _ _
__| | ___ __| || |(_) _ _
/ _` |/ -_)/ _` || || || ' \
\__,_|\___|\__,_||_||_||_||_|
Editing /home/mmartin/github/dedlin/sample.txt
? * 1i
1 INSERT
Control C to exit insert mode
? 1 : cabbage
? 2 : bread
? 3 : carrots
? 4 : ghost peppers
? 5 : coffee
? 6 : tortillas
? 7 :
Exiting insert mode
? * SORT
SORT
Sorted
? * LIST
1,6 LIST
1 : bread
2 : cabbage
3 : carrots
4 : coffee
5 : ghost peppers
6 : tortillas
? * EXIT
1,6 EXIT