LightTable Api Documentation

Version: 0.8.1

lt.objs.editor

Provide fns and behaviors for interfacing with a CodeMirror editor
object. Also manage defining and loading CodeMirror. For more about CodeMirror
objects see http://codemirror.org/doc/manual.html#CodeMirror

+line-class

(+line-class e lh plane class)
TODO: Add docstring

->cm-ed

(->cm-ed e)
Return editor's CodeMirror object

->cursor

(->cursor e & [side])
Same as cursor but returned as cljs map

->elem

(->elem e)
Return DOM element of editor's CodeMirror object

->generation

(->generation e)
TODO: Add docstring

->mode

(->mode e)
TODO: Add docstring

->token

(->token e pos)
TODO: Add docstring

->token-type

(->token-type e pos)
TODO: Add docstring

->val

(->val e)
Return editor's CodeMirror object buffer contents

-line-class

(-line-class e lh plane class)
TODO: Add docstring

add-gutter

(add-gutter e class-name width)
TODO: Add docstring

adjust-loc

(adjust-loc loc dir)(adjust-loc loc dir axis)
TODO: Add docstring

block-comment

(block-comment e from to opts)
TODO: Add docstring

blur

(blur e)
TODO: Add docstring

bookmark

(bookmark e from widg)
TODO: Add docstring

center-cursor

(center-cursor ed)
TODO: Add docstring

char-coords

(char-coords e pos)
TODO: Add docstring

clear-history

(clear-history e)
TODO: Add docstring

copy

(copy e)
TODO: Add docstring

cursor

(cursor e)(cursor e side)
Return cursor of editor's CodeMirror object as js object.
Example: #js {:line 144, :ch 9}

cut

(cut e)
TODO: Add docstring

dirty?

(dirty? e gen)
TODO: Add docstring

extension

(extension name func)
TODO: Add docstring

find-marks

(find-marks e pos)
TODO: Add docstring

first-line

(first-line e)
TODO: Add docstring

focus

(focus e)
TODO: Add docstring

fold-code

(fold-code e)(fold-code e loc)
TODO: Add docstring

get-char

(get-char ed dir)
TODO: Add docstring

get-doc

(get-doc e)
TODO: Add docstring

get-history

(get-history e)
TODO: Add docstring

indent-line

(indent-line e l dir)
TODO: Add docstring

indent-lines

(indent-lines e from to dir)
TODO: Add docstring

indent-selection

(indent-selection e dir)
TODO: Add docstring

inner-mode

(inner-mode e)(inner-mode e state)
TODO: Add docstring

input-field

(input-field e)
TODO: Add docstring

insert-at-cursor

(insert-at-cursor ed s)
TODO: Add docstring

last-line

(last-line e)
TODO: Add docstring

lh->line

(lh->line e lh)
TODO: Add docstring

line

(line e l)
TODO: Add docstring

line-comment

(line-comment e from to opts)
TODO: Add docstring

line-count

(line-count e)
TODO: Add docstring

line-handle

(line-handle e l)
TODO: Add docstring

line-length

(line-length e l)
TODO: Add docstring

line-widget

(line-widget e line elem & [opts])
TODO: Add docstring

mark

(mark e from to opts)
TODO: Add docstring

mode-blacklist

Modes to not load on startup

move-cursor

(move-cursor ed pos)
TODO: Add docstring

off

(off ed ev func)
Remove event handler on editor's CodeMirror object

on

(on ed ev func)
Register event handler on editor's CodeMirror object

on-change

(on-change e func)
TODO: Add docstring

on-click

(on-click e func)
TODO: Add docstring

on-move

(on-move e func)
TODO: Add docstring

on-scroll

(on-scroll e func)
TODO: Add docstring

on-update

(on-update e func)
TODO: Add docstring

operation

(operation e func)
TODO: Add docstring

option

(option e o)
Return value for option name on editor's CodeMirror object

paste

(paste e)
TODO: Add docstring

pos->index

(pos->index e pos)
TODO: Add docstring

range

(range e from to)
TODO: Add docstring

redo

(redo e)
TODO: Add docstring

refresh

(refresh e)
TODO: Add docstring

remove-gutter

(remove-gutter e class-name)
TODO: Add docstring

remove-line-widget

(remove-line-widget e widg)
TODO: Add docstring

replace

(replace e from v)(replace e from to v)
TODO: Add docstring

replace-selection

(replace-selection e neue & [after])
TODO: Add docstring

scroll-to

(scroll-to ed x y)
TODO: Add docstring

select-all

(select-all e)
TODO: Add docstring

selection

(selection e)
TODO: Add docstring

selection-bounds

(selection-bounds e)
TODO: Add docstring

selection?

(selection? e)
TODO: Add docstring

set-doc!

(set-doc! e doc)
TODO: Add docstring

set-extending

(set-extending e ext?)
TODO: Add docstring

set-history

(set-history e v)
TODO: Add docstring

set-line

(set-line e l text)
TODO: Add docstring

set-mode

(set-mode e m)
TODO: Add docstring

set-options

(set-options e m)
Given a map of options, set each pair as an option on editor's
CodeMirror object

set-selection

(set-selection e start end)
TODO: Add docstring

set-val

(set-val e v)
Set content value of editor's CodeMirror object. Cursor position is lost

set-val-and-keep-cursor

(set-val-and-keep-cursor e v)
Same as set-val but current cursor position is kept

show-hints

(show-hints e hint-fn options)
TODO: Add docstring

toggle-comment

(toggle-comment e from to opts)
Toggle comment and if multiline toggle apply block comment

uncomment

(uncomment e from to opts)
TODO: Add docstring

undo

(undo e)
TODO: Add docstring