Skip to content

Latest commit

 

History

History
89 lines (70 loc) · 2.21 KB

wsfind.org

File metadata and controls

89 lines (70 loc) · 2.21 KB

ZWSH find

Purpose

Search history.

Keys

^QF: initialize search

Depends on the selection and the left side of the buffer, LBUFFER:

  • if selection exists: initialize search with selection as contents
  • LBUFFER empty (no selection): initialize search with empty string
  • LBUFFER not empty (no selection): initialize search with LBUFFER as contentsn

^E: search up

^X: search down

^A,^S,^D,^F: stop search

^M: execute found

^L: repeat search

Make search using previous search string.

^U or ESC: abort search

Restore state as it was before search, but save variable for ^L search (?same as LASTSEARCH variable?).

Interface

Search prompt string: Find what? <cursor>

WS find functions for zwsh

^QF: “find text”

Shows dialog: #+BEGIN Find what? <cursor> RETURN done | Backspace or ^H erase left ^U cancel | Del erase char #+END bold: “RETURN”, “Backspace”, “^H”, “^U”, “Del”

On enter empty: return

If could not find, display: #+BEGIN Could not find: <string>

Press Esc to continue. #+END bold: “Press Esc to continue.”

If found: cursor on first character of the first occurrence of string in text after cursor position while performing the search.

On ^L: repeat search further.

After the last search, if ^L is pressed, message showed: #+BEGIN End of search for: <string>

Press Esc to continue. #+END bold: “Press Esc to continue.”

^L performs search without dialog. If cursor at the beginning, finds first occurrence. If at the end of document, does nothing. If between the end of document and the last position, displays the error message.

^QA: “find/replace”

Dialog: #+BEGIN Find what? <cursor> RETURN done | Backspace or ^H erase left ^U cancel | Del erase char #+END

If string is empty, returns without asking/displaying anything.

After string input, L4 becomes: #+BEGIN Replace with? <cursor> #+END

Replace string can be empty.

Finds string, displays on right top corner “Replace Y/N”. If y pressed, replaces. Otherwise, does not.

^L does the same search without string dialog, but with y/n dialog.

For the first search, if string can not be found, returns without displaying and asking anything. For ^L search, displays same as for find with ^QF.