Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdw/ranger-autojump
The combined magic of autojump, ranger and zsh
https://github.com/fdw/ranger-autojump
autojump hacktoberfest ranger ranger-plugin zsh zsh-plugin
Last synced: 2 months ago
JSON representation
The combined magic of autojump, ranger and zsh
- Host: GitHub
- URL: https://github.com/fdw/ranger-autojump
- Owner: fdw
- License: mit
- Created: 2018-12-02T13:08:19.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-02-26T12:47:08.000Z (11 months ago)
- Last Synced: 2024-08-01T15:14:57.518Z (5 months ago)
- Topics: autojump, hacktoberfest, ranger, ranger-plugin, zsh, zsh-plugin
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 71
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- ranger-awesome - ranger-autojump
README
# Ranger & Autojump
This plugin for ranger adds complete support for [autojump](https://github.com/wting/autojump) to [ranger](https://github.com/ranger/ranger):
Whenever a new directory is opened in ranger, autojump is notified and can change the weights accordingly.
Using `:j` you can use autojump to jump to a directory. This is made even better by adding `map cj console j%space` to your `rc.conf`. Thus typing `cj dirname` will let you jump to dirname.As an added bonus, there is a zsh plugin introducing a new function called `r`. Without arguments, it just opens ranger. If you supply an argument that is a directory, ranger is opened in that directory. But if you supply anything else as an argument, `autojump` is called with the argument and `ranger` is opened there 🧙
If you want similar functionality for [zoxide](https://github.com/ajeetdsouza/zoxide), you can try [ranger-zoxide](https://github.com/fdw/ranger-zoxide).
# Maintenance Mode
As autojump seems to be unmaintained and there's not really any features missing, this repo exists as-is. I will still look at PRs and issues, but don't expect too much.If you want similar functionality for [zoxide](https://github.com/ajeetdsouza/zoxide), you can try [ranger-zoxide](https://github.com/fdw/ranger-zoxide).
# Installation
### Ranger plugin
- Copy `autojump.py` to `${XDG_CONFIG_HOME}/ranger/plugins`.
- Add the following mapping to your `rc.conf` for convenience:
```
map cj console j%space
```### vim plugin (optional extra)
- To use autojump with vim, the [autojump.vim](https://github.com/trotter/autojump.vim) plugin can be installed. This can also be integrated with ZSH as shown below.### zsh plugin
- Install the zsh plugin using your favorite plugin manager, e.g.:
- [zgenom](https://github.com/jandamm/zgenom):
- `zgenom load fdw/ranger_autojump`
- [antigen](https://github.com/zsh-users/antigen):
- `antigen bundle fdw/ranger_autojump@main`
- [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh):
1. Clone this repository into oh-my-zsh's plugin directory:
```
git clone https://github.com/fdw/ranger-autojump ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/ranger-autojump
```
2. Activate the plugin in `~/.zshrc`:
```
plugins=( [plugins...] ranger-autojump)
```
- (Optional) For vim integration add the following convenience function to your .zshrc:
```
function jvim { file="$(AUTOJUMP_DATA_DIR=~/.autojump.vim/global autojump $@)"; if [ -n "$file" ]; then vim "$file"; fi }
```