----------------------------------- + -------------------------------------------------
Key:Command | Description
----------------------------------- + -------------------------------------------------
+ e:-!sudo -E vim $nnn* | Edit file as root in vim
g:-!git diff | Show git diff
h:-!hx $nnn* | Open hovered file in hx hex editor
k:-!fuser -kiv $nnn* | Interactively kill process(es) using hovered file
| Key:Command | Description |
|---|---|
+| `e:-!sudo -E vim $nnn*` | Edit file as root in vim |
| `g:-!git diff` | Show git diff |
| `h:-!hx $nnn*` | Open hovered file in [hx](https://github.com/krpors/hx) hex editor |
| `k:-!fuser -kiv $nnn*` | Interactively kill process(es) using hovered file |
EDITOR="${EDITOR:-vim}"
if type sudo >/dev/null 2>&1; then
- sudo "$EDITOR" "$1"
+ sudo -E "$EDITOR" "$1"
elif type sudoedit >/dev/null 2>&1; then
- sudoedit "$1"
+ sudoedit -E "$1"
elif type doas >/dev/null 2>&1; then
doas "$EDITOR" "$1"
fi