package zed

  1. Overview
  2. Docs
type 'a t
type clipboard = {
  1. clipboard_get : unit -> Zed_rope.t;
  2. clipboard_set : Zed_rope.t -> unit;
}
val new_clipboard : unit -> clipboard
val create : ?editable:(int -> int -> bool) -> ?move:(int -> int -> int) -> ?clipboard:clipboard -> ?match_word:(Zed_rope.t -> int -> int option) -> ?locale:string option React.signal -> ?undo_size:int -> unit -> 'a t
val match_by_regexp : Zed_re.t -> Zed_rope.t -> int -> int option
val get_data : 'a t -> 'a
val set_data : 'a t -> 'a -> unit
val clear_data : 'a t -> unit
val text : 'a t -> Zed_rope.t
val lines : 'a t -> Zed_lines.t
val changes : 'a t -> (int * int * int) React.event
val update : 'a t -> Zed_cursor.t list -> unit React.event
val erase_mode : 'a t -> bool React.signal
val get_erase_mode : 'a t -> bool
val set_erase_mode : 'a t -> bool -> unit
val mark : 'a t -> Zed_cursor.t
val selection : 'a t -> bool React.signal
val get_selection : 'a t -> bool
val set_selection : 'a t -> bool -> unit
val new_cursor : 'a t -> Zed_cursor.t
exception Cannot_edit
type 'a context
val context : ?check:bool -> 'a t -> Zed_cursor.t -> 'a context
val edit : 'a context -> 'a t
val cursor : 'a context -> Zed_cursor.t
val check : 'a context -> bool
val with_check : bool -> 'a context -> 'a context
val goto : 'a context -> ?set_wanted_column:bool -> int -> unit
val move : 'a context -> ?set_wanted_column:bool -> int -> unit
val move_line : 'a context -> int -> unit
val position : 'a context -> int
val line : 'a context -> int
val column : 'a context -> int
val at_bol : 'a context -> bool
val at_eol : 'a context -> bool
val at_bot : 'a context -> bool
val at_eot : 'a context -> bool
val insert : 'a context -> Zed_rope.t -> unit
val insert_no_erase : 'a context -> Zed_rope.t -> unit
val remove_next : 'a context -> int -> unit
val remove_prev : 'a context -> int -> unit
val remove : 'a context -> int -> unit
val replace : 'a context -> int -> Zed_rope.t -> unit
val newline : 'a context -> unit
val next_char : 'a context -> unit
val prev_char : 'a context -> unit
val next_line : 'a context -> unit
val prev_line : 'a context -> unit
val goto_bol : 'a context -> unit
val goto_eol : 'a context -> unit
val goto_bot : 'a context -> unit
val goto_eot : 'a context -> unit
val delete_next_char : 'a context -> unit
val delete_prev_char : 'a context -> unit
val delete_next_line : 'a context -> unit
val delete_prev_line : 'a context -> unit
val kill_next_line : 'a context -> unit
val kill_prev_line : 'a context -> unit
val switch_erase_mode : 'a context -> unit
val set_mark : 'a context -> unit
val goto_mark : 'a context -> unit
val copy : 'a context -> unit
val kill : 'a context -> unit
val yank : 'a context -> unit
val capitalize_word : 'a context -> unit
val lowercase_word : 'a context -> unit
val uppercase_word : 'a context -> unit
val next_word : 'a context -> unit
val prev_word : 'a context -> unit
val delete_next_word : 'a context -> unit
val delete_prev_word : 'a context -> unit
val kill_next_word : 'a context -> unit
val kill_prev_word : 'a context -> unit
val undo : 'a context -> unit
type action =
  1. | Insert of CamomileLibrary.UChar.t
  2. | Newline
  3. | Next_char
  4. | Prev_char
  5. | Next_line
  6. | Prev_line
  7. | Goto_bol
  8. | Goto_eol
  9. | Goto_bot
  10. | Goto_eot
  11. | Delete_next_char
  12. | Delete_prev_char
  13. | Delete_next_line
  14. | Delete_prev_line
  15. | Kill_next_line
  16. | Kill_prev_line
  17. | Switch_erase_mode
  18. | Set_mark
  19. | Goto_mark
  20. | Copy
  21. | Kill
  22. | Yank
  23. | Capitalize_word
  24. | Lowercase_word
  25. | Uppercase_word
  26. | Next_word
  27. | Prev_word
  28. | Delete_next_word
  29. | Delete_prev_word
  30. | Kill_next_word
  31. | Kill_prev_word
  32. | Undo
val get_action : action -> 'a context -> unit
val actions : (action * string) list
val doc_of_action : action -> string
val action_of_name : string -> action
val name_of_action : action -> string
OCaml

Innovation. Community. Security.