ScalpiEditor

All Top-level Files
Login

Files in the top-level directory in any 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.
- maintain hygiene.
- check my other projects https://chiselapp.com/user/sergey6661313

about:

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

##   killer features: no. its just editor.

##   videos (not tutorials):
    https://www.youtube.com/watch?v=8sJJOQeyOTE
    https://www.youtube.com/watch?v=8qQlMbE8Zmw
    https://www.youtube.com/watch?v=51ao2416ioE&t=60s

Usage:

$ ScalpiEditor FILENAME

example:
    $ ScalpiEditor "README.txt"

##  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:
            vertical:              [Alt]   +  [q]
            horizontal:            [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]   +  [n]
        move block outside mark [Alt]   +  [o] (only in folded mode)
        move block inside mark  [Alt]   +  [9] (only in folded mode)
        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]

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

###  Compile:
    latest release tested with zig ver 0.12.0-dev.2540+776cd673f downloaded from https://ziglang.org/download/
    (i dont know how to download exactly of dev version sorry)
    and with command
        $ zig build

    found binary in "zig-out/bin" and use as you wish ^_^

    #### 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:

* 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.
    i use "sakura" terminal.
    this not work many ansi sequences but there are convenient tabs that hardly lag.
    (sad my windows manager can not create tabs or group of windows.)
    previously i try terminals: zutty, kitty, alacritty, Terminology - good (not perfect) work.

* 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