ScalpiEditor

README.md
Login

File README.md from the latest check-in


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.
- Observe hygiene.

about:

##   ScalpiEditor - ansi-only text editor for linux terminals (console) writed from zig language.
     (contact on discord: Scalpi#1064)

##   killer features: no. its just editor.

Usage:

$ ScalpiEditor FILENAME

example:
    $ ScalpiEditor "README.txt"

##  list of bindings:

    basic keys:
        help  [F1] 
        save  [Ctrl]  +  [s]
        exit  [Ctrl]  +  [q]

    folding (by indent):
        fold/unfold  [Ctrl]  +  [e]

        in tree mode:
            enter block  [Tab]
            leave block  [Esc] 

    use arrows for navigation
    or use this:
        up    [Alt] + [w]
        down  [Alt] + [s]
        left  [Alt] + [a]
        right [Alt] + [d]

    also:
        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]

    fast vertical move:    [alt]   +  [q]
    fast horizontal move:  [alt]   +  [e]

    TODO move to first word after ":" [alt] + [:]
    TODO move to first word after "=" [alt] + [=]
    TODO move to first word after "{" [alt] + [{]
    TODO move to first word after "(" [alt] + [9]

    edit:
        insert prev symbol     [any symbol]
        delete prev char       [BackSpace]
        delete next char       [Del]

    lines/blocks interacting:
        duplicate              [Ctrl]  +  [d]
        cut                    [Ctrl]  +  [x]
        copy                   [Ctrl]  +  [c]
        paste                  [Ctrl]  +  [v]
        discard cutted/coppied [Alt]   +  [z]

        split line             [Enter]
        join lines             [Ctrl]  +  [j] // also sometimes [Ctrl] + [enter] work

        // external buffer (file "clipboard.txt")
        copy                   [Alt]  +  [c] (copy cutted lines to file)
        paste                  [Alt]  +  [v]
        clear line             [Shift] +  [Del]

        move up                [Alt]   +  [Up]  // not work on some terminals...
        move down              [Alt]   +  [Down]


    word interactig:
        delete current word:        [ctrl]  +  [w]

        buffer 1:
            edit buffer              [Ctrl]  +  [f]
            find prev:               [Alt]   +  [2]
            find next:               [alt]   +  [3]
            copy current word:       [Alt]   +  [1]
            paste:                   [alt]   +  [4]

        buffer 2:
            edit buffer:                  [alt]   +  [5]
            replace word from buffer 1:   [alt]   +  [6]

        copy intervalls from up   line   [f5]
        copy intervalls from down line   [f6]

        move indent to left    [alt] + [<]
        add indent             [alt] + [>]

    mark:
        mark                   [Alt]   +  [m]
        jump to mark           [Alt]   +  [n]
        move block before mark [Alt]   +  [0]
        move block inside mark [Alt]   +  [9] (only in folded mode)

compile:

##  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 like this:
        $ wget https://chiselapp.com/user/sergey6661313/repository/ScalpiEditor/tarball/ebacfc95af/ScalpiEditor-ebacfc95af.tar.gz

    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

###  Compile:
    use zig version 0.11 from https://ziglang.org/download/
        $ zig build

    and find binary in "zig-out/bin"...

#### you may rename and copy binary to "~/bin/se" like this:
    cp ./zig-out/bin/ScalpiEditor ~/bin/se

#### and add this lines to config (".bashrc" file for bash) for easy use:
    export EDITOR="~/bin/se"
    export PATH="~/bin:$PATH"

FAQ:

* 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.
    i use Zutty terminal. Its ugly, but fast.

* 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.

* display only ansi symbols.
    yes. Emoji have been added to UTF8 and now not every terminal supports them. And those who support it do not have full support.
    Monofonts also use variable length for emoji.
    If these problems are solved, I will think about UTF8 support.

* partialy undo (only for current line)
    the editor doesn't have to keep the whole history, it's a job for csv. like fossil.
    do not make many changes to the code at once. It's unhealthy.

* how to open and close multiple files?
    Just use terminal multiplexer.

* Mouse not work
    Grab mouse - bad idea. I use scroling for view terminal history.

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