This shows you the differences between two versions of the page.
ep:labs:061:contents:tasks:ex1 [2025/04/08 13:05] cezar.craciunoiu [01. [40p] Primer / Reminder] |
ep:labs:061:contents:tasks:ex1 [2025/04/08 13:45] (current) radu.mantu |
||
---|---|---|---|
Line 2: | Line 2: | ||
<note tip> | <note tip> | ||
- | //Pro tip #1//: since you'll be using **man** a lot in this exercise, add this to your //.bashrc// or //.zshrc//: | + | //Pro tip #1//: since you'll be using **man** a lot in this exercise, |
+ | install **neovim**, and export this environment variable (in //.bashrc// | ||
+ | or //.zshrc// to change the **man** pager. **neovim** has very good | ||
+ | built-in syntax highlighting. | ||
<code bash> | <code bash> | ||
- | # color schemes for man pages | + | export MANPAGER='nvim +Man!' |
- | man() { | + | |
- | LESS_TERMCAP_mb=$'\e[1;34m' \ | + | |
- | LESS_TERMCAP_md=$'\e[1;32m' \ | + | |
- | LESS_TERMCAP_so=$'\e[1;33m' \ | + | |
- | LESS_TERMCAP_us=$'\e[1;4;31m' \ | + | |
- | LESS_TERMCAP_me=$'\e[0m' \ | + | |
- | LESS_TERMCAP_se=$'\e[0m' \ | + | |
- | LESS_TERMCAP_ue=$'\e[0m' \ | + | |
- | command man "$@" | + | |
- | } | + | |
</code> | </code> | ||
- | Source the file and test that it works. | + | Export the environment variable (source the shell config file) and test that it works. |
</note> | </note> | ||