MCPcopy
hub / github.com/marimo-team/marimo / map

Function map

frontend/src/core/codemirror/keymaps/vim.ts:221–240  ·  view source on GitHub ↗
(command: VimCommand)

Source from the content-addressed store, hash-verified

219 // It is an important behavior that we want to use.
220
221 function map(command: VimCommand) {
222 if (!command.args) {
223 Logger.warn(
224 `Could not execute vimrc command "${command.name}: expected arguments"`,
225 );
226 return;
227 }
228 if (!command.args.lhs || !command.args.rhs) {
229 Logger.warn(
230 `Could not execute vimrc command "${command.name}: expected arguments"`,
231 );
232 return;
233 }
234 if (command.mode) {
235 Vim.map(command.args.lhs, command.args.rhs, command.mode);
236 } else {
237 //@ts-expect-error We can use this without providing context (mode)
238 Vim.map(command.args.lhs, command.args.rhs);
239 }
240 }
241
242 function noremap(command: VimCommand) {
243 if (!command.args) {

Callers 15

applyVimCommandsFunction · 0.85
processFunction · 0.85
primitive_to_bytesFunction · 0.85
recurse_containerFunction · 0.85
fixed_dedentFunction · 0.85
get_notebook_statusFunction · 0.85
is_primitiveFunction · 0.85
recurse_containerFunction · 0.85
only_scoped_refsFunction · 0.85
_get_poetry_versionMethod · 0.85
_hashable_walkFunction · 0.85
_Function · 0.85

Calls 2

warnMethod · 0.80
mapMethod · 0.45

Tested by 4

_repr_html_Method · 0.68
_repr_html_Method · 0.68
_repr_html_Method · 0.68
test_isolation_cellsFunction · 0.68