Files in the top-level directory from the latest check-in
- preprocessor.c
- README.md
- se.c
- se.go
- se.js
- se.nim
- se.py
- se.reds
- se.rs
- se.zig
- se_translate_from_zig.c
- se_windows.c
- se_windows.nim
- se_windows.reds
- se_windows.v
- se_windows.zig
licenze:
This code and its derivatives can be used under the following conditions:
- Do not attack other countries.
- Jerk off on public at least 1 time per day.
- maintain hygiene.
- check my other projects https://chiselapp.com/user/sergey6661313
about:
# ScalpiEditor - ansi-only text editor
killer features: no. its just editor.
writed from zig language for linux terminals.
Initially I wrote the editor exclusively in zig.
se.zig - for linux
se_windows.zig - for windows
But then I wanted to show off and created a bunch of unnecessary files.
Here is a list of them:
next files not writed yet (wip) and not used:
se.reds - for Red/System compiller
se_windows.reds - Red/System for windows
se.v - vlang
se.nim - nim
se.py - python
se.odin - odin
se.js - js (for node like platform (bun))
preprocessor.c - simple preprocessor for write macrosses in languages where no support preprocessor
## Editor Functionality:
Handles input/output operations, including reading from and writing to the terminal.
Supports text manipulation features such as inserting, deleting, and navigating through text.
Includes clipboard operations, marking lines, and easy motion for quick navigation.
Provides functionality to fold and unfold sections of the text based on indentation.
Supports saving and loading files, including external copying using a temporary file.
Implements a macro recording and playback system for repetitive tasks.
Provides support for commentary highlighting and setting various font styles for text. (in src)
## Noteworthy Features
Easy Motion: A mode for quick navigation within the text using key shortcuts.
Macro Recording: Allows recording sequences of key presses to be replayed later.
Text Folding: Automatically folds sections of text based on indentation levels.
Clipboard Integration: Supports external clipboard operations via a temporary file.
## videos (not tutorials. deprecated. many keys remaped. But idea of navigating is showed...):
https://www.youtube.com/watch?v=8sJJOQeyOTE
https://www.youtube.com/watch?v=8qQlMbE8Zmw
https://www.youtube.com/watch?v=51ao2416ioE&t=60s
## main dev page:
https://chiselapp.com/user/sergey6661313/repository/ScalpiEditor/
## Download src:
select version:
https://chiselapp.com/user/sergey6661313/repository/ScalpiEditor/timeline?advm=0&ms=exact&n=20&ss=x&t&udc=1&y=ci
just click to hash-summ link about selected leaf
find link to tar.gz and download it.
or if you're lucky you can try just clone latest version: https://chiselapp.com/user/sergey6661313/repository/ScalpiEditor/info?name=tip
$ fossil clone https://chiselapp.com/user/sergey6661313/repository/ScalpiEditor ScalpiEditor.fossil
$ mkdir ScalpiEditor
$ cd ScalpiEditor
$ fossil open ../ScalpiEditor.fossil
#### after compiling you may rename and copy binary to "~/bin/se" like this:
$ cp ./zig-out/bin/a.out ~/bin/se
#### and add this lines to config (".bashrc" file for bash) for easy use:
export EDITOR="~/bin/se"
export PATH="~/bin:$PATH"
FAQ:
* pasta from system clipboard makes the text move apart
try paste multiline text only in folded mode (ctrl+e)
* copy to file not work
copy to file copyid only cutted lines...
first clear "cut" buffer with [Alt] + [z]
then copy blocks with ctrl + c to "cut" buffer
and then use [Alt]+[c]
* Why did I refuse to parse the colon in the file name?
In the linux operating system, files with a colon in the name are often created.
* Nothing work or crash on start
Use only stable version (green commits).
Use terminal only with monospaced fonts. crazy fonts giving crazy resaults.
* Does not offer to save the file on exit.
Idiot protection does not work, if the fool is used to pressing "y" on every programm.
* Why i not support UTF? why display only ansi symbols?
just help me write this :))
* no history
partialy undo work - only for current line.
the editor doesn't have to keep the whole history, it's a job for csv.
like fossil, git or any you want
do not make many changes to the code at once.
It's unhealthy.
* how to open and close multiple files?
just use multiple tabs in your terminal. (if terminal can this)
or use multiple terminals (if you use graphical mode)
or use any terminal multiplexer.
and use [Alt]+[c] and [Alt]+[v] for copy paste
* Mouse not work
I use scroling for view terminal history.
I don not ability to catch only buttons without catch scrolling.
to support me
with boosty:
https://boosty.to/cutloosedev
with monero:
87T7 qGbA TrM3 a6Br
DyeC jQQf NWtU u3iZ
bHVB MC6W mEbN NE13
Qrrt KhBb e4vF 58NR
8PTF dYk2 Sozc HexX
4Q69 jbdQ Asrs P7B
additional tips for linux:
i use "sakura" terminal. There no work "ctrl+shift+left" key-sequence but other thing work norm.
previously i try terminals: zutty, kitty, alacritty, Terminology - good (not perfect) work.
## you may rename and copy binary to "~/bin/se" like this:
cp ./ScalpiEditor.exe ~/bin/se
additional tips for windows:
in windows need use modern terminal emulator (and just delete some binding keys from menu)
## you can try add folder with bin file to system path like this:
## temporaly:
$env:path += ";$($pwd.Path)"
## temporally for your custom folder
$env:path += ";C:\TopSecret\Bin"
## or
$addPath = 'C:\TopSecret\Bin'
## or for not temporally:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$($pwd.Path)", "User")
list of bindings:
warning! the operation of certain key combinations depends on the terminal and not on me. if key combination not work try alternative version of combination or use alternative terminal. (for reference: in some programs all key combinations work, not because their code is correct, but because they use dirty hacks. For example, they intercept the keyboard through root access. - such programs need to be “installed” into the system, instead of just copying and I don't like installers - that won't happen in my text editor.)
basic keys: help [F1] save [Ctrl] + [s] exit [Ctrl] + [q] fold/unfold [Ctrl] + [e]
navigation: use arrows for navigation or Alt with wasd or Alt with hjkl
enter block [Tab]
leave block [Esc]
go to start of line [Home] or [Ctrl] + [Shift] + [Left]
go to end of line [End] or [Ctrl] + [Shift] + [Right]
go to first line [Ctrl] + [Up]
go to last line [Ctrl] + [Down]
go to line from number [Ctrl] + [g]
go to left word [Ctrl] + [Left]
go to right word [Ctrl] + [Right]
go to prev paragraph [Alt] + [;]
go to next paragraph [Alt] + [']
easy motion:
horizontal: [Alt] + [q]
vertical: [Alt] + [e]
symbol interacting: insert as prev [any symbol] delete prev [BackSpace] delete next [Del]
lines/blocks interacting: split line [Enter] join lines [Ctrl] + [j] // also sometimes [Ctrl] + [enter] work move up [Alt] + [Up] // not work on some terminals... move down [Alt] + [Down] move out current block [Alt] + [8] clear line [Shift] + [Del]
word interactig: delete current word: [ctrl] + [w] copy current word to find buffer: [Alt] + [1]
indents: copy intervalls from up line [f5] copy intervalls from down line [f6] move indent to left [Alt] + [<] // not work on some terminals add indent [Alt] + [>]
mark: mark [Alt] + [m] jump to mark [Alt] + [g] move block outside mark [Alt] + o move block inside mark [Alt] + 9 move block before mark [Alt] + [0]
also there are 4 buffers: 1) buffer for blocks/lines: duplicate [Ctrl] + [d] cut [Ctrl] + [x] copy [Ctrl] + [c] paste (block) [Ctrl] + [v] discard cutted/coppied [Alt] + [z]
2) external buffer (file "clipboard.txt")
copy [Alt] + [c]
paste [Alt] + [v]
3) buffer for finding text:
edit buffer [Ctrl] + [f]
copy current word [Alt] + [1]
find prev: [Alt] + [2]
find next: [Alt] + [3]
paste [Alt] + [4]
for current block: (in folded mode find only in current level)
find next [Alt] + [8]
find prev: [Alt] + [7]
4) buffer for replace text
edit buffer: [Alt] + [5]
replace finded: [Alt] + [6] // for replace need cursor placed on start of finding text
5) buffer for macroses
start record macro [F1]
stop record macro [F2]
play latest recorded macro [F3]
conclusions
C language does not contain namespaces. this does not allow you to export library methods that have the same method names.