Liking cljdoc? Tell your friends :D

dk.salza.liq.buffer

A buffer could be considered a slider (see slider) with some extra attributes, besides attributes to keep track of name, filename, dirtyness, undo information it consists of

  • A slider
  • A highlighter function
  • A keymap

The slider is used to keep track of the text, the highlighter function is used by the view to apply highlight and the keymap is used to decide which function a keypress should be mapped to.

On runtime the highlighter function and the keymap can be replaced.

The buffer structure is immutable, so every operation that changes the buffer will return a new one.

A buffer could be considered a slider (see slider) with
some extra attributes, besides attributes to keep track
of name, filename, dirtyness, undo information it consists
of

  * A slider
  * A highlighter function
  * A keymap

The slider is used to keep track of the text, the highlighter
function is used by the view to apply highlight and the
keymap is used to decide which function a keypress should
be mapped to.

On runtime the highlighter function and the keymap can be
replaced.

The buffer structure is immutable, so every operation that
changes the buffer will return a new one.
raw docstring

apply-to-sliderclj

(apply-to-slider buffer fun)

Apply function to the slider in the buffer. It should take a slider as input and produce a slider as output.

Apply function to the slider in the buffer.
It should take a slider as input and produce a slider
as output.
sourceraw docstring

backward-charclj

(backward-char buffer amount)

Returns a new buffer where the cursor has been moved amount steps backward.

Returns a new buffer where the cursor has been
moved amount steps backward.
sourceraw docstring

backward-visual-lineclj

(backward-visual-line buffer columns)

Returns a buffer where the cursor has been moved backward one visual (soft) line, taking wrap at given columns into account.

Returns a buffer where the cursor has been moved
backward one visual (soft) line, taking wrap at given
columns into account.
sourceraw docstring

backward-wordclj

(backward-word buffer)

Returns a new buffer with the cursor moved backward to the beginning of the previous word.

Returns a new buffer with the cursor moved backward
to the beginning of the previous word.
sourceraw docstring

beginning-of-bufferclj

(beginning-of-buffer buffer)

Returns a new buffer where the cursor is moved to the beginning of the buffer.

Returns a new buffer where the cursor is
moved to the beginning of the buffer.
sourceraw docstring

beginning-of-lineclj

(beginning-of-line buffer)

Returns a new buffer where the cursor has been moved to the beginning of the line.

Returns a new buffer where the cursor has been
moved to the beginning of the line.
sourceraw docstring

changed-on-disk?clj

(changed-on-disk? buffer)
sourceraw docstring

clearclj

(clear buffer)

Returns a new buffer where all the content has been deleted.

Returns a new buffer where all the content has
been deleted.
sourceraw docstring

createclj

(create name)

Creates an empty buffer with the given name.

Creates an empty buffer with the given
name.
sourceraw docstring

create-from-fileclj

(create-from-file path)

Creates a buffer and loads the content of a given file. The filename is stored also, to be used for save functionality.

Creates a buffer and loads the content of a given file.
The filename is stored also, to be used for save
functionality.
sourceraw docstring

create-slider-from-fileclj

(create-slider-from-file path)
source

deleteclj

(delete buffer amount)

Returns a new buffer with the given amount of characters deleted behind the cursor.

Returns a new buffer with the given amount of
characters deleted behind the cursor.
sourceraw docstring

delete-charclj

(delete-char buffer)

Returns a new buffer where the character after the curser is removed.

Returns a new buffer where the character after
the curser is removed.
sourceraw docstring

delete-lineclj

(delete-line buffer)

Returns a buffer where the current lines is deleted and the cursor is moved to the next line.

Returns a buffer where the current lines is deleted
and the cursor is moved to the next line.
sourceraw docstring

delete-selectionclj

(delete-selection buffer)

Returns a buffer where the selected content is deleted.

Returns a buffer where the selected content
is deleted.
sourceraw docstring

end-of-bufferclj

(end-of-buffer buffer)

Returns a new buffer where the cursor is moved to the end of the buffer.

Returns a new buffer where the cursor is
moved to the end of the buffer.
sourceraw docstring

end-of-buffer?clj

(end-of-buffer? buffer)

Return true if the cursor is at the end of the buffer.

Return true if the cursor is at the
end of the buffer.
sourceraw docstring

end-of-lineclj

(end-of-line buffer)

Returns a new buffer where the cursor has been moved to the end of the line.

Returns a new buffer where the cursor has been
moved to the end of the line.
sourceraw docstring

end-of-wordclj

(end-of-word buffer)

Returns a new buffer with the cursor moved to the end of the current word.

Returns a new buffer with the cursor moved
to the end of the current word.
sourceraw docstring

find-nextclj

(find-next buffer search)

Returns a new buffer where the cursor is moved to the next occurrence of the search frase.

Returns a new buffer where the cursor is moved
to the next occurrence of the search frase.
sourceraw docstring

force-reopen-fileclj

(force-reopen-file buffer)

Reopening file in buffer, ignore dirty flag.

Reopening file in buffer,
ignore dirty flag.
sourceraw docstring

forward-charclj

(forward-char buffer amount)

Returns a new buffer where the cursor has been moved amount steps forward.

Returns a new buffer where the cursor has been
moved amount steps forward.
sourceraw docstring

forward-visual-lineclj

(forward-visual-line buffer columns)

Returns a buffer where the cursor has been moved forward one visual (soft) line, taking wrap at given columns into account.

Returns a buffer where the cursor has been moved
forward one visual (soft) line, taking wrap at given
columns into account.
sourceraw docstring

forward-wordclj

(forward-word buffer)

Returns a new buffer with the cursor moved past next whitespace.

Returns a new buffer with the cursor moved past
next whitespace.
sourceraw docstring

get-actionclj

(get-action buffer keyw)

If the keymap has an action (function) for the given keyword, it will be returned.

If the keymap has an action (function)
for the given keyword, it will be returned.
sourceraw docstring

get-charclj

(get-char buffer)

Returns the current char at point as a string.

Returns the current char at point as a string.
sourceraw docstring

get-contentclj

(get-content buffer)

Returns the content (text) of the buffer as a string.

Returns the content (text) of the buffer
as a string.
sourceraw docstring

get-contextclj

(get-context buffer)

Returns a context map like {:type :file :value /tmp/tmp.txt} with a type and a value generated by analysing the context of the cursor.

Returns a context map like
{:type :file :value /tmp/tmp.txt}
with a type and a value generated by analysing
the context of the cursor.
sourceraw docstring

get-dirtyclj

(get-dirty buffer)

Returns the dirty state of the buffer.

Returns the dirty state of the buffer.
sourceraw docstring

get-filenameclj

(get-filename buffer)

Returns the filename associated with the buffer.

Returns the filename associated with the buffer.
sourceraw docstring

get-highlighterclj

(get-highlighter buffer)

Returns the highlighter function associated with the buffer.

Returns the highlighter function associated
with the buffer.
sourceraw docstring

get-keymapclj

(get-keymap buffer)

Returns the keymap associated with the buffer.

Returns the keymap associated with the buffer.
sourceraw docstring

get-lineclj

(get-line buffer)

Returns the current line as a string.

Returns the current line as a string.
sourceraw docstring

get-linenumberclj

(get-linenumber buffer)

Returns the line number at the cursor position.

Returns the line number at the cursor position.
sourceraw docstring

get-markclj

(get-mark buffer name)

Returns the position af the given mark.

Returns the position af the given mark.
sourceraw docstring

get-nameclj

(get-name buffer)

Returns the name associated with the buffer.

Returns the name associated with the buffer.
sourceraw docstring

get-pointclj

(get-point buffer)

Returns the point (cursor position) as a number.

Returns the point (cursor position) as a number.
sourceraw docstring

get-regionclj

(get-region buffer name)

Returns the region between the cursor and the named mark, as a string.

Returns the region between the cursor and the
named mark, as a string.
sourceraw docstring

get-selectionclj

(get-selection buffer)

Returns the selection region as a string.

Returns the selection region as a string.
sourceraw docstring

get-sliderclj

(get-slider buffer)

Returns the slider in the buffer datastructure. The slider is responsible for storing and manipulating the text in the buffer.

Returns the slider in the buffer datastructure.
The slider is responsible for storing and manipulating
the text in the buffer.
sourceraw docstring

get-visible-contentclj

(get-visible-content buffer)

Not in use yet, since there is no functionality for hiding lines, yet.

Not in use yet, since there is no functionality
for hiding lines, yet.
sourceraw docstring

highlight-sexp-at-pointclj

(highlight-sexp-at-point buffer)

Returns a buffer where the highlight marks have been set matching the current s-expression. It spans same text as select-sexp-at-point.

Returns a buffer where the highlight marks
have been set matching the current s-expression.
It spans same text as select-sexp-at-point.
sourceraw docstring

insertclj

(insert buffer string)

Returns a new buffer with the given string inserted a the cursor position.

Returns a new buffer with the given string
inserted a the cursor position.
sourceraw docstring

insert-lineclj

(insert-line buffer)

Returns a new buffer where a new line has been inserted below the current line, and the cursor has been moved to that line.

Returns a new buffer where a new line has been
inserted below the current line, and the cursor
has been moved to that line.
sourceraw docstring

point-to-markclj

(point-to-mark buffer name)

Returns a new buffer where the cursor has been moved to the given mark.

Returns a new buffer where the cursor has been
moved to the given mark.
sourceraw docstring

remove-markclj

(remove-mark buffer name)

Returns a new buffer with the named mark removed.

Returns a new buffer with the named mark removed.
sourceraw docstring

reopen-fileclj

(reopen-file buffer)

Reopen file in buffer, if the file is not dirty.

Reopen file in buffer,
if the file is not dirty.
sourceraw docstring

save-bufferclj

(save-buffer buffer)

If there is a filename connected with the buffer, the content of the buffer will be saved to that file.

If there is a filename connected with the buffer,
the content of the buffer will be saved to that file.
sourceraw docstring

select-sexp-at-pointclj

(select-sexp-at-point buffer)

Returns a buffer where the s-expression at the point (cursor) has been selected. The cursor is moved backwards until the first startparenthesis where selection starts, and then forward until the selection has balanced parenthesis.

Returns a buffer where the s-expression at the point (cursor)
has been selected.
The cursor is moved backwards until the first
startparenthesis where selection starts, and then
forward until the selection has balanced parenthesis.
sourceraw docstring

set-dirtyclj

(set-dirty buffer)
(set-dirty buffer dirty)

Sets dirty flag on the buffer. Used to mark if content has changed since last save.

Sets dirty flag on the buffer.
Used to mark if content has changed
since last save.
sourceraw docstring

set-highlighterclj

(set-highlighter buffer highlighter)

Returns a new buffer with the given highlighter set.

Returns a new buffer with the given highlighter set.
sourceraw docstring

set-keymapclj

(set-keymap buffer keymap)

Returns a new buffer with the given keymap set.

Returns a new buffer with the given
keymap set.
sourceraw docstring

set-markclj

(set-mark buffer name)

Returns a new buffer with a mark set at the cursor position.

Returns a new buffer with a mark set at the cursor position.
sourceraw docstring

set-pointclj

(set-point buffer point)

Returns a new buffer where the cursor has been moved to the given point.

Returns a new buffer where the cursor has been
moved to the given point.
sourceraw docstring

set-sliderclj

(set-slider buffer sl)
source

sexp-at-pointclj

(sexp-at-point buffer)

Returns the s-expression at the cursor position.

Returns the s-expression at the cursor position.
sourceraw docstring

tmp-bufferclj

(tmp-buffer buffer columns)
source

undoclj

(undo buffer)

Returns the first buffer in the undo stack.

Returns the first buffer in the undo stack.
sourceraw docstring

update-mem-colclj

(update-mem-col buffer columns)

The mem-col is the column position of the cursor, from the last time the cursor was moved not up and down.

When moving the cursor up and down and passing by shorter lines the column position, when reaching a longer line again, should be restored.

This allows one to keep the current column and avoid the cursor from staying at the beginning of the line when passing an empty line.

The mem-col is the column position of the cursor,
from the last time the cursor was moved not up and
down.

When moving the cursor up and down and passing by
shorter lines the column position, when reaching a
longer line again, should be restored.

This allows one to keep the current column and
avoid the cursor from staying at the beginning of
the line when passing an empty line.
sourceraw docstring

update-modifiedclj

(update-modified buffer)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close