MCPcopy Index your code

hub / github.com/MovingtoMars/liner / functions

Functions336 in github.com/MovingtoMars/liner

↓ 161 callersMethodinsert_str_after_cursor
Inserts a string directly after the cursor, moving the cursor to the right. Note: it is more efficient to call `insert_chars_after_cursor()` directly
src/editor.rs:412
↓ 55 callersMethodcursor
(&self)
src/editor.rs:160
↓ 42 callersMethodlen
Number of items in history.
src/history.rs:91
↓ 25 callersMethoddisplay
Deletes the displayed prompt and buffer, replacing them with the current prompt and buffer
src/editor.rs:746
↓ 22 callersMethodinsert
(&mut self, start: usize, text: &[char])
src/buffer.rs:211
↓ 21 callersMethodpush
Add a command to the history buffer and remove the oldest commands when the max history size has been met. If writing to the disk is enabled, this fun
src/history.rs:98
↓ 20 callersMethodnum_chars
(&self)
src/buffer.rs:178
↓ 20 callersMethodpush
Push the given mode on to the stack.
src/keymap/vi.rs:58
↓ 19 callersMethodmove_cursor_to_start_of_line
Moves the cursor to the start of the line.
src/editor.rs:538
↓ 19 callersMethodremove
Returns the number of characters removed.
src/buffer.rs:200
↓ 18 callersMethodmove_cursor_to
Moves the cursor to `pos`. If `pos` is past the end of the buffer, it will be clamped.
src/editor.rs:528
↓ 16 callersFunctionmove_word
(ed: &mut Editor<W>, count: usize)
src/keymap/vi.rs:128
↓ 15 callersMethodpop_mode_after_movement
(&mut self, move_type: MoveType)
src/keymap/vi.rs:361
↓ 14 callersMethodcurrent_buffer_mut
Returns a mutable reference to the current buffer being edited. This may be the new buffer or a buffer from history.
src/editor.rs:566
↓ 14 callersMethodmove_cursor_to_end_of_line
Moves the cursor to the end of the line.
src/editor.rs:544
↓ 14 callersFunctionmove_word_ws
(ed: &mut Editor<W>, count: usize)
src/keymap/vi.rs:132
↓ 14 callersMethodset_mode
(&mut self, mode: Mode)
src/keymap/vi.rs:340
↓ 13 callersMethodclear
Empty the stack and return to normal mode.
src/keymap/vi.rs:53
↓ 13 callersMethodmove_count
When doing a move, 0 should behave the same as 1 as far as the count goes.
src/keymap/vi.rs:430
↓ 13 callersMethodstart_undo_group
(&mut self)
src/buffer.rs:98
↓ 12 callersMethodcurrent_buffer
Returns a reference to the current buffer being edited. This may be the new buffer or a buffer from history.
src/editor.rs:560
↓ 12 callersMethodend_undo_group
(&mut self)
src/buffer.rs:102
↓ 11 callersMethodchars
(&self)
src/buffer.rs:246
↓ 10 callersMethodeditor_mut
(&mut self)
src/keymap/mod.rs:88
↓ 9 callersMethodinsert_after_cursor
Inserts a character directly after the cursor, moving the cursor to the right.
src/editor.rs:417
↓ 9 callersFunctionmove_to_end_of_word
(ed: &mut Editor<W>, count: usize)
src/keymap/vi.rs:195
↓ 9 callersFunctionmove_to_end_of_word_ws
(ed: &mut Editor<W>, count: usize)
src/keymap/vi.rs:199
↓ 9 callersMethodtruncate
(&mut self, num: usize)
src/buffer.rs:250
↓ 8 callersMethodhandle_key
(&mut self, mut key: Key, handler: &mut EventHandler<W>)
src/keymap/mod.rs:11
↓ 8 callersMethodmove_cursor_left
Moves the cursor to the left by `count` characters. The cursor will not go past the start of the buffer.
src/editor.rs:501
↓ 8 callersFunctionmove_word_back
(ed: &mut Editor<W>, count: usize)
src/keymap/vi.rs:203
↓ 7 callersMethoddelete_until
Deletes every character from the cursor until the given position.
src/editor.rs:474
↓ 7 callersMethodmove_cursor_right
Moves the cursor to the right by `count` characters. The cursor will not go past the end of the buffer.
src/editor.rs:513
↓ 7 callersFunctionmove_word_ws_back
(ed: &mut Editor<W>, count: usize)
src/keymap/vi.rs:207
↓ 7 callersMethodpop
(&mut self)
src/keymap/vi.rs:62
↓ 7 callersMethodstarts_with
Check if the other buffer starts with the same content as this one. Used to implement autosuggestions.
src/buffer.rs:294
↓ 7 callersMethodundo
(&self, buf: &mut Buffer)
src/buffer.rs:26
↓ 6 callersMethoddelete_after_cursor
Deletes the character directly after the cursor. The cursor does not move. If the cursor is at the end of the line, nothing happens.
src/editor.rs:446
↓ 6 callersMethodis_empty
Return true if the buffer is empty.
src/buffer.rs:311
↓ 6 callersFunctionis_vi_keyword
All alphanumeric characters and _ are considered valid for keywords in vi by default.
src/keymap/vi.rs:124
↓ 6 callersMethodmode
Get the current mode. If the stack is empty, we are in normal mode.
src/keymap/vi.rs:46
↓ 6 callersMethodmove_count_right
Get the current count or the number of remaining chars in the buffer.
src/keymap/vi.rs:443
↓ 5 callersMethodcontext
(&mut self)
src/editor.rs:156
↓ 5 callersMethodcurrent_autosuggestion
(&self)
src/editor.rs:584
↓ 5 callersMethoddelete_all_after_cursor
Deletes every character after the cursor until the end of the line.
src/editor.rs:465
↓ 5 callersMethodlines
(&self)
src/buffer.rs:242
↓ 5 callersMethodmove_down
Move down (forwards) in history, or to the new buffer if we reach the end of history.
src/editor.rs:375
↓ 5 callersMethodmove_up
Move up (backwards) in history.
src/editor.rs:356
↓ 4 callersMethodas_bytes
(&self)
src/buffer.rs:264
↓ 4 callersMethodchar_after
(&self, cursor: usize)
src/buffer.rs:195
↓ 4 callersMethodcommit_history
It's important to execute this function before exiting your program, as it will ensure that all history data has been written to the disk.
src/history.rs:47
↓ 4 callersMethoddelete_word_before_cursor
Deletes the word preceding the cursor. If `ignore_space_before_cursor` is true and there is space directly before the cursor, this method ignores that
src/editor.rs:337
↓ 4 callersMethodeditor
(&self)
src/keymap/mod.rs:92
↓ 4 callersMethodfile_name
Get the history file name.
src/history.rs:137
↓ 4 callersMethodflush
(&mut self)
src/editor.rs:180
↓ 4 callersMethodget
(cursor: usize, words: &[(usize, usize)])
src/editor.rs:30
↓ 4 callersMethodhandle_key_common
(&mut self, key: Key)
src/keymap/vi.rs:471
↓ 4 callersMethodhandle_key_core
(&mut self, key: Key)
src/keymap/vi.rs:999
↓ 4 callersMethodnormal_mode_abort
Return to normal mode.
src/keymap/vi.rs:423
↓ 4 callersMethodpop_mode
(&mut self)
src/keymap/vi.rs:406
↓ 4 callersFunctionvi_move_word
(ed: &mut Editor<W>, move_mode: ViMoveMode, direction: ViMoveDir, count: usize)
src/keymap/vi.rs:144
↓ 4 callersFunctionvi_move_word_end
(ed: &mut Editor<W>, move_mode: ViMoveMode, direction: ViMoveDir, count: usize)
src/keymap/vi.rs:211
↓ 4 callersMethodwidth
(&self)
src/buffer.rs:234
↓ 3 callersMethodclear
Clears the screen then prints the prompt and current buffer.
src/editor.rs:349
↓ 3 callersMethoddo_on
(&self, buf: &mut Buffer)
src/buffer.rs:16
↓ 3 callersMethodget_words_and_cursor_position
(&self)
src/editor.rs:145
↓ 3 callersMethodgo_back
(&self, cursor: &mut usize, max: usize)
src/keymap/vi.rs:99
↓ 3 callersMethodhandle_key_move_to_char
(&mut self, key: Key, movement: CharMovement)
src/keymap/vi.rs:896
↓ 3 callersMethodhandle_key_normal
(&mut self, key: Key)
src/keymap/vi.rs:558
↓ 3 callersMethodhandle_newline
XXX: Returning a bool to indicate doneness is a bit awkward, maybe change it
src/editor.rs:165
↓ 3 callersMethodinsert_chars_after_cursor
Inserts characters directly after the cursor, moving the cursor to the right.
src/editor.rs:422
↓ 3 callersMethodinto_iter
(self)
src/history.rs:190
↓ 3 callersMethodis_currently_showing_autosuggestion
(&self)
src/editor.rs:594
↓ 3 callersMethodmove_cursor
(&self, cursor: &mut usize, max: usize, dir: ViMoveDir)
src/keymap/vi.rs:106
↓ 3 callersMethodrange_width
(&self, start: usize, end: usize)
src/buffer.rs:238
↓ 3 callersMethodremove_raw
(&mut self, start: usize, end: usize)
src/buffer.rs:282
↓ 3 callersMethodset_file_name
Set history file name. At the same time enable history.
src/history.rs:145
↓ 2 callersMethod_display
(&mut self, show_autosuggest: bool)
src/editor.rs:598
↓ 2 callersMethodaccept_autosuggestion
Accept autosuggestion and copy its content into current buffer
src/editor.rs:571
↓ 2 callersMethodadvance
(&self, cursor: &mut usize, max: usize)
src/keymap/vi.rs:95
↓ 2 callersMethoddelete_before_cursor
Deletes the character directly before the cursor, moving the cursor to the left. If the cursor is at the start of the line, nothing happens.
src/editor.rs:434
↓ 2 callersMethoddelete_until_inclusive
Deletes every character from the cursor until the given position, inclusive.
src/editor.rs:487
↓ 2 callersMethodeditor_mut
(&mut self)
src/keymap/emacs.rs:120
↓ 2 callersFunctionemacs_move_word
(ed: &mut Editor<W>, direction: EmacsMoveDir)
src/keymap/emacs.rs:141
↓ 2 callersFunctionfind_char
(buf: &::buffer::Buffer, start: usize, ch: char, count: usize)
src/keymap/vi.rs:269
↓ 2 callersFunctionfind_char_rev
(buf: &::buffer::Buffer, start: usize, ch: char, count: usize)
src/keymap/vi.rs:280
↓ 2 callersMethodget_word_before_cursor
(&self, ignore_space_before_cursor: bool)
src/editor.rs:313
↓ 2 callersMethodinsert_raw
(&mut self, start: usize, text: &[char])
src/buffer.rs:286
↓ 2 callersMethodlast_arg
(&self)
src/buffer.rs:174
↓ 2 callersMethodload_history
Load history from given file name
src/history.rs:160
↓ 2 callersMethodpush_action
(&mut self, act: Action)
src/buffer.rs:169
↓ 2 callersMethodrange
(&self, start: usize, end: usize)
src/buffer.rs:226
↓ 2 callersMethodrevert
(&mut self)
src/buffer.rs:160
↓ 2 callersMethodset_mode_preserve_last
(&mut self, mode: Mode)
src/keymap/vi.rs:349
↓ 2 callersFunctionwrite_to_disk
Perform write operation. If the history file does not exist, it will be created. This function is not part of the public interface. XXX: include more
src/history.rs:212
↓ 1 callersFunctionassert_buffer_actions
(start: &str, expected: &str, actions: &[Action])
src/test.rs:39
↓ 1 callersFunctionassert_cursor_pos
(s: &str, cursor: usize, expected_pos: CursorPosition)
src/test.rs:8
↓ 1 callersMethodbuffers_ref
(&self)
src/history.rs:181
↓ 1 callersMethodchar_before
(&self, cursor: usize)
src/buffer.rs:187
↓ 1 callersMethodcomplete
(&mut self, handler: &mut EventHandler<W>)
src/editor.rs:252
next →1–100 of 336, ranked by callers