___________ _________ ___ ______________________________ ___
/ _____/ / / / _ \/ /\ / ______/ / ___ / | / /\
/ /____/ / / / /_/ / / / / /_____/ / / / / / / |/ / /
/____ / / / / _____/ / / / ______/ / / / / / / /| / /
_____/ / /__/ / /\___/ /____/ /_____/ / / / /__/ / / | / /
/_______/\_______/__/ / /_______/________/__/__/__/________/__/ /|__/ /
\_______\ \______\__\/ \_______\________\__\__\__\________\__\/ \__\/
Remedying the pain of command line editing since 2014
Suplemon is an intuitive command line text editor with multicursor support. Suplemon replicates Sublime Text style functionality in the terminal with the ease of use of Nano.
Try it out! Installation is as easy as pulling the repo.
git clone https://github.com/richrd/suplemon.git
The master branch is considered stable.
No dependencies outside the Python Standard Library needed.
python3 main.py [filename]...
Must use python3 for proper character encoding support.
Tested on Unix.
Suplemon is an intuitive command line text editor. It supports multiple cursors out of the box. It is as easy as nano, and has much of the power of Sublime Text. It also supports extensions to allow all kinds of customizations. To get more help use 'Ctrl + H' in the editor. Suplemon is licensed under the MIT license.
- Terminal text editing with style
- Proper multi cursor editing, Sublime Text style. Blessed!
- Easy Undo/Redo
- Multiple files in tabs
- Powerful Go To feature for jumping to files and lines
- Copy & Paste, with multi line support
- Find and Find next
- Extensions (easy to write your own)
- Create a command line text editor with built in multi cursor support. Damn it's amazing!
- Usability should be as good and easy as nano.
- Multi cursor
and multi selectionshould be comparable to Sublimetext. - Develop Suplemon with Suplemon!!! I already use Suplemon for all command line editing, Git commits, and a lot of developement.
-
Ctrl + X
Exit
-
Ctrl + C
Cut line(s) to buffer
-
Ctrl + V
Insert buffer
-
Ctrl + W
Duplicate line
-
Ctrl + G
Go to line number or file (type the beginning of a filename to switch to it). You can also use 'filena:42' to go to line 42 in filename.py etc.
-
Ctrl + F
Search for a string or regular expression (configurable)
-
Ctrl + D
Search for next occurance or find the word the cursor is on. Adds a new cursor at each new occurance.
-
Alt + Arrow Key
Add new curor in arrow direction
-
Ctrl + Left / Right
Jump to previous or next word
-
ESC
Revert to a single cursor
-
Alt + Page Up
Move line(s) up
-
Alt + Page Down
Move line(s) down
-
F1
Save current file
-
F2
Reload current file
-
Ctrl + O
Open file
-
Ctrl + Page Up
Switch to next file
-
Ctrl + Page Down
Switch to previous file
-
Ctrl + E
Run a command.
-
F5
Undo
-
F6
Redo
-
F8
Toggle mouse mode
-
F9
Toggle line numbers
-
F11
Toggle full screen
- Regex find/search (make find configurable to do normal & regex)
- CSS highlighter
- Move the editor view (scroll) down when finding multiple occurances
- The following solved with global exit check (if any file is modified but not saved)
- Close files one at a time with 'save?' prompt.
- Prompt for close or exit confirmation only when file(s) have been modified
- Indicate if file was saved successfully or if it failed
- Better yes/no query for exit (and in general)
- Generic linelighter for generic highlighting
- Editor plugins/extensions/macros
- Design proper API
- Trim command to get rid of trailing whitespace
- Lower/Upper/Reverse lettercase (todo: reverse case)
- Reverse line
- New file and close file
- Undo / Redo
- Move config file to user home directory
- File type detection for highlighting
- Duplicate line (without clipboard)
- Use semver
- Nano-like menu and keyboard shortcuts with legend. TODO: respect future custom bindings
- Go to file as well as line number
- Show if file is edited
- Copy / Paste buffer
- Proper status bar information
- Jump to end of whitespace with home key
- Command line for getting input
- Line number toggling
- Loading multiple files and switching between them
- Live config reloading when it's modified
- Line based syntax highlighting
- Peer to peer colaborative editing. Could be implemented as an extension.
- Auto backup. Activate on n changes or every n seconds
- Add option to change ESCDELAY (function keys aren't detected on slow connections)
- Global clipboard (copy from one file to another)
- Indicate if file isn't writable (in status bar). Use os.access(path, os.W_OK)
- Custom key bindings
- Auto complete
- Selections
- Proper syntax higlighting
- Combine line based highlighters and other language related data (include comment syntax etc)
- Default to legendary Monokai colors http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
- File selector, kind of like what nano has
- Store files and cursor positions for and restoring on next run
- Feature to automatically add ; to end of lines
- Generalized: add line prepend and append commands
- Will need multiline comment and string detection etc.
- Setting for enabling/disabling undo for cursor changes
- Read only viewer
And disable editingDon't disable editing. Instead enable save as.
- Syntax specific commenting.
- Display tab characters with a replacement char (tab messes up lines)
- Optimize rendering for ssh (minimal screen update)
- Only refresh cursors when moving around
- Only refresh modified lines when editing
- With multiple lines selected pressing backspace and enter makes changes (shouldn't)
- Remember find query if occurance not found (jump to top of file)
- Input queries can't detect trailing whitespace
- Unreliable undo/redo.
- Refine find and find_next commands.
- Don't forget string to find automatically when using Ctrl + F
- Finish refactoring viewer.py and editor.py
- Cut command fails when multiple cursors are on or close to the last line
- Fix 'finding' empty character. Revert to 'add_cursor_right'.
- Better auto find with ctrl+d. (Find the current word or character)
- Forget last find on esc.
- Return code 0 on exit: Curses forces code 130 and causes git to ignore saved commit message, argh!
-
Can't open files that have spaces in them.Works when using 'file\ name' - Config extension double loads config file, instead of switching to it
- Encoding errors
- Remove "Failed to load config." when file doesn't exist
- Delete key when cursor at line end;
add dedicated settingmade to work as normal. - Make adding cursors up and down smarter: add them at main cursor x coordinate if possible
- Saving file into a directory stores the relative path as the filename.
- Cursors sometimes left hanging at non existent coordinates (eg. when file reloaded) Solved by rectifying all cursors in move_cursors. Should optimize more in callers.
- Remove debug logging in non-debug mode
- Fill in incomplete config file with defaults
- Add 'remove previous cursor' function (fixed with undo/redo)
- Can't open files like '~/.suplemon-config.json'
- Cursor invisible when at end of scrolled line
- Esc key effect is delayed
- Fixed: Find starts at top of file instead of current
linecursor - Start find at current line AND column
- Make editor white color brighter (not gray)
- Show editor at top of terminal when show_top_bar == False
For many the command line is a different environment for text editing. Most coders are familiar with GUI text editors and for many vi and emacs have a too steep learing curve. For them (like for me) nano was the weapon of choice. But nano feels clunky and it has its limitations. That's why I wrote my own editor with built in multi cursor support to fix the situation. Another reason is that developing Suplemon is simply fun to do.