# Introduction to "vim-like" tool
## zathura
![](https://i.imgur.com/SBumca3.jpg)
### 推薦
* PDF閱覽器,與vim操作相近
* 檔案容量極小
* 簡約、功能多
> ps. 使用畫面
![](https://i.imgur.com/J7178h5.png)
### 原因
到了「痴愛」vim的境界時,就會希望自己的任何工具都使用類vim的操作方式,而這套軟體是類vim的PDF閱覽器,此外檔案大小極小(小於1MB),可謂「麻雀雖小,五臟俱全」。
### 操作
#### 基本操作
|按鍵|效果|按鍵|效果|
|:--|:--|:--|:--|
|`j`|下一點|`k`|上一點|
|`Ctrl+d`|下半頁|`Ctrl+u`|上半頁|
|`Ctrl+f`|下一頁|`Ctrl+b`|上一頁|
|`J`|下一頁(Direct)|`K`|上一頁(Direct)|
|`Space`|下一頁|`nG`|跳轉到第n頁|
|`h`|左一點|`l`|右一點|
|`Ctrl+t`|左半頁|`Ctrl+y`|右半頁|
|`t`|左一頁|`y`|右一頁|
|`gg`|第一頁|`G`|最後一頁|
|`H`|到目前頁面的頂端|`L`|到目前頁面的底端|
|`Ctrl+o`|移動到之前跳轉的頁面|`Ctrl+j`|兩個跳轉間轉換1|
|`Ctrl+i`|移動到之後跳轉的頁面|`Ctrl+k`|兩個跳轉間轉換2|
|`a`|以高度調整視窗|`s`|以寬度調整視窗|
|`Ctrl+c` `Esc`|終止|`r`|旋轉90度|
|`Ctrl+r`|黑白顯示|`R`|重新加載文件|
|`f`|連結(到指定頁碼)|`F`|連接(顯示指定頁碼)|
|`mX`|標記標籤|`'X`|到標籤處|
|`Tab`|打開/關閉目錄|`d`|打開/關閉雙頁面顯示|
|`/`|向後搜尋|`?`|向前搜尋|
|`+`|放大頁面| `-` | 放大/縮小頁面 |
| `=` | 恢復原始大小 |`n=`|放大到大小為n|
|`Ctrl+m`|打開/關閉 輸入欄|`F5`|切換顯示模式|
|`Ctrl+n`|打開/關閉 狀態欄|`F11`|切換全屏模式|
#### 目錄模式
> 目錄模式狀態
![](https://i.imgur.com/h8N1sgv.png)
|按鍵|效果|按鍵|效果|
|:--|:--|:--|:--|
|j|下一點|k|上一點|
|h|折疊|l|展開|
|H|全部折疊|L|全部展開|
|space, enter|選中並開啟|
#### 命令模式
* 輸入":"後,可直接輸入指令
|指令|效果|
|:--|:--|
|info|顯示文檔訊息|
|bmark|保存書籤|
|bdelete|刪除書籤|
|blist|列出書籤|
|open|打開文檔|
|close|關閉文檔|
|exec|執行外部命令|
|export|輸出附件|
|print|列印文檔|
|write(!)|保存文檔|
|offset|設定頁面偏移|
## vimiv
* [Website](https://karlch.github.io/vimiv)
* [Github](https://github.com/karlch/vimiv)
### 原因
類vim的終端機圖片瀏覽器
### shortcut key
![](https://i.imgur.com/2HfG3V7.png)
## Ranger
### Nevigation
|Key|Effective|Key|Effective|
|:--|:--|:--|:--|
|`j`|Move down|`h`|Move to parent directory|
|`k`|Move up|`l` `E`|Open file(opens file in default)|
|`gg`|Go to the top of the list|`Ctrl+f`|Page down|
|`G`|Go to the bottom of the list|`Ctrl+b`|Page up|
|`J`|Page down $\frac{1}{2}$ page|`H`|Go back through navigation history|
|`K`|Page up $\frac{1}{2}$ page|`L`|Go forward through navigation history|
### Move to common directories
|Key|Effective|Key|Effective|
|:--|:--|:--|:--|
|`gh`|cd ~|`ge`|cd /etc|
|`gu`|cd /usr|`gd`|cd /dev|
|`go`|cd /opt|`gv`|cd /var|
|`gm`|cd /media|`gM`|cd /mnt|
|`gs`|cd /srv|`gr`|cd /|
|Key|Effective|
|:--|:--|
|`gR`|cd to ranger's global configuration directory|
### Working with Files
|Key|Effective|
|:--|:--|
|`i`|Display file (useful if you'd like to view a text file in a paper instead of editing it)|
|`r`|Open file with...(allowsyou to choose program to use)|
|`o`|Change sort order (follow by character in menu selecion)|
|`z`|Change settings (commonly used toggle settings)|
|`zh`|View hidden files|
|`space`|Select current file|
|`t`|Tag file (you can perform actions on tagged files)|
|`cw`|Rename current file|
|`/`|Search for files|
|`n`|Jump to next match|
|`N`|Jump to previous match|
|`yy`|Yank(copy) file|
|`dd`|Mark file for cut operation|
|`delete`|Delete selected file|
### Tabbed Browsing
|Key|Effective|
|:--|:--|
|`Ctrl+n`|Create new tab|
|`Ctrl+w`|Close current tab|
|`tab`|Next tab|
|`shift+tab`|Previous tab|
### General Commands
|Key|Effective|
|:--|:--|
|?|View ranger man page|
|1?|Keybindings help|
|2?|Command help|
|3?|Settings help|
|`R`|Reload current directory|
|`Q`|Quit|
### Command Interface
#### main
|Key|Effective|
|:--|:--|
|!|Execute a command from the shell(non-ranger commands)|
|:|Execute a ranger command|
|du|Measure disk usage of current directory|
|chmod|Change permissions of current file|
#### flag
|Key|Effective|
|:--|:--|
|-s|Discard the output of the current command|
|-d|Detach the process and run in the background|
|-p|Return the output in ranger's file pager|
|-w|Do not return immediately after command execution. Hang until "Enter" is pressed|
|-c|Perform command on current file, not the selected files|