vifmrc 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. "##############################################################################
  2. " My config file for the vifm terminal file manager
  3. "##############################################################################
  4. set vicmd=nvim
  5. set syscalls
  6. set trash
  7. set history=100
  8. set nofollowlinks
  9. set sortnumbers
  10. set undolevels=100
  11. set vimhelp
  12. set norunexec
  13. set timefmt=%d/%m/%Y\ %H:%M
  14. " set viewcolumns=*{name}..,6{}.
  15. set viewcolumns=-{name}..,10{}.
  16. set rulerformat="%l/%S%[ +%x%] "
  17. set wildmenu
  18. set wildstyle=popup
  19. set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
  20. set ignorecase
  21. set smartcase
  22. set nohlsearch
  23. set incsearch
  24. set scrolloff=4
  25. set statusline=" %A %10u:%-7g %8s [%8E] %18d %{&sort} %= %a/%c "
  26. set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
  27. \phistory,fhistory,dirstack,registers,bookmarks,bmarks
  28. set slowfs=curlftpfs
  29. source $HOME/.config/vifm/icons.vifm
  30. colorscheme my_everforest
  31. "##############################################################################
  32. " File associations
  33. "##############################################################################
  34. " Pdf, Djvu -------------------------------------------------------------------
  35. " filextype *.pdf atril %c %i &, apvlv %c, xpdf %c
  36. filetype *.pdf,*.djvu
  37. \ {View in atril}
  38. \ atril %f &,
  39. \ {View in qpdfview}
  40. \ qpdfview %f &
  41. filextype *.pdf,*.djvu
  42. \ {View in zathura}
  43. \ zathura %f,
  44. \ {View in apvlv}
  45. \ apvlv %f
  46. fileviewer *.pdf
  47. \ vifmimg pdfpreview %px %py %pw %ph %c
  48. \ %pc
  49. \ vifmimg clear
  50. " \ pdftotext -nopgbrk %c -
  51. " PostScript ------------------------------------------------------------------
  52. filetype *.ps,*.eps,*.ps.gz
  53. \ {View in zathura}
  54. \ zathura %f,
  55. \ {View in gv}
  56. \ gv %c %i &,
  57. " Audio -----------------------------------------------------------------------
  58. filextype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
  59. \ {View using deadbeef}
  60. \ deadbeef %f %i &,
  61. \ {Play using MPlayer}
  62. \ mplayer %f %i &
  63. filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
  64. \ {View using cmus}
  65. \ $TERMINAL -e cmus %f &,
  66. \ {Play using ffplay}
  67. \ ffplay -nodisp -autoexit %c
  68. fileviewer *.mp3 mp3info
  69. fileviewer *.flac soxi
  70. " Video -----------------------------------------------------------------------
  71. filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
  72. \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
  73. \*.as[fx]
  74. \ {View using smplayer}
  75. \ smplayer %f %i &
  76. filetype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
  77. \ {View using ffplay}
  78. \ ffplay -fs -autoexit %f
  79. fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
  80. \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
  81. \*.as[fx]
  82. \ vifmimg videopreview %px %py %pw %ph %c
  83. \ %pc
  84. \ vifmimg clear
  85. " Web -------------------------------------------------------------------------
  86. filetype *.html,*.htm
  87. \ {Open with vim}
  88. \ $TERMINAL -e vim %c &,
  89. \ {Open with links}
  90. \ links %c &,
  91. \ {Open with lynx}
  92. \ lynx %c &
  93. filextype *.html,*.htm
  94. \ {Open with vim}
  95. \ wezterm start --always-new-process --cwd %d -e vim %c &,
  96. \ {Open with gvim}
  97. \ gvim %c &,
  98. \ {Open with dwb}
  99. \ dwb %f %i &,
  100. \ {Open with firefox}
  101. \ firefox %f &,
  102. \ {Open with uzbl}
  103. \ uzbl-browser %f %i &
  104. " Object ----------------------------------------------------------------------
  105. filetype *.o nm %f | less
  106. " Man page --------------------------------------------------------------------
  107. filetype *.[1-8] man ./%c
  108. fileviewer *.[1-8] man ./%c | col -b
  109. " Images ----------------------------------------------------------------------
  110. filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
  111. \ {View in XnViewMP}
  112. \ xnviewmp %f %i &,
  113. \ {View in ristretto}
  114. \ ristretto %f &
  115. filetype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
  116. \ {View in sxiv}
  117. \ sxiv -ia %f &,
  118. \ {View in imv}
  119. \ imv-x11 -b 1D2330 -d %d &,
  120. \ {View in feh}
  121. \ feh %d &
  122. fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
  123. \ vifmimg draw %px %py %pw %ph %c
  124. \ %pc
  125. \ vifmimg clear
  126. fileviewer *.gif
  127. \ vifmimg gifpreview %px %py %pw %ph %c
  128. \ %pc
  129. \ vifmimg clear
  130. " OpenRaster ------------------------------------------------------------------
  131. filetype *.ora
  132. \ {Edit in MyPaint}
  133. \ mypaint %f,
  134. " Mindmap ---------------------------------------------------------------------
  135. filetype *.vym
  136. \ {Open with VYM}
  137. \ vym %f &,
  138. " MD5 -------------------------------------------------------------------------
  139. filetype *.md5
  140. \ {Check MD5 hash sum}
  141. \ md5sum -c %f %S,
  142. " SHA1 ------------------------------------------------------------------------
  143. filetype *.sha1
  144. \ {Check SHA1 hash sum}
  145. \ sha1sum -c %f %S,
  146. " SHA256 ----------------------------------------------------------------------
  147. filetype *.sha256
  148. \ {Check SHA256 hash sum}
  149. \ sha256sum -c %f %S,
  150. " SHA512 ----------------------------------------------------------------------
  151. filetype *.sha512
  152. \ {Check SHA512 hash sum}
  153. \ sha512sum -c %f %S,
  154. " GPG signature ---------------------------------------------------------------
  155. filetype *.asc
  156. \ {Check signature}
  157. \ !!gpg --verify %c,
  158. " Torrent ---------------------------------------------------------------------
  159. filextype *.torrent tixati %f &
  160. fileviewer *.torrent dumptorrent -v %c
  161. " FuseZipMount ----------------------------------------------------------------
  162. filextype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
  163. \ {View contents}
  164. \ engrampa %f
  165. filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
  166. \ {Mount with fuse-zip}
  167. \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
  168. \ {View contents}
  169. \ zip -sf %c | less,
  170. \ {Extract here}
  171. \ tar -xf %c
  172. fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
  173. " ArchiveMount ----------------------------------------------------------------
  174. filextype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
  175. \ {View contents}
  176. \ engrampa %f
  177. filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
  178. \ {Mount with archivemount}
  179. \ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
  180. \ {View contents}
  181. \ zip -sf %c | less,
  182. \ {Extract here}
  183. \ tar -xf %c
  184. fileviewer *.tgz,*.tar.gz tar -tzf %c
  185. fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
  186. fileviewer *.tar.txz,*.txz xz --list %c
  187. fileviewer *.tar tar -tf %c
  188. " Rar2FsMount and rar archives ------------------------------------------------
  189. filextype *.rar
  190. \ {View contents}
  191. \ engrampa %f
  192. filetype *.rar
  193. \ {Mount with rar2fs}
  194. \ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR
  195. fileviewer *.rar unrar v %c
  196. " Fuse7z and 7z archives ------------------------------------------------------
  197. filextype *.7z
  198. \ {View contents}
  199. \ engrampa %f
  200. filetype *.7z
  201. \ {Mount with fuse-7z}
  202. \ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR
  203. fileviewer *.7z 7z l %c
  204. " IsoMount --------------------------------------------------------------------
  205. filetype *.iso
  206. \ {Mount with fuseiso}
  207. \ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
  208. " SshMount --------------------------------------------------------------------
  209. filetype *.ssh
  210. \ {Mount with sshfs}
  211. \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
  212. " FtpMount --------------------------------------------------------------------
  213. filetype *.ftp
  214. \ {Mount with curlftpfs}
  215. \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
  216. " Office files ----------------------------------------------------------------
  217. filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx,*.ppt wps %f &, libreoffice %f &
  218. fileviewer *.doc catdoc %c
  219. fileviewer *.docx docx2txt.pl %f -
  220. " TuDu files ------------------------------------------------------------------
  221. filetype *.tudu tudu -f %c
  222. " Qt projects -----------------------------------------------------------------
  223. " filextype *.pro qtcreator %f &
  224. filextype *.pro wezterm start --always-new-process --cwd %d -e vim %f &
  225. filetype *.pro $TERMINAL -e vim %f &
  226. " Directories -----------------------------------------------------------------
  227. filextype */
  228. \ {View in dolphin}
  229. \ dolphin %f &,
  230. \ {View in thunar}
  231. \ Thunar %f &
  232. filextype */
  233. \ {View in Vifm}
  234. \ vifm %f &,
  235. \ {View in Ranger}
  236. \ ranger %f &
  237. " Config & exec files ---------------------------------------------------------
  238. filextype *.conf,*rc,*.txt,*.yml,*.json,config,*.fish,*.sh,*.ini,*.css,*.bak,*.backup,*info,*.md,*.dat,*.xml,*.Xresources,*.asm,*.py,*.c,*.cpp,*.h,*.awk,*bash*,*.git*,*.zsh,*zshrc,*.profile,*.log,*.desktop,*.vifm,*.vim,*.rs,*.hs,*.lua,*.org,*.el/
  239. \ {View in gvim}
  240. \ wezterm start --always-new-process --cwd %d -e vim %f &,
  241. " filextype
  242. " *.conf,*rc,*.txt,*.yml,*.json,config,*.fish,*.sh,*.ini,*.css,*.bak,*.backup,*info,*.md,*.dat,*.xml,*.Xresources,*.asm,*.py,*.c,*.cpp,*.h,*.awk,*bash*,*.git*,*.zsh,*zshrc,*.profile,*.log,*.desktop,*.vifm,*.vim,*.rs,*.hs,*.lua,*.org,*.el wezterm -e vim %f &
  243. filetype *.conf,*rc,*.txt,*.yml,*.json,config,*.fish,*.sh,*.ini,*.css,*.bak,*.backup,*info,*.md,*.dat,*.xml,*.Xresources,*.asm,*.py,*.c,*.cpp,*.h,*.awk,*bash*,*.git*,*.zsh,*zshrc,*.profile,*.log,*.desktop,*.vifm,*.vim,*.rs,*.hs,*.lua,*.org,*.el/
  244. \ {View in vim}
  245. \ $TERMINAL -e vim %f %i &,
  246. \ {View in Helix}
  247. \ $TERMINAL -e hx %f %i &,
  248. " filetype *.conf,*rc,*.txt,*.yml,*.json,config,*.fish,*.sh,*.ini,*.css,*.bak,*.backup,*info,*.md,*.dat,*.xml,*.Xresources,*.asm,*.py,*.c,*.cpp,*.h,*.awk,*bash*,*.git*,*.zsh,*zshrc,*.profile,*.log,*.desktop,*.vifm,*.vim,*.rs,*.hs,*.lua,*.org,*.el $TERMINAL -e vim %f &
  249. " Books -----------------------------------------------------------------------
  250. filextype *.fb2,*.epub cr3 %f %i &
  251. " Fonts -----------------------------------------------------------------------
  252. filextype *.ttf,*.otf gnome-font-viewer %f %i &
  253. " .deb ------------------------------------------------------------------------
  254. filextype *.deb gdebi-gtk %f &, engrampa %f %i &
  255. "##############################################################################
  256. " Syntax highlighting in preview
  257. "##############################################################################
  258. " Explicitly set highlight type for some extensions ---------------------------
  259. " 256-color terminal
  260. " fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
  261. " fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
  262. "
  263. " 16-color terminal
  264. " fileviewer *.c,*.h highlight -O ansi -s dante %c
  265. "
  266. " Or leave it for automatic detection -----------------------------------------
  267. "
  268. " fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
  269. " Displaying pictures in terminal ---------------------------------------------
  270. "
  271. " fileviewer *.jpg,*.png shellpic %c
  272. " Open all other files with default system programs (you can also remove all
  273. " :file[x]type commands above to ensure they don't interfere with system-wide
  274. " settings). By default all unknown files are opened with 'vi[x]cmd'
  275. " uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
  276. " for unknown file types.
  277. " For *nix:
  278. " filetype * xdg-open
  279. " For OS X:
  280. " filetype * open
  281. " For Windows:
  282. " filetype * start, explorer
  283. "##############################################################################
  284. " Marks
  285. "##############################################################################
  286. " :mark mark /full/directory/path [filename]
  287. mark h ~/
  288. mark d ~/Desktop
  289. mark w ~/Downloads
  290. mark b ~/OS/Linux/+backup
  291. mark p ~/Projects
  292. mark c ~/.config
  293. mark s ~/.myScripts
  294. mark l ~/.local/share
  295. mark a ~/.cache
  296. mark M /run/media
  297. mark R /
  298. "##############################################################################
  299. " Commands
  300. "##############################################################################
  301. " Archives -------------------------------------------------------------------
  302. command! zip zip -9 -r %c.zip %f
  303. command! unzip unzip %f
  304. command! tar tar -czvf %c.tar.gz %f
  305. command! untar tar -xzvf %f
  306. " Copy and move (instead of copy and move) WITH menu dialog -------------------
  307. command! cp :yank | winrun , put
  308. command! mv :yank | winrun , put!
  309. command! diff vim -d %f %F
  310. command! run !! ./%f
  311. command! mkcd :mkdir %a | cd %a
  312. command! reload :write | restart
  313. " Toggle detailed/brief information about files -------------------------------
  314. command! togglefilesinfo
  315. \ : if &viewcolumns == '-{name}..,10{}.'
  316. \ | set viewcolumns=*{name}..,10{size}.
  317. \ | echo 'Files information: detailed'
  318. \ | else
  319. \ | set viewcolumns='-{name}..,10{}.'
  320. \ | echo 'Files information: brief'
  321. \ | endif
  322. command! togglefilesmoreinfo
  323. \ : if &viewcolumns == '-{name}..,10{}.'
  324. " \ | set viewcolumns=*{name}.,10{size}.,12{perms},10{uname},-7{gname},18{mtime}
  325. " \ | set viewcolumns=*{name}..,{ext},10{size}.,12{perms},10{uname},-10{gname},18{mtime}
  326. \ | set viewcolumns=*{name}..,10{size}.,18{mtime}
  327. \ | echo 'Files information: detailed'
  328. \ | else
  329. \ | set viewcolumns='-{name}..,10{}.'
  330. \ | echo 'Files information: brief'
  331. \ | endif
  332. " Reset sort ------------------------------------------------------------------
  333. command! resetsort
  334. \ : if &sort != '+name'
  335. \ | set sort=+name
  336. \ | echo 'Reset sort to +name'
  337. \ | endif
  338. " Open most used tabs ---------------------------------------------------------
  339. command! openProgrammingDirs
  340. \ :tabonly
  341. \ | tabnew
  342. \ | tabname Rust
  343. \ | cd ~/Documents/forProgramming/Rust/Books/ ~/Projects/Rust/
  344. \ | tabnew
  345. \ | tabname Lua
  346. \ | cd ~/Documents/forProgramming/Lua/Books/ ~/Projects/Lua/
  347. \ | tabnew
  348. \ | tabname Haskell
  349. \ | cd ~/Documents/forProgramming/Haskell/Books/ ~/Projects/Haskell/
  350. \ | tabnext 1
  351. \ | tabclose
  352. command! openBackupDirs
  353. \ :tabonly
  354. \ | tabnew
  355. \ | tabname Backups
  356. \ | cd ~/OS/Linux/+backup/DropboxDesktop/Desktop/ ~/.config/
  357. \ | tabnew
  358. \ | tabname yay
  359. \ | cd ~/.cache/yay ~/.cache/yay_Backups
  360. \ | tabnew
  361. \ | tabname Kernel
  362. \ | cd ~/OS/Linux/+backup/Drivers/NVidia/GeForce9600GT/WorksOnLinuxKernel419/Kernel419/ /var/cache/pacman/pkg/
  363. \ | tabnext 1
  364. \ | tabclose
  365. "##############################################################################
  366. " Mappings
  367. "##############################################################################
  368. " Archives ---------------------------------------------------------------------
  369. nnoremap <wait> ,cz :!alacritty -e zip -9 -r %c.zip %f & <cr>
  370. nnoremap <wait> ,xz :!alacritty -e unzip %f & <cr>
  371. nnoremap <wait> ,ct :!alacritty -e tar -czvf %c.tar.gz %f & <cr>
  372. nnoremap <wait> ,xt :!alacritty -e tar -xzvf %f & <cr>
  373. " nnoremap <wait> ,cz :zip <cr>
  374. " nnoremap <wait> ,xz :unzip <cr>
  375. " nnoremap <wait> ,ct :tar <cr>
  376. " nnoremap <wait> ,xt :untar <cr>
  377. " Open all images in current directory in sxiv thumbnail mode ------------------
  378. nnoremap sx :!sxiv -t %d & <cr>
  379. " Open selected images in gimp -------------------------------------------------
  380. nnoremap gp :!gimp %f %i & <cr>
  381. " Start shell in current directory --------------------------------------------
  382. nnoremap s :shell<cr>
  383. " nohlsearch ------------------------------------------------------------------
  384. nnoremap ,nh :nohlsearch<cr>
  385. " Display sorting dialog ------------------------------------------------------
  386. nnoremap S :sort<cr>
  387. " Toggle visibility of preview window -----------------------------------------
  388. nnoremap w :view<cr>
  389. vnoremap w :view<cr>gv
  390. " Open file in the background using its default program -----------------------
  391. nnoremap gb :file &<cr>l
  392. " yank current directory path into the clipboard ------------------------------
  393. nnoremap yd :!echo -n %d | xclip -sel clipboard %i<cr>:echo expand('%"d') "is yanked to clipboard"<cr>
  394. " yank current file path into the clipboard -----------------------------------
  395. nnoremap yf :!echo -n %c:p | xclip -sel clipboard %i<cr>:echo expand('%"c:p') "is yanked to clipboard"<cr>
  396. " yank current filename without path into the clipboard -----------------------
  397. nnoremap yn :!echo -n %c | xclip -sel clipboard %i<cr>:echo expand('%"c') "is yanked to clipboard"<cr>
  398. " yank root of current file's name into the clipboard -------------------------
  399. nnoremap yr :!echo -n %c:r | xclip -sel clipboard %i<cr>:echo expand('%"c:r') "is yanked to clipboard"<cr>
  400. " Mappings for faster renaming ------------------------------------------------
  401. nnoremap I cw<c-a>
  402. nnoremap cc cw<c-u>
  403. nnoremap A cw
  404. " Open console in current directory -------------------------------------------
  405. " nnoremap <wait> ,t :!$TERMINAL &<cr>
  406. " Reload ----------------------------------------------------------------------
  407. nnoremap <wait> ,r :reload<cr>
  408. " Open bookmarks --------------------------------------------------------------
  409. nnoremap <wait> ,b :bmarks<cr>
  410. nnoremap <wait> ,bt :bmarks<space>
  411. " Open editor to edit vifmrc and apply settings after returning to vifm -------
  412. nnoremap <wait> ,ev :write | edit $MYVIFMRC | restart<cr>
  413. " Toggle wrap setting on ,w key -----------------------------------------------
  414. nnoremap <wait> ,w :set wrap!<cr>
  415. " Toggle detailed/brief information about files -------------------------------
  416. nnoremap <wait> ,ti :togglefilesinfo<cr>
  417. nnoremap <wait> ,tmi :togglefilesmoreinfo<cr>
  418. " Reset sort to +name ---------------------------------------------------------
  419. nnoremap <wait> ,s :resetsort<cr>
  420. " Mount/Unmount windows disks: /dev/sda1 (C) and /dev/sda2 (D) ----------------
  421. nnoremap <wait> ,mc :!~/.myScripts/winC_mount.sh<cr>
  422. nnoremap <wait> ,md :!~/.myScripts/winD_mount.sh<cr>
  423. nnoremap <wait> ,uc :!~/.myScripts/winC_unmount.sh<cr>
  424. nnoremap <wait> ,ud :!~/.myScripts/winD_unmount.sh<cr>
  425. " Quit ------------------------------------------------------------------------
  426. map <wait> <Esc><Esc> :q!<cr>
  427. " Quit all windows without saving
  428. nnoremap ,,q :qa!<cr>
  429. " Quit all windows with saving
  430. nnoremap ,,x :xa<cr>
  431. " Quit the current windows with saving
  432. nnoremap ,,z :x<cr>
  433. " Tabs ------------------------------------------------------------------------
  434. nnoremap ,to :tabnew<cr>
  435. nnoremap ,tx :tabclose<cr>
  436. nnoremap ,tp :tabprevious<cr>
  437. nnoremap <S-Tab> :tabprevious<cr>
  438. nnoremap <Tab> :tabnext<cr>
  439. nnoremap ,tn :tabnext<cr>
  440. nnoremap ,tr :tabname<space>
  441. nnoremap ,t1 1gt
  442. nnoremap ,t2 2gt
  443. nnoremap ,t3 3gt
  444. nnoremap ,t4 4gt
  445. nnoremap ,t5 5gt
  446. nnoremap ,t6 6gt
  447. nnoremap ,t7 7gt
  448. nnoremap ,t8 8gt
  449. nnoremap ,t9 9gt
  450. " Move focus between panes ----------------------------------------------------
  451. noremap <C-k> <C-w>k
  452. noremap <C-j> <C-w>j
  453. noremap <C-h> <C-w>h
  454. noremap <BS> <C-w>h
  455. noremap <C-l> <C-w>l
  456. " Adjust pane size (left for decreasing, right for increasing) ----------------
  457. nnoremap <left> <C-w><
  458. nnoremap <right> <C-w>>
  459. " Moving cursor in another pane -----------------------------------------------
  460. nnoremap <silent> J <tab>j<tab>
  461. nnoremap <silent> K <tab>k<tab>
  462. " Example of standard two-panel file managers mappings ------------------------
  463. nnoremap <f3> :!$TERMINAL -e bat --paging=always %f<cr>
  464. " nnoremap <f4> :edit<cr>
  465. nnoremap <f4> :!$TERMINAL -e vim %f &<cr>
  466. " nnoremap <f5> :copy<cr>
  467. " nnoremap <f6> :move<cr>
  468. nnoremap <f5> :cp<cr>
  469. nnoremap <f6> :mv<cr>
  470. nnoremap <f7> :mkdir<space>
  471. nnoremap <f10> :q<cr>
  472. " nnoremap <f11> :<cr>
  473. " nnoremap <f12> :<cr>
  474. " Midnight commander alike mappings -------------------------------------------
  475. " Open current directory in the other pane
  476. nnoremap <a-i> :sync<cr>
  477. " Open directory under cursor in the other pane
  478. nnoremap <a-o> :sync %c<cr>
  479. " Swap panes
  480. nnoremap <c-u> <c-w>x
  481. " " Try to open several tabs
  482. " tabname Rust
  483. " cd ~/Documents/forProgramming/Rust/Books/ ~/Projects/Rust/
  484. "
  485. " tabnew
  486. " tabname Lua
  487. " cd ~/Documents/forProgramming/Lua/Books/ ~/Projects/Lua/
  488. "
  489. " tabnew
  490. " tabname Haskell
  491. " cd ~/Documents/forProgramming/Haskell/Books/ ~/Projects/Haskell/
  492. "
  493. " " start on the first tab
  494. " tabnext 1