- ranger
- Moving to Libera.Chat
- Version 1.9.3 released
- Version 1.9.2 released
- Dockerfile
- Version 1.9.1 released
- Version 1.9.0 released
- New maintainer!
- New design
- Ranger linux file manager
- Ranger. Лучший файловый менеджер для Linux.
- About Ranger
- Вкладки
- Shell
- Алиасы
- Сортировка
- Конфигурирование
- Аналог на С++
- Installing and Using Ranger, a Terminal File Manager, on a Ubuntu VPS
- Introduction
- Installing Ranger
- Using Ranger
- Navigation
- Working with Files
- Tabbed Browsing
- General Commands
- Command Interface
ranger
ranger is a console file manager with VI key bindings.
It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with rifle, a file launcher that is good at automatically finding out which program to use for what file type.
Moving to Libera.Chat
On May 19, Freenode staff lost their control of the network. This has been developing for a while and staffers set up Libera.Chat in case it happened. Foss revolves around people volunteering their time, as did the Freenode network. We have decided to move the #ranger channel because we believe the volunteer staffers have our best interests at heart.
The king is dead, long live the king!
Version 1.9.3 released
Version 1.9.3 is out, fixing some crashes. Introducing Űberzug image previews and duplicate filters for filter_stack.
Version 1.9.2 released
Version 1.9.2 is out, fixing some crashes due to python 3.6/3.7. Introducing native Kitty image previews and a dired-filter inspired filter stack.
Dockerfile
Finally, the much requested feature to integrate ranger with docker has been implemented! Simply install docker and type:
Et voilà! You now can enjoy ranger in a freshly baked docker container! 🙂
Version 1.9.1 released
Version 1.9.1 is out, fixing some regressions from 1.9.0 among other things.
Version 1.9.0 released
Version 1.9.0 is out now!
New maintainer!
Toon Nolten is now helping out to maintain ranger! 😀 For that, he was given full git access. We are now a team of four (Vifon, nfnty, Toon and hut.)
New design
I changed the website design to resemble the interface of ranger 🙂
Источник
Ranger linux file manager
ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with rifle , a file launcher that is good at automatically finding out which program to use for what file type.
For mc aficionados there’s also the multi-pane viewmode.
This file describes ranger and how to get it to run. For instructions on the usage, please read the man page ( man ranger in a terminal). See HACKING.md for development-specific information.
For configuration, check the files in ranger/config/ or copy the default config to
/.config/ranger with ranger —copy-config (see instructions).
The examples/ directory contains several scripts and plugins that demonstrate how ranger can be extended or combined with other programs. These files can be found in the git repository or in /usr/share/doc/ranger .
A note to packagers: Versions meant for packaging are listed in the changelog on the website.
- Authors: see AUTHORS file
- License: GNU General Public License Version 3
- Website: https://ranger.github.io/
- Download: https://ranger.github.io/ranger-stable.tar.gz
- Bug reports: https://github.com/ranger/ranger/issues
- git clone https://github.com/ranger/ranger.git
- An easily maintainable file manager in a high level language
- A quick way to switch directories and browse the file system
- Keep it small but useful, do one thing and do it well
- Console-based, with smooth integration into the unix shell
- UTF-8 Support (if your Python copy supports it)
- Multi-column display
- Preview of the selected file/directory
- Common file operations (create/chmod/copy/delete/. )
- Renaming multiple files at once
- VIM-like console and hotkeys
- Automatically determine file types and run them with correct programs
- Change the directory of your shell after exiting ranger
- Tabs, bookmarks, mouse support.
- Python ( >=2.6 or >=3.1 ) with the curses module and (optionally) wide-unicode support
- A pager ( less by default)
For general usage:
- file for determining file types
- chardet (Python package) for improved encoding detection of text files
- sudo to use the «run as root» feature
- python-bidi (Python package) to display right-to-left file names correctly (Hebrew, Arabic)
For enhanced file previews (with scope.sh ):
- img2txt (from caca-utils ) for ASCII-art image previews
- w3mimgdisplay , ueberzug , mpv , iTerm2 , kitty , terminology or urxvt for image previews
- convert (from imagemagick ) to auto-rotate images and for SVG previews
- ffmpeg , or ffmpegthumbnailer for video thumbnails
- highlight , bat or pygmentize for syntax highlighting of code
- atool , bsdtar , unrar and/or 7z to preview archives
- bsdtar , tar , unrar , unzip and/or zipinfo (and sed ) to preview archives as their first image
- lynx , w3m or elinks to preview html pages
- pdftotext or mutool (and fmt ) for textual pdf previews, pdftoppm to preview as image
- djvutxt for textual DjVu previews, ddjvu to preview as image
- calibre or epub-thumbnailer for image previews of ebooks
- transmission-show for viewing BitTorrent information
- mediainfo or exiftool for viewing information about media files
- odt2txt for OpenDocument text files ( odt , ods , odp and sxw )
- python or jq for JSON files
- fontimage for font previews
- openscad for 3D model previews ( stl , off , dxf , scad , csg )
Use the package manager of your operating system to install ranger. You can also install ranger through PyPI: pip install ranger-fm .
Check current version:
Installing from a clone
Note that you don’t have to install ranger; you can simply run ranger.py .
To install ranger manually:
This translates roughly to:
This also saves a list of all installed files to install_log.txt , which you can use to uninstall ranger.
After starting ranger, you can use the Arrow Keys or h j k l to navigate, Enter to open a file or q to quit. The third column shows a preview of the current file. The second is the main column and the first shows the parent directory.
Ranger can automatically copy default configuration files to
/.config/ranger if you run it with the switch —copy-config=( rc | scope | . | all ) . See ranger —help for a description of that switch. Also check ranger/config/ for the default configuration.
- To get the most out of ranger, read the Official User Guide.
- For frequently asked questions, see the FAQ.
- For more information on customization, see the wiki.
For help, support, or if you just want to hang out with us, you can find us here:
Источник
Ranger. Лучший файловый менеджер для Linux.
Ну давайте я вам расскажу про самый лучший файловый менеджер.
Я вообще пользовался mc, наутилусом, pcmanfm. Но остановился на Ranger.
Написан он на Python и поэтому он не очень быстрый. Да, ребята, программы на Python они не быстрые. Я сам этому не рад, но к сожалению это так. Я как-то в прошлом видео сказал это и люди на меня обиделись. Я не знаю на что тут обижаться. Это просто факт. Программа на C++ гораздо быстрее чем такая же программа на Python. Но у Python другие плюсы. На нем, например, сильно сокращается время разработки.
При этом нельзя сказать, что эти тормоза как-либо ощущаются. Например, программа на пайтоне может работать в 10 раз медленнее, чем программа на C++. При этом, например, у вас программа отрабатывает за одну тысячную секунды или одну сотую секунды. Вы все равно этого не замечаете.
About Ranger
Вообще преимущества этого менеджера в том, что он очень гибкий, легко настраивается и имеет хоткеи как у Vim. Если вы работаете в Vim, то для вас это будет вообще сказка.
Например, для того чтобы перейти в начало мы можем нажать gg , а чтобы в конец G
Чтобы переименовать файл нажимаем aa
Для навигации можно использовать все те же привычные H J K L
Для того, чтобы найти файл используем / как в Vim
i откроет файл с помощью просмотрщика, r откроет меню “открыть с помощью”
zh покажет скрытые файлы
С помощью прбела можно выбрать несколько файлов и делать с ними что-нибудь.
yy как в Vim скопирует, dd вырежет pp вставит
Вкладки
Есть удобная работа с вкладками
CTRL+N создаст новую вкладку
CTRL+W закроет текущую
tab перейдет на следующую вкладку SHIFT+tab предыдущую
Shell
Так же можно выполнять любую команду Ranger-a шелла через :
И обычную команду через !
Отличиются режимы тем, что через : запускаются именно функции Ranger, например в Ranger есть своя функция chmod и если мы напишем :chmod +x 1.sh то нам выдаст ошибку, так как там другой синтаксис.
Но если введем !chmod +x 1.sh то все будет нормально, так как выполнится стандартная шеловская команда chmod
Мы так же можем не писать имя если выполняем команду для выделенного файла. Можем сделать просто !chmod +x %f или мы можем выбрать несколько файлов и сделать для них для всех !chmod +x %s
Алиасы
В Ranger есть очень удобные алисы, задаются они подобным образом:
При нажатии на gd я перейду в
То есть я всегда знаю, что кнопка g это вроде “go” а вторая буква это директория в которую я перейду. Это очень удобно и легко запоминается.
По такой же аналогии и с точно такими же вторыми буквами есть создание нового таба через кнопку t , копирование через кнопку Y и перемещение через кнопку m
На алиас я могу добавить абсолютно любую свою команду. Я вот уже показывал вам, что я могу нажать прость x и файлик скопируется на мой сервер и ссылка у меня окажется в буфере обмена.
Или я могу нажать на кнопку Z и все выделенные файлы у меня запакуются в zip архив. Нажать на кнопку T и выделенные файлы запакуются в .tag.gz
Можно легко работать с изображениями, например C поворачивает картинку на 90 градусов по часовой стрелке, а F зеркалит картинку по горизонтали.
Сортировка
Сортировать файлы тоже довольно просто. os сортирует по размеру, ob по имени, om по времени создания файла, oc по времени изменения, ot по типу, oe по расширению.
Конфигурирование
Настраивается Ranger в трех файлах
rc.conf — в котором находятся все ваши горячие клавиши и то, что загружается вместе с ranger
rifle.conf — в котором вы определяете какой тип файла какой программой открывать
Аналог на С++
У Ranger есть форк на C++, который вроде бы еще в продакшене. По крайней мере когда я смотрел еще не было stable версии. Не помню как она называется. С удовольствием попробую ее, когда появится стабильная версия.
Источник
Installing and Using Ranger, a Terminal File Manager, on a Ubuntu VPS
Published on July 12, 2013
Introduction
Ranger is a terminal file manager with vim-like keybindings that uses the ncurses library to provide a powerful interface for your filesystem.
Ranger uses conventions common to both text-based file managers, such as Midnight Commander, and graphical file managers, such as Mac OS X’s Finder.
Installing Ranger
Ranger is in Ubuntu’s default repositories. It can be installed easily with apt-get.
We will also install some other applications that allow ranger to preview various file formats effectively.
Start ranger for a moment and exit. This will allow ranger to create the directory structure for its configuration files:
Now ranger has created its configuration directory and we can copy its configuration files with the following command:
If you would like to modify the configuration files later, you can locate them in
Using Ranger
Before we begin exploring the features of ranger, it would be helpful to have some example files to look at. Let’s acquire some files:
Now start ranger:
You should see a three column layout. This type of file tree representation is known as «Miller columns». It is a style that most people today would associate with Mac OS X’s «Finder» file manager.
The middle column is the current working directory. In this case, it should be showing your home directory.
The left pane is the current directory’s parent directory. The right pane shows a preview (if available) of the file you are currently interacting with in the middle column.
Ranger showing a gzipped text file in its preview pane.
If you move down the list of example files using the arrow keys, you will see how the preview pane changes depending on the file type you are viewing.
Text files are displayed in a simple pager, usually with the «less» program. Zipped files are automatically uncompressed and viewed in the same way. Even the example pdf file is converted to text for our viewing.
If you choose an image file, it is displayed using colored ascii art. The image clarity will depend a lot on your window size. If you expand the window, you should be able to see more detail.
Ranger showing an ascii representation of an image file in its preview pane.
Navigation
Ranger uses many of the same keybindings as «vim». For instance, the movement commands mirror vim closely:
- j = Move down
- k = Move up
- h = Move to parent directory
- gg = Go to the top of the list
- G = Go to the bottom of the list
- -f = Page down
- -b = Page up
- J = Page down 1/2 page
- K = Page up 1/2 page
- H = Go back through navigation history
- L = Go forward through navigation history
There are also some directory-specific shortcuts to move to common directories:
Working with Files
Ranger allows you to perform many different operations on files from within its interface. Here are some of the most common:
- i = Display file (useful if you’d like to view a text file in a pager instead of editing it)
- l or E = Open file (opens file in default file-handler)
- r = Open file with… (allows you to choose program to use)
- o = Change sort order (follow by character in menu selection)
- z = Change settings (commonly used toggle settings)
- zh = View hidden files
- = 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 selected file
Tagged and selected files in ranger’s current working directory.
Tabbed Browsing
Ranger also incorporates tabbed functionality to allow multiple viewports into the filesystem. Here are the most common tab control keys:
- -n = Create new tab
- -w = Close current tab
- = Next tab
- = Previous tab
General Commands
These commands control ranger itself:
- ? = View ranger man page
- 1? = Keybindings help
- 2? = Command help
- 3? = Settings help
- R = Reload current directory
- Q = Quit
Command Interface
Like vim, ranger also includes a robust command interface. This allows you to manipulate files in more complex ways. The abilities are extensive, so we will only be covering a few:
- ! = 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
There are a number of flags that you can pass to commands to modify the operation of the commands. They should be used with a dash «-» after typing «!» for shell commands or «:» for ranger commands:
- -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
Ranger also allows you to target specific files by substituting groups of files for command operations. It accomplishes that by using placeholders that will be expanded with the correct files upon execution:
- %f = Substitute highlighted file
- %d = Substitute current directory
- %s = Substitute currently selected files
- %t = Substitute currently tagged files
For example, if we wanted to change the names of multiple files, we could select them all with the space bar. After that, we can type:
This is a great way to rename multiple files. It gives you every file you’d like to change in a text editor. You simply modify as necessary and then exit out. The file manager will perform your changes when after you confirm.
Renaming with ranger’s bulkrename command.
Ranger allows us to mark different groups of files at the same time. This gives us great flexibility if we want to perform multiple operations based on different criteria.
Источник