Chamo is a source code editor, even if it can be used to edit any text file. A system of "views" allows to edit some kinds of files in specific views.

Each window can be splitted vertically or horizontally (à la emacs) or using tabs (à la gedit) in different views. Navigating from one view to another is easy with commands boundable to combinations of keys. One can also store the position and layout of the windows and the list of open files, so that, the next time Chamo is launched, everything is restored at the same position.

A "minibuffer" à la emacs with automatic completion is used to launch commands and indicate arguments for commands (when opening a file, doing some query/replace in a buffer, ...).

The text editing view uses OCaml-Stk sourceview widget and so provides the following functionalities: support of internationalisation (UTF-8), syntax highlighting (with colors, fonts, ...) depending on the language, undo/redo management, clipboard management, incremental forward/backward search, query/replace, history of pastable text ("kill-ring"), ...

A system of association of code to commands and of evaluation of commands (in a form similar to shell commands command arg1 arg2 ...) allows to add one's own functionalities. It is also possible to add and modify all key bindings, even specifically for each kind of view.

In the bytecode version of Chamo, the command eval takes in argument some OCaml code which is interpreted and allows to modify everything in the editor: adding modes, redefining commands, ..., the same way as with Lisp in Emacs. The command eval_file interprets all the OCaml code present in a file given in argument.

A quick reference of default key bindings is available here.
The windows can be splitted to display various views, à la emacs. Some commands allows to handle the splitting and, like any command, can be bound to combinations of keys: split_horizontally (C-h or C-x 2 by default), split_vertically (C-v or C-x 3 by default), destroy_active_view (C-x 0 by default).
Chamo, an emacs-like file editor based on OCaml-Stk
Another way to have various views in a window is the use of tabs, as in GEdit. The commands cycle_tab (C-Tab by default) and new_tab (C-x C-t by default) allow respectively to move from one tab to another and create a new tab.
Using tabs
Of course, one can mix the two ways to arrange views to fit one's needs. The position and layout of windows and views can be stored on demand using the command store_layout. When the editor is launched in the same directory, position and layout of windows and views are restored.
Using tabs and splits
The view "sourceview" is based on OCaml-Stk sourceview widget. It provides the syntax highlighting associated to each type of file (by now a regular expression matching the file name). Modes (like in emacs) can be defined to provides commands, key bindings, menus and indentations adapted to each type of file. A file can be open by various "sourceviews" at the same time. Basic commands are available in this view: incremental forward/backward search, query/replace, transposing lines or characters, copy/paste, "kill-ring" à la emacs, ...
Sourceviews in action
A minibuffer like the one in emacs is used for commands arguments (opening files, changing buffer, search, ...) and provides automatic completion.
Minibuffers with completion

Various files are used to configure key bindings. Here is the default configuration file for all windows of Chamo. The key bindings of the active view are also configurable and are added to the common key bindings of windows.

File ~/.config/chamo/chamo.gui:

{
  "window_key_bindings": "Common key bindings for windows",
  "window_key_bindings": [
    ([ "C-x", "C-c" ], "close_active_window"),
    ([ "C-n" ], "new_window"),
    ([ "C-x", "C-s" ], "save_active_view"),
    ([ "C-x", "C-w" ], "save_active_view_as"),
    ([ "C-x", "C-f" ], "open_file"),
    ([ "C-b" ], "cycle_view"),
    ([ "C-Tab" ], "cycle_tab"),
    ([ "SC-Tab" ], "rev_cycle_tab"),
    ([ "C-x", "C-t" ], "new_tab"),
    ([ "C-v" ], "split_vertically"),
    ([ "C-x", "S-3" ], "split_vertically"),
    ([ "C-h" ], "split_horizontally"),
    ([ "C-x", "S-2" ], "split_horizontally"),
    ([ "C-x", "S-0" ], "destroy_active_view"),
    ([ "C-x", "C-x", "l" ], "print_key_bindings"),
    ([ "C-x", "v" ], "popup_pick_hidden_view"),
    ([ "C-x", "l" ], "pop_last_hidden_view"),
    ([ "C-y" ], "paste"),
    ([ "C-c" ], "copy"),
    ([ "C-w" ], "cut"),
    ([ "A-x" ], "prompt_command")
  ],
  "minibuffer_history_size": "The size of histories in minibuffer",
  "minibuffer_history_size": 50,
  "log": {
    "level": "log level",
    "level": "info",
    "length": "number of characters kept in log",
    "length": 200000,
    "font": "font for messages",
    "font": "fixed 10",
    "colors": {
      "warning": "color for warning messages",
      "warning": "orange",
      "info": "color for info messages",
      "info": "lightgreen",
      "error": "color for error messages",
      "error": "red",
      "debug": "color for debug messages",
      "debug": "yellow",
      "app": "color for app messages",
      "app": "white"
    }
  },
  "abort_binding": "The key combination to use to reset the key stroke state",
  "abort_binding": "C-g"
}