- Notifications
You must be signed in to change notification settings - Fork21
Vim plugin for insert mode completion of words in adjacent tmux panes
License
wellle/tmux-complete.vim
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Vim plugin for insert mode completion of words in adjacent tmux panes
If you're using Vim in tandem with Tmux you might be familiar with this peskysituation:
You're happily editing your lovely files in Vim, when you notice you need totype a word that you can see in a different Tmux pane right next to Vim. Thismight be some secret key found in your REPL or the name of a failing test.
Usually the interesting text is too short to warrant switching panes and goinginto Tmux' copy mode, so you end typing it out again.
This plugin adds a completion function that puts all words visible in your Tmuxpanes right under your fingertips. Just enter insert mode, start typing anyword you see and press<C-X><C-U> to the trigger user defined insert modecompletion.
It also completes words that are scrolled off, hidden in background tmuxwindows and even different tmux sessions. And it even works from gvim orMacVim!
Tmux complete is automatically integrated with the following plugins:
To see tmux completions in your asyncomplete pop-up you will need the asyncplugin as well:
Plug'prabirshrestha/async.vim'Plug'prabirshrestha/asyncomplete.vim'Plug'wellle/tmux-complete.vim'
This integration comes with sensible defaults, but you have some options tofine tune it. To start put a block like this into your vimrc:
letg:tmuxcomplete#asyncomplete_source_options= {\'name':'tmuxcomplete',\'whitelist': ['*'],\'config': {\'splitmode':'words',\'filter_prefix':1,\'show_incomplete':1,\'sort_candidates':0,\'scrollback':0,\'truncate':0\ }\}
With
nameyou can change how it appears in the pop-up.whitelistmakesit possible to enable this integration only for certain filetypes.The
splitmodecan bewords,lines,ilines, orlinies,words.ilinesstands for "inner line", starting with a word character (ignoringspecial chararcters in front) andilines,wordscompletes both lines andwords.If
filter_prefixis enabled, we will filter candidates based on theentered text, this usually gives faster results. For fuzzy matching thisshould be disabled.If there you are using many tmux windows with a lot of text in it,completion can be slow. That's why we start showing candidates as soon asthey come in. If you prefer to only see candidates once the list iscomplete, you can disable this by setting
show_incomplete.sort_candidatescontrols whether we sort candidates from tmux externally.If it's enabled we can't get early incomplete results. If you haveshow_incompletedisabled, this might get slightly quicker results andpotentially better sorted completions.If
scrollbackis positive we will consider that many lines in each tmuxpane's history for completion.If 'truncate' is positive, then only prefixes of the matches up to thislength are shown in the completion pop-up. Upon selection the full match iscompleted of course.
You can see tmux completions right in your coc pop-up.
You can see tmux completions right in your ncm2 pop-up.
You can see tmux completions right in your neocomplete pop-up.
You can see tmux completions right in your neocomplcache pop-up.
You can see tmux completions right in your deoplete pop-up.
You can use tmux complete as a unite source:
Unite tmuxcomplete" opens a menu containing words from adjacent tmux windowsUnite tmuxcomplete/lines" opens a menu containing words from adjacent tmux windows and lines where they were found
You can use tmux complete as a compe source:
letg:compe.source.tmux=v:true
Use your favorite plugin manager.
Plug'wellle/tmux-complete.vim'NeoBundle'wellle/tmux-complete.vim'Bundle'wellle/tmux-complete.vim'git clone git://github.com/wellle/tmux-complete.vim.git~/.vim/bundle/tmux-complete.vim
Use the#trigger option to tune the way you interact withtmux-complete by putting one of these lines into your.vimrc:
By default, tmux-complete sets Vim's
completefunc, that can be invoked with<C-X><C-U>.letg:tmuxcomplete#trigger='completefunc'
Alternatively, you can use Vim's
omnifunc, that can be invoked with<C-X><C-O>. This setting also integrates withYouCompleteMe so you can seeTmux completions when hitting<C-Space>.letg:tmuxcomplete#trigger='omnifunc'
If you're using theneocomplete,neocomplcache ordeoplete integration, you probablydon't need the additional trigger.
letg:tmuxcomplete#trigger=''
The trigger function itself is namedtmuxcomplete#complete (in case you wantto call it manually).
About
Vim plugin for insert mode completion of words in adjacent tmux panes
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors14
Uh oh!
There was an error while loading.Please reload this page.

