Skip to content

antonijn/werk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                     _ 
  __      _____ _ __| | __
  \ \ /\ / / _ \ '__| |/ /
   \ V  V /  __/ |  |   < 
    \_/\_/ \___|_|  |_|\_\
                        

Werk is a minimalistic (but not bare-bones) text editor. The core
concepts can be found in the file CONCEPT, this file simply serves as a
progress report for the time being, as well as a basic user guide.

   ___      _ _    _ _
  | _ )_  _(_) |__| (_)_ _  __ _
  | _ \ || | | / _` | | ' \/ _` |
  |___/\_,_|_|_\__,_|_|_||_\__, |
                           |___/

  $ make

To run:

  $ ./werk FILE...

  __      ___         _                    _       ___
  \ \    / / |_  __ _| |_  __ __ _____ _ _| |__ __|__ \
   \ \/\/ /| ' \/ _` |  _| \ V  V / _ \ '_| / /(_-< /_/
    \_/\_/ |_||_\__,_|\__|  \_/\_/\___/_| |_\_\/__/(_)

  ~ Text editing (src/edit.c)
    ✔ Inserting (enter insert at selection start [a], finish [i])
    ✔ Deleting [d]
    ✔ Customizable tab behaviour {text.indentation}
    ✔ Customizable default newline {text.default-newline = unix/dos}
    ✔ Automatic newline detection
    ✔ Undo/redo
      ✘ Cycle through different redos
    ✘ Recognize indentation on newline
    ✘ Insert matching bracket
    ✘ Copy/paste

  ~ Navigation (src/edit.c)
    ✔ General selection mode (Ctrl-[)
    ✔ Select line above [k], below [j]
    ✔ Expand selection line up [K]
    ✔ Move cursor to left [h], right [l]
    ✔ Expand selection to char left [H], right [L]
    ✘ Language-dependent mode behaviour
    ✘ Parameter selection mode
    ✘ Block selection mode
    ✘ Paragraph selection mode
    ✘ Token selection mode
    ✘ Word selection mode
    ✘ Char selection mode

  ~ Editor (src/edit.c, src/gtk.c, src/ncurses.c)
    ✔ Multiple buffers (switch using [.], [/])
    ✔ Saving (Ctrl-S)
    ✔ Line numbers {editor.line-numbers = true/false}
    ✔ Customizable tab-width {editor.tab-width}
    ✔ Show invisible characters
        {editor.show-invisibles = all/none/tabs,spaces,newlines}
    ✔ Color schemes {editor.colors.*}
    ✔ Customizable GTK font {gui.font}
    ✔ Scroll bar
    ✔ Language detection
    ✘ Syntax highlighting
    ✘ Buffer overview
    ✘ NCurses UI

  ~ Selection piping (src/edit.c, src/gap.c)
    ✔ Basic selection piping (Ctrl-D)
    ✔ Setting SRC_LANG to appropriate programming language string
    ✘ Command error reporting
    ✘ Custom shells (everything uses /bin/sh)
    ✘ Custom PATH (useful for adding text-tools, for instance)
    ✘ Setting SRC_INDENT to appropriate indentation string
    ✘ Bash tab completion

  ~ Configuration (src/configfile.c, src/config.c, src/sparsef.c)
    ✔ Sane default configuration (src/config.c)
    ✔ User-specific configuration ($HOME/.config/werk/user.conf)
    ✔ Comments
    ✔ Option categories
    ✔ String options
    ✔ Boolean options
    ✔ Flag options (e.g. `editor.show-invisibles = tabs, spaces')
    ✔ Color options
      ✔ RGB
      ✔ HSV
    ✔ System-wide configuration (/etc/werk/system.conf)
    ✘ @version directive
    ✘ @inherit directive


Example of a configuration file:

  [gui]
  font = Misc Fixed Semicondensed 10

  [text]
  # default is `indentation = tabs'
  indentation = 4 spaces

  [editor]
  line-numbers = false
  show-invisibles = tabs, spaces

  # the following are simply the defaults for insert mode
  # editor.colors.insert is also available
  [editor.colors.select]
  background = hsv(184, 18, 100)
  foreground = hsv(184, 18, 29)
  invisibles = hsv(184, 18, 60)
  selection = hsv(184, 9, 100)
  line-numbers.background = hsv(184, 18, 90)
  # the following would be equivalent to the above line:
  #
  #   [editor.colors.insert.line-numbers]
  #   background = hsv(184, 18, 90)
  #

About

The werk text editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages