parent
36ade25eb6
commit
8e95c547d6
@ -0,0 +1,77 @@
|
|||||||
|
Zaw
|
||||||
|
===
|
||||||
|
|
||||||
|
Loads and configures Zaw from the [zaw][1] project.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
New features and bug fixes should be submitted to the [zaw][1] project according
|
||||||
|
to its rules and regulations. This module will be synchronized against it.
|
||||||
|
|
||||||
|
Settings
|
||||||
|
--------
|
||||||
|
|
||||||
|
### Case Sensitivity
|
||||||
|
|
||||||
|
To enable case-sensitivity for this module only, add the following line to
|
||||||
|
*zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw' case-sensitive 'yes'
|
||||||
|
|
||||||
|
### Highlighting
|
||||||
|
|
||||||
|
If colors are enabled, *zaw* will automatically highlight positive results.
|
||||||
|
|
||||||
|
To enable highlighting for this module only, add the following line to
|
||||||
|
*zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw' color 'yes'
|
||||||
|
|
||||||
|
To change the error color, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw:color' error 'bg=red,fg=white'
|
||||||
|
|
||||||
|
To change the marked item color, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw:color' marked 'bg=blue,fg=white'
|
||||||
|
|
||||||
|
To change the matched item color, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw:color' matched 'bg=magenta,fg=white'
|
||||||
|
|
||||||
|
To change the selected item color, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw:color' selected 'standout'
|
||||||
|
|
||||||
|
To change the list title color, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw:color' title 'fg=yellow'
|
||||||
|
|
||||||
|
# Search
|
||||||
|
|
||||||
|
To set the maximum number of items, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw' max-lines 15
|
||||||
|
|
||||||
|
To rotate to the other side of the list when the cursor reaches the top or the
|
||||||
|
bottom, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':filter-select' rotate-list 'yes'
|
||||||
|
|
||||||
|
To use extended search operators, add the following line to *zpreztorc*:
|
||||||
|
|
||||||
|
zstyle ':prezto:module:zaw' extended-search 'yes'
|
||||||
|
|
||||||
|
More details can be found in the [zaw][1] project's README.
|
||||||
|
|
||||||
|
Authors
|
||||||
|
-------
|
||||||
|
|
||||||
|
*The authors of this module should be contacted via the [issue tracker][2].*
|
||||||
|
|
||||||
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
|
[1]: https://github.com/zsh-users/zaw
|
||||||
|
[2]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit c3308b675de18a14c933544077a429ba94ea7101
|
@ -0,0 +1,69 @@
|
|||||||
|
#
|
||||||
|
# Integrates zaw into Prezto.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
# Load dependencies.
|
||||||
|
pmodload 'editor'
|
||||||
|
|
||||||
|
# Source module files.
|
||||||
|
source "${0:h}/external/zaw.zsh" || return 1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Highlighting
|
||||||
|
#
|
||||||
|
|
||||||
|
zstyle -s ':prezto:module:zaw:color' error 'REPLY' || REPLY='bg=red,fg=white'
|
||||||
|
zstyle ':filter-select:highlight' error "$REPLY"
|
||||||
|
|
||||||
|
zstyle -s ':prezto:module:zaw:color' marked 'REPLY' || REPLY='bg=blue,fg=white'
|
||||||
|
zstyle ':filter-select:highlight' marked "$REPLY"
|
||||||
|
|
||||||
|
zstyle -s ':prezto:module:zaw:color' matched 'REPLY' || REPLY='bg=magenta,fg=white'
|
||||||
|
zstyle ':filter-select:highlight' matched "$REPLY"
|
||||||
|
|
||||||
|
zstyle -s ':prezto:module:zaw:color' selected 'REPLY' || REPLY='standout'
|
||||||
|
zstyle ':filter-select:highlight' selected "$REPLY"
|
||||||
|
|
||||||
|
zstyle -s ':prezto:module:zaw:color' title 'REPLY' || REPLY='fg=yellow'
|
||||||
|
zstyle ':filter-select:highlight' title "$REPLY"
|
||||||
|
|
||||||
|
if ! zstyle -t ':prezto:module:zaw' color; then
|
||||||
|
for style in error marked matched selected title; do
|
||||||
|
zstyle -d ':filter-select:highlight' "$style"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Search
|
||||||
|
#
|
||||||
|
|
||||||
|
zstyle -s ':prezto:module:zaw' max-lines 'REPLY' || REPLY=0
|
||||||
|
zstyle ':filter-select' max-lines "$REPLY"
|
||||||
|
|
||||||
|
zstyle -b ':filter-select' rotate-list 'REPLY' || REPLY='no'
|
||||||
|
zstyle ':filter-select' rotate-list "$REPLY"
|
||||||
|
|
||||||
|
zstyle -b ':prezto:module:zaw' extended-search 'REPLY' || REPLY='no'
|
||||||
|
zstyle ':filter-select' extended-search "$REPLY"
|
||||||
|
|
||||||
|
if ! zstyle -t ':prezto:module:zaw' case-sensitive; then
|
||||||
|
zstyle ':filter-select' case-insensitive 'yes'
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Key Bindings
|
||||||
|
#
|
||||||
|
|
||||||
|
if [[ -n "$key_info" ]]; then
|
||||||
|
# Emacs
|
||||||
|
bindkey -M emacs "$key_info[Control]R" zaw-history
|
||||||
|
bindkey -M emacs "$key_info[Control]S" zaw-history
|
||||||
|
|
||||||
|
# Vi
|
||||||
|
bindkey -M vicmd "/" zaw-history
|
||||||
|
bindkey -M vicmd "?" zaw-history
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in new issue