summaryrefslogtreecommitdiff
path: root/plugins/zsh-navigation-tools/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/zsh-navigation-tools/README.md')
-rw-r--r--plugins/zsh-navigation-tools/README.md81
1 files changed, 80 insertions, 1 deletions
diff --git a/plugins/zsh-navigation-tools/README.md b/plugins/zsh-navigation-tools/README.md
index 32a86bba9..7a679fe67 100644
--- a/plugins/zsh-navigation-tools/README.md
+++ b/plugins/zsh-navigation-tools/README.md
@@ -1,6 +1,6 @@
# Zsh Navigation Tools
-http://imageshack.com/a/img633/7967/ps6rKR.png
+https://raw.githubusercontent.com/psprint/zsh-navigation-tools/master/doc/img/n-history2.png
Set of tools like n-history – multi-word history searcher, n-cd – directory
bookmark manager, n-kill – htop like kill utility, and more. Based on
@@ -32,6 +32,26 @@ to key combinations (no need for autoload when using Oh My Zsh):
Oh My Zsh stores history into ~/.zsh_history. When you switch to OMZ you could
want to copy your previous data (from e.g. ~/.zhistory) into the new location.
+## News
+
+* 30-04-2016
+ - New feature: color themes. Use Ctrl-T and Ctrl-G to browse predefined
+ themes. They are listed in ~/.config/znt/n-list.conf. Use the file to
+ permanently set a color scheme. Also, I sent a patch to Zsh developers
+ and starting from Zsh > 5.2 (not yet released) supported will be 256 colors.
+ The file ~/.config/znt/n-list.conf already has set of 256-color themes prepared :)
+
+* 29-04-2016
+ - New feature: private history – n-history tracks selected history entries,
+ exposes them via new view (activated with F1)
+
+* 28-04-2016
+ - New features:
+ 1. New n-history view (activated with F1): Most Frequent History Words
+ 2. Predefined search keywords – use F2 to quickly search for chosen
+ keywords (video: [https://youtu.be/DN9QqssAYB8](https://youtu.be/DN9QqssAYB8))
+ 3. Configuration option for doing instant selection in search mode
+
## Introduction
The tools are:
@@ -60,6 +80,65 @@ cursors. Other keys are:
- Ctrl-w (in incremental search) - delete whole word
- Ctrl-k (in incremental search) - delete whole line
+## Configuration
+
+`ZNT` has configuration files located in `~/.config/znt`. The files are:
+
+```
+n-aliases.conf
+n-cd.conf
+n-env.conf
+n-functions.conf
+n-history.conf
+n-kill.conf
+n-list.conf
+n-options.conf
+n-panelize.conf
+```
+
+`n-list.conf` contains main configuration variables:
+
+```zsh
+# Should the list (text, borders) be drawn in bold
+local bold=0
+
+# Main color pair (foreground/background)
+local colorpair="white/black"
+
+# Should draw the border?
+local border=1
+
+# Combinations of colors to try out with Ctrl-T and Ctrl-G
+# The last number is the bold option, 0 or 1
+local -a themes
+themes=( "white/black/1" "green/black/0" "green/black/1" "white/blue/0" "white/blue/1"
+ "magenta/black/0" "magenta/black/1" )
+```
+
+Read remaining configuration files to see what's in them. Nevertheless, configuration
+can be also set from `zshrc`. There are `5` standard `zshrc` configuration variables:
+
+```
+znt_history_active_text - underline or reverse - how should be active element highlighted
+znt_history_nlist_coloring_pattern - pattern that can be used to colorize elements
+znt_history_nlist_coloring_color - color with which to colorize
+znt_history_nlist_coloring_match_multiple - should multiple matches be colorized (0 or 1)
+znt_history_keywords (array) - search keywords activated with `Ctrl-X`
+```
+
+Above variables will work for `n-history` tool. For other tools, change `_history_` to
+e.g. `_cd_`, for the `n-cd` tool. The same works for all `8` tools.
+
+Common configuration of the tools uses variables with `_list_` in them:
+
+```
+znt_list_bold - should draw text in bold (0 or 1)
+znt_list_colorpair - main pair of colors to be used, e.g "green/black"
+znt_list_border - should draw borders around windows (0 or 1)
+znt_list_themes (array) - list of themes to try out with Ctrl-T, e.g. ( "white/black/1" "green/black/0" )
+znt_list_instant_select - should pressing enter in search mode leave tool (0 or 1)
+```
+
## Programming
The function n-list is used as follows: