easyjump.tmux
easyjump.tmux copied to clipboard
EasyMotion for Tmux
easyjump.tmux
EasyMotion for Tmux
Demonstration
📹: https://asciinema.org/a/372086
This project is heavily inspired by tmux-jump.
There some differences between tmux-jump and easyjump.tmux:
easyjump.tmuxcan be integrated into Vim/Neovim! 🔥 See Integration with Vim for more details.easyjump.tmuxsupports the smart case-insensitive search (turned on by default).tmux-jumpsearches by 1 char andeasyjump.tmuxdoes by 2 chars.tmux-jumponly matches the prefixes of words,easyjump.tmuxmatches all substrings.tmux-jumpis implemented in Ruby andeasyjump.tmuxis done in Python 3 with type hints.
Requirements
- Tmux >= 3.0
- Python >= 3.8
Windows is not supported now.
Installation
-
-
Add to
~/.tmux.conf:set-option -g @plugin "roy2220/easyjump.tmux" -
Press
prefix+ I to install the plugin.
-
-
Manual
-
Fetch the source:
git clone https://github.com/roy2220/easyjump.tmux.git /PATH/TO/DIR -
Add to
~/.tmux.conf:run-shell "/PATH/TO/DIR/easyjump.tmux" -
Reload Tmux configuration:
tmux source ~/.tmux.conf
-
Usage
- Press
prefix+ j to invoke EasyJump. - Press Ctrl + j to invoke EasyJump in
copy mode. - Press Enter to cancel EasyJump.
Configuration
defaults:
set-option -g @easyjump-key-binding "j"
set-option -g @easyjump-smart-case "on"
set-option -g @easyjump-label-chars "fjdkslaghrueiwoqptyvncmxzb1234567890"
set-option -g @easyjump-label-attrs "\e[1m\e[38;5;172m"
set-option -g @easyjump-text-attrs "\e[0m\e[38;5;237m"
set-option -g @easyjump-auto-begin-selection "on"
Note: @easyjump-label-attrs/@easyjump-text-attrs is escape sequence for text coloring and formatting,
see https://misc.flogisoft.com/bash/tip_colors_and_formatting for more information.
Integration with Vim
Vim 8 or Neovim is required.
Demonstration in Vim
📹: https://asciinema.org/a/372879
Installation in Vim
-
- Add to
~/.vimrc:
Plug 'roy2220/easyjump.tmux'- Just
:PlugInstall
- Add to
-
Manual
-
Fetch the source:
git clone https://github.com/roy2220/easyjump.tmux.git /PATH/TO/DIR -
Add to
~/.vimrc:source /PATH/TO/DIR/plugin/easyjump.vim -
Reload Vim configuration:
:source ~/.vimrc
-
Usage in Vim
- Press Ctrl + j to invoke EasyJump in
normal mode,insert mode,visual modeoroperator-pending mode. - Press Enter to cancel EasyJump.
Configuration in Vim
defaults:
let g:easyjump_smart_case = v:true
let g:easyjump_label_chars = 'fjdkslaghrueiwoqptyvncmxzb1234567890'
let g:easyjump_label_attrs = "\e[1m\e[38;5;172m"
let g:easyjump_text_attrs = "\e[0m\e[38;5;237m"
nmap <C-J> <Plug>EasyJump
imap <C-J> <Plug>EasyJump
vmap <C-J> <Plug>EasyJump
omap <C-J> <Plug>EasyJump
Note: g:easyjump_label_attrs/g:easyjump_text_attrs is escape sequence for text coloring and formatting,
see https://misc.flogisoft.com/bash/tip_colors_and_formatting for more information.