放大啦资源网 http://www.fangdala.com
当前位置首页 > 百科资料> 正文

ranger

2023-01-20 20:12:09 暂无评论 百科资料

ranger是一个以给候班倒弦米重已GPL许可证发放源码,军方督聚既联若候里默认使用VIM风格键盘绑定、cu星鲜贵硫因艺维rses图形库,基于断西特尽烧字符终端的文件管理器,是自由免费软件。

  • 中文名称 ranger
  • 简介 用户制定对不同文件后缀文类型
  • 功能 并且支持文本、图片
  • 特点 操作简单,快捷键丰富

ranger简介

  它允许用户制定对不同文件后缀来自文类型以及文件夹所要执行的命令,可定制性强。文件目录结构有层次地展示,允许鼠标,并且支持文本、图片、PDF、XML以及视频信息预览。

主要特点

 英从伤足 ● UTF-8支持

  ● 多列显示

  ● 当前文件(夹)预览

  ● 常规文件操作(创建/改变属性/复制/删除/····就搞维路客按混··)

  ● 类VIM键盘绑定以及热键

  ● 文件执行程序自动选择

  ● 自动切换Shell所在目录

  ● 多标签、书签以及鼠标支持

软件优点

文件关粮国青罪照等家区坏基联简易

  比如Office文档使用LibreOffice打开:

  vim ~/.c来自onfig/ranger甲守地最们固/apps。py

  编辑如下即可

  if f.extension is not None:

  if f.extension in ('odt','doc','docx','xls','xlsx','ppt','pptx' ):

  retur报宽直械觉调n self.either(c, 'libreoffice')

操作简单,快捷键丰富

  鼠标可用,随意定制快捷键

对其他360百科软件依赖性弱

  主要依赖Python

依赖软件

要求:

  1,Python (tested with version 2.6, 2.7, 3.1, 3.2) with support for ncurses and (optiona国文亚果型假右太鸡成lly) wide-unicode.

  2,A pager 写结行滑等下还(less by default)

可选:

  1,file

  determining file types

  2,the python module chardet

  in case of encodin晚般考持反局g detection p知便减齐品roblems

  3,sudo

  to use the "run as root"-feature

  4,文件预览可选项(不推荐使用)

  ⑴,img2txt (from caca-utils) for previewing images

  ⑵,highlight for syntax highlighting of cod见备春白场缩田e

  ⑶,atool for previews of archives

  ⑷,lynx, w3m or elinks for previews of html pages

  ⑸,pdftotext for pdf p棉候单草直金reviews

  ⑹因西觉集守矛云段力,transmission-show for viewing bit-torrent information

  ⑺,mediainfo o满买衡愿凯吧益银就r exiftool for viewing infor置一杂推述重mation about media files

界面截敌业除海明

  依次为文本、目录钟土混台谁练以及图片预览

预览

开始配置

  1,选项设置

  ranger --c衡征什战控连斯县opy-config=opt技继客种了创ions获取~/.config/ranger/options。py

  2,按键绑定

  ranger --copy-config=rc 获取 ~/.config/ranger/rc.conf

  3,文件关联

  ranger --copy-config=apps 获取 ~/.config/ranger/apps。py

  4,预览设置

  ranger --copy-config=scope 获取 ~/.config/ranger/scope.。sh

  编辑时具体参考man ranger以及对应原始文件

常见问题

  1,不显示第一行打头的用户名以及主机名

  find /usr/ -name titlebar。py找到titlebar。py位置

  vim titlebar。py,找到:

  if self.env.username == 'root':

  clr = 'bad'

  else:

  clr = 'good'

  bar.add(self.env.username, 'hostname', clr, fixed=True)

  bar.add('@', 'hostname', clr, fixed=True)

  bar.add(self.env.hostname, 'hostname', clr, fixed=True)

  bar.add(':', 'hostname', clr, fixed=True)

  pathway = self.env.pathway

  if self.settings.tilde_in_titlebar and \

  self.fm.env.cwd.path.startswith(self.env.home_path):

  pathway = pathway[self.env.home_path.count('/')+1:]

  bar.add('~/', 'directory', fixed=True)

  屏蔽几条语句如下:

  # if self.env.username == 'root':

  # clr = 'bad'

  # else:

  # clr = 'good'

  # bar.add(self.env.username, 'hostname', clr, fixed=True)

  # bar.add('@', 'hostname', clr, fixed=True)

  # bar.add(self.env.hostname, 'hostname', clr, fixed=True)

  # bar.add(':', 'hostname', clr, fixed=True)

  pathway = self.env.pathway

  # if self.settings.tilde_in_titlebar and \

  # self.fm.env.cwd.path.startswith(self.env.home_path):

  # pathway = pathway[self.env.home_path.count('/')+1:]

  # bar.add('~/', 'directory', fixed=True)

  2,不加载默认设置,显示隐藏文件

  vim ~/.config/ranger/options。py

  load_default_rc = False

  show_hidden = True

猜你喜欢