Skip to content

PsychoLlama/teleport.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teleport.vim

Build Status

Navigate faster with frecency.

Purpose

Teleport.vim integrates with programs like z and autojump to provide the same navigational magic inside Vim.

:pwd " ./projects/app-name
:Z dotf
:pwd " ~/dotfiles

If those programs don't sound familiar, here's the 30-second pitch:
There's a competing set of command line tools that do pretty much the same thing. They alias cd, remember your most common directories, and let you jump ("teleport") to that directory by passing a substring. It'll filter the directories by your search term and jump to the one which is most frecent.

If you aren't using something like that, stop what you're doing, forget this vim plugin, and just install the CLI tool. It's a massive productivity boost. I recommend zoxide.

Installation

vim-plug

Plug 'PsychoLlama/teleport.vim'

Vundle

Plugin 'PsychoLlama/teleport.vim'

Pathogen

git clone https://github.com/PsychoLlama/teleport.vim ~/.vim/bundle/teleport.vim

Integrations

teleport.vim is compatible with several different implementations.

If you use the oh-my-zsh framework, teleport.vim will work out of the box. You're good to go 🚀

If not, you'll need to explicitly provide a path to your z installation. Add this to your vimrc:

let teleport#path = expand('~/path/to/z/z.sh')

Where ~/path/to/z/z.sh is replaced with the actual file path.

There's also a lua-based implementation of z. Configuration is nearly identical. Just put this in your vimrc:

let teleport#path = expand('~/path/to/z.lua/z.lua')

Where ~/path/to/z.lua/z.lua is the actual file path, wherever you installed it.

Zoxide is automatically detected - you don't have to do anything.

In order to get the j alias, you're probably sourcing an autojump file in your bash/zsh/fish setup. Find that file and set it in your vimrc:

let teleport#path = expand('~/path/to/autojump.sh')

Setting the integration

If you have more than one of these installed (why???) there's a chance teleport.vim could choose the wrong one. You can force it to use a particular driver by setting teleport#driver.

let teleport#driver = 'z' " rupa/z
let teleport#driver = 'z.lua' " skywind3000/z.lua
let teleport#driver = 'zoxide' " ajeetdsouza/zoxide
let teleport#driver = 'autojump' " wting/autojump

If you don't see your favorite program listed here, feel free to open a request!

Documentation

In traditional vim fashion, the documentation is kept in a help page. After installing the plugin, run:

:help teleport.vim