[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/vendor/codemirror/keymap/ -> vim.js (summary)

Supported keybindings: Too many to list. Refer to defaultKeymap below.

File Size: 5738 lines (224 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 153 functions

  transformCursor()
  enterVimMode()
  leaveVimMode()
  detachVimMap()
  attachVimMap()
  cmKey()
  cmKeyToVimKey()
  getOnPasteFn()
  makeKeyRange()
  isLine()
  isLowerCase()
  isMatchableSymbol()
  isNumber()
  isUpperCase()
  isWhiteSpaceString()
  isEndOfSentenceSymbol()
  inArray()
  defineOption()
  setOption()
  getOption()
  add()
  useNextSlot()
  move()
  find()
  MacroModeState()
  maybeInitVimState()
  resetVimGlobalState()
  toCtxArray()
  handleMacroRecording()
  handleEsc()
  doKeyToKey()
  handleKeyInsertMode()
  handleKeyNonInsertMode()
  InputState()
  clearInputState()
  Register()
  defineRegister()
  RegisterController()
  HistoryController()
  handleQuery()
  onPromptClose()
  onPromptKeyUp()
  onPromptKeyDown()
  onPromptClose()
  onPromptKeyDown()
  defineMotion()
  fillArray()
  defineOperator()
  defineAction()
  clipCursorToContent()
  copyArgs()
  offsetCursor()
  commandMatches()
  commandMatch()
  lastChar()
  repeatFn()
  copyCursor()
  cursorEqual()
  cursorIsBefore()
  cursorMin()
  cursorMax()
  cursorIsBetween()
  lineLength()
  trim()
  escapeRegex()
  extendLineToColumn()
  selectBlock()
  selectForInsert()
  getIndex()
  getSelectedAreaRange()
  updateLastSelection()
  expandSelection()
  updateCmSelection()
  makeCmSelection()
  getHead()
  exitVisualMode()
  clipToLine()
  expandSelectionToLine()
  findFirstNonWhiteSpaceCharacter()
  expandWordUnderCursor()
  expandTagUnderCursor()
  recordJumpPosition()
  recordLastCharacterSearch()
  findSymbol()
  findWord()
  moveToWord()
  moveToEol()
  moveToCharacter()
  moveToColumn()
  updateMark()
  charIdxInLine()
  findParagraph()
  isEmpty()
  isBoundary()
  findSentence()
  nextChar()
  forward()
  reverse()
  selectCompanionObject()
  findBeginningAndEnd()
  SearchState()
  getSearchState()
  splitBySlash()
  findUnescapedSlashes()
  splitBySeparator()
  findUnescapedSeparators()
  translateRegex()
  translateRegexReplace()
  unescapeRegexReplace()
  parseQuery()
  dom()
  showConfirm()
  makePrompt()
  showPrompt()
  regexEqual()
  updateSearchQuery()
  searchOverlay()
  highlightSearchMatches()
  findNext()
  findNextFromAndToInclusive()
  clearSearchHighlight()
  isInRange()
  getUserVisibleLines()
  getMarkPos()
  getLastEditPos()
  parseArgs()
  compareFn()
  comparePatternFn()
  doReplace()
  replaceAll()
  replace()
  findNextValidMatch()
  next()
  stop()
  onPromptKeyDown()
  exitInsertMode()
  _mapCommand()
  mapCommand()
  executeMacroRegister()
  logKey()
  logInsertModeChange()
  logSearchQuery()
  onChange()
  onCursorActivity()
  handleExternalSelection()
  InsertModeKey()
  onKeyEventTargetKeyDown()
  onKeyFound()
  repeatLastEdit()
  repeatCommand()
  repeatInsert()
  repeatInsertModeChanges()
  keyHandler()

Functions
Functions that are not part of a class:

transformCursor(cm, range)   X-Ref
No description

enterVimMode(cm)   X-Ref
No description

leaveVimMode(cm)   X-Ref
No description

detachVimMap(cm, next)   X-Ref
No description

attachVimMap(cm, prev)   X-Ref
No description

cmKey(key, cm)   X-Ref
No description

cmKeyToVimKey(key)   X-Ref
No description

getOnPasteFn(cm)   X-Ref
No description

makeKeyRange(start, size)   X-Ref
No description

isLine(cm, line)   X-Ref
No description

isLowerCase(k)   X-Ref
No description

isMatchableSymbol(k)   X-Ref
No description

isNumber(k)   X-Ref
No description

isUpperCase(k)   X-Ref
No description

isWhiteSpaceString(k)   X-Ref
No description

isEndOfSentenceSymbol(k)   X-Ref
No description

inArray(val, arr)   X-Ref
No description

defineOption(name, defaultValue, type, aliases, callback)   X-Ref
No description

setOption(name, value, cm, cfg)   X-Ref
No description

getOption(name, cm, cfg)   X-Ref
No description

add(cm, oldCur, newCur)   X-Ref
No description

useNextSlot(cursor)   X-Ref
No description

move(cm, offset)   X-Ref
No description

find(cm, offset)   X-Ref
No description

MacroModeState()   X-Ref
No description

maybeInitVimState(cm)   X-Ref
No description

resetVimGlobalState()   X-Ref
No description

toCtxArray(ctx)   X-Ref
No description

handleMacroRecording()   X-Ref
This is the outermost function called by CodeMirror, after keys have
been mapped to their Vim equivalents.

Finds a command based on the key (and cached keys if there is a
multi-key sequence). Returns `undefined` if no key is matched, a noop
function if a partial match is found (multi-key), and a function to
execute the bound command if a a key is matched. The function always
returns true.

handleEsc()   X-Ref
No description

doKeyToKey(keys)   X-Ref
No description

handleKeyInsertMode()   X-Ref
No description

handleKeyNonInsertMode()   X-Ref
No description

InputState()   X-Ref
No description

clearInputState(cm, reason)   X-Ref
No description

Register(text, linewise, blockwise)   X-Ref
No description

defineRegister(name, register)   X-Ref
Defines an external register.

The name should be a single character that will be used to reference the register.
The register should support setText, pushText, clear, and toString(). See Register
for a reference implementation.

RegisterController(registers)   X-Ref
No description

HistoryController()   X-Ref
No description

handleQuery(query, ignoreCase, smartCase)   X-Ref
No description

onPromptClose(query)   X-Ref
No description

onPromptKeyUp(e, query, close)   X-Ref
No description

onPromptKeyDown(e, query, close)   X-Ref
No description

onPromptClose(input)   X-Ref
No description

onPromptKeyDown(e, input, close)   X-Ref
No description

defineMotion(name, fn)   X-Ref
No description

fillArray(val, times)   X-Ref
No description

defineOperator(name, fn)   X-Ref
No description

defineAction(name, fn)   X-Ref
No description

clipCursorToContent(cm, cur)   X-Ref
Clips cursor to ensure that line is within the buffer's range
If includeLineBreak is true, then allow cur.ch == lineLength.


copyArgs(args)   X-Ref
No description

offsetCursor(cur, offsetLine, offsetCh)   X-Ref
No description

commandMatches(keys, keyMap, context, inputState)   X-Ref
No description

commandMatch(pressed, mapped)   X-Ref
No description

lastChar(keys)   X-Ref
No description

repeatFn(cm, fn, repeat)   X-Ref
No description

copyCursor(cur)   X-Ref
No description

cursorEqual(cur1, cur2)   X-Ref
No description

cursorIsBefore(cur1, cur2)   X-Ref
No description

cursorMin(cur1, cur2)   X-Ref
No description

cursorMax(cur1, cur2)   X-Ref
No description

cursorIsBetween(cur1, cur2, cur3)   X-Ref
No description

lineLength(cm, lineNum)   X-Ref
No description

trim(s)   X-Ref
No description

escapeRegex(s)   X-Ref
No description

extendLineToColumn(cm, lineNum, column)   X-Ref
No description

selectBlock(cm, selectionEnd)   X-Ref
No description

selectForInsert(cm, head, height)   X-Ref
No description

getIndex(ranges, cursor, end)   X-Ref
No description

getSelectedAreaRange(cm, vim)   X-Ref
No description

updateLastSelection(cm, vim)   X-Ref
No description

expandSelection(cm, start, end)   X-Ref
No description

updateCmSelection(cm, sel, mode)   X-Ref
Updates the CodeMirror selection to match the provided vim selection.
If no arguments are given, it uses the current vim selection state.


makeCmSelection(cm, sel, mode, exclusive)   X-Ref
No description

getHead(cm)   X-Ref
No description

exitVisualMode(cm, moveHead)   X-Ref
If moveHead is set to false, the CodeMirror selection will not be
touched. The caller assumes the responsibility of putting the cursor
in the right place.


clipToLine(cm, curStart, curEnd)   X-Ref
No description

expandSelectionToLine(_cm, curStart, curEnd)   X-Ref
No description

findFirstNonWhiteSpaceCharacter(text)   X-Ref
No description

expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol)   X-Ref
No description

expandTagUnderCursor(cm, head, inclusive)   X-Ref
Depends on the following:

- editor mode should be htmlmixedmode / xml
- mode/xml/xml.js should be loaded
- addon/fold/xml-fold.js should be loaded

If any of the above requirements are not true, this function noops.

This is _NOT_ a 100% accurate implementation of vim tag text objects.
The following caveats apply (based off cursory testing, I'm sure there
are other discrepancies):

- Does not work inside comments:
```
<!-- <div>broken</div> -->
```
- Does not work when tags have different cases:
```
<div>broken</DIV>
```
- Does not work when cursor is inside a broken tag:
```
<div><brok><en></div>
```

recordJumpPosition(cm, oldCur, newCur)   X-Ref
No description

recordLastCharacterSearch(increment, args)   X-Ref
No description

findSymbol(cm, repeat, forward, symb)   X-Ref
No description

findWord(cm, cur, forward, bigWord, emptyLineIsWord)   X-Ref
No description

moveToWord(cm, cur, repeat, forward, wordEnd, bigWord)   X-Ref

param: {CodeMirror} cm CodeMirror object.
param: {Pos} cur The position to start from.
param: {int} repeat Number of words to move past.
param: {boolean} forward True to search forward. False to search
param: {boolean} wordEnd True to move to end of word. False to move to
param: {boolean} bigWord True if punctuation count as part of the word.
return: {Cursor} The position the cursor should move to.

moveToEol(cm, head, motionArgs, vim, keepHPos)   X-Ref
No description

moveToCharacter(cm, repeat, forward, character)   X-Ref
No description

moveToColumn(cm, repeat)   X-Ref
No description

updateMark(cm, vim, markName, pos)   X-Ref
No description

charIdxInLine(start, line, character, forward, includeChar)   X-Ref
No description

findParagraph(cm, head, repeat, dir, inclusive)   X-Ref
No description

isEmpty(i)   X-Ref
No description

isBoundary(i, dir, any)   X-Ref
No description

findSentence(cm, cur, repeat, dir)   X-Ref
No description

nextChar(cm, idx)   X-Ref
No description

forward(cm, ln, pos, dir)   X-Ref
No description

reverse(cm, ln, pos, dir)   X-Ref
No description

selectCompanionObject(cm, head, symb, inclusive)   X-Ref
No description

findBeginningAndEnd(cm, head, symb, inclusive)   X-Ref
No description

SearchState()   X-Ref
No description

getSearchState(cm)   X-Ref
No description

splitBySlash(argString)   X-Ref
No description

findUnescapedSlashes(argString)   X-Ref
No description

splitBySeparator(argString, separator)   X-Ref
No description

findUnescapedSeparators(str, separator)   X-Ref
No description

translateRegex(str)   X-Ref
No description

translateRegexReplace(str)   X-Ref
No description

unescapeRegexReplace(str)   X-Ref
No description

parseQuery(query, ignoreCase, smartCase)   X-Ref
Extract the regular expression from the query and return a Regexp object.
Returns null if the query is blank.
If ignoreCase is passed in, the Regexp object will have the 'i' flag set.
If smartCase is passed in, and the query contains upper case letters,
then ignoreCase is overridden, and the 'i' flag will not be set.
If the query contains the /i in the flag part of the regular expression,
then both ignoreCase and smartCase are ignored, and 'i' will be passed
through to the Regex object.


dom(n)   X-Ref
dom - Document Object Manipulator
Usage:
dom('<tag>'|<node>[, ...{<attributes>|<$styles>}|<child-node>|'<text>'])
Examples:
dom('div', {id:'xyz'}, dom('p', 'CM rocks!', {$color:'red'}))
dom(document.head, dom('script', 'alert("hello!")'))
Not supported:
dom('p', ['arrays are objects'], Error('objects specify attributes'))


showConfirm(cm, template)   X-Ref
No description

makePrompt(prefix, desc)   X-Ref
No description

showPrompt(cm, options)   X-Ref
No description

regexEqual(r1, r2)   X-Ref
No description

updateSearchQuery(cm, rawQuery, ignoreCase, smartCase)   X-Ref
No description

searchOverlay(query)   X-Ref
No description

highlightSearchMatches(cm, query)   X-Ref
No description

findNext(cm, prev, query, repeat)   X-Ref
No description

findNextFromAndToInclusive(cm, prev, query, repeat, vim)   X-Ref
Pretty much the same as `findNext`, except for the following differences:

1. Before starting the search, move to the previous search. This way if our cursor is
already inside a match, we should return the current match.
2. Rather than only returning the cursor's from, we return the cursor's from and to as a tuple.

clearSearchHighlight(cm)   X-Ref
No description

isInRange(pos, start, end)   X-Ref
Check if pos is in the specified range, INCLUSIVE.
Range can be specified with 1 or 2 arguments.
If the first range argument is an array, treat it as an array of line
numbers. Match pos against any of the lines.
If the first range argument is a number,
if there is only 1 range argument, check if pos has the same line
number
if there are 2 range arguments, then check if pos is in between the two
range arguments.


getUserVisibleLines(cm)   X-Ref
No description

getMarkPos(cm, vim, markName)   X-Ref
No description

getLastEditPos(cm)   X-Ref
No description

parseArgs()   X-Ref
No description

compareFn(a, b)   X-Ref
No description

comparePatternFn(a, b)   X-Ref
No description

doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query,replaceWith, callback)   X-Ref

param: {CodeMirror} cm CodeMirror instance we are in.
param: {boolean} confirm Whether to confirm each replace.
param: {Cursor} lineStart Line to start replacing from.
param: {Cursor} lineEnd Line to stop replacing at.
param: {RegExp} query Query for performing matches with.
param: {string} replaceWith Text to replace matches with. May contain $1,
param: {function()} callback A callback for when the replace is done.

replaceAll()   X-Ref
No description

replace()   X-Ref
No description

findNextValidMatch()   X-Ref
No description

next()   X-Ref
No description

stop(close)   X-Ref
No description

onPromptKeyDown(e, _value, close)   X-Ref
No description

exitInsertMode(cm)   X-Ref
No description

_mapCommand(command)   X-Ref
No description

mapCommand(keys, type, name, args, extra)   X-Ref
No description

executeMacroRegister(cm, vim, macroModeState, registerName)   X-Ref
No description

logKey(macroModeState, key)   X-Ref
No description

logInsertModeChange(macroModeState)   X-Ref
No description

logSearchQuery(macroModeState, query)   X-Ref
No description

onChange(cm, changeObj)   X-Ref
Listens for changes made in insert mode.
Should only be active in insert mode.


onCursorActivity(cm)   X-Ref
Listens for any kind of cursor activity on CodeMirror.


handleExternalSelection(cm, vim)   X-Ref
No description

InsertModeKey(keyName)   X-Ref
No description

onKeyEventTargetKeyDown(e)   X-Ref
Handles raw key down events from the text area.
- Should only be active in insert mode.
- For recording deletes in insert mode.


onKeyFound()   X-Ref
No description

repeatLastEdit(cm, vim, repeat, repeatForInsert)   X-Ref
Repeats the last edit, which includes exactly 1 command and at most 1
insert. Operator and motion commands are read from lastEditInputState,
while action commands are read from lastEditActionCommand.

If repeatForInsert is true, then the function was called by
exitInsertMode to repeat the insert mode changes the user just made. The
corresponding enterInsertMode call was made with a count.

repeatCommand()   X-Ref
No description

repeatInsert(repeat)   X-Ref
No description

repeatInsertModeChanges(cm, changes, repeat)   X-Ref
No description

keyHandler(binding)   X-Ref
No description



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer