All Projects → wellle → Tmux Complete.vim

wellle / Tmux Complete.vim

Licence: mit
Vim plugin for insert mode completion of words in adjacent tmux panes

Projects that are alternatives of or similar to Tmux Complete.vim

Visual Split.vim
Vim plugin to control splits with visual selections or text objects
Stars: ✭ 190 (-57.49%)
Mutual labels:  neovim, vim-plugin, vim-plugins, neovim-plugin
Context.vim
Vim plugin that shows the context of the currently visible buffer contents
Stars: ✭ 688 (+53.91%)
Mutual labels:  neovim, vim-plugin, vim-plugins, neovim-plugin
Targets.vim
Vim plugin that provides additional text objects
Stars: ✭ 2,114 (+372.93%)
Mutual labels:  neovim, vim-plugin, vim-plugins, neovim-plugin
Alchemist.vim
Elixir Integration Into Vim
Stars: ✭ 632 (+41.39%)
Mutual labels:  neovim, vim-plugin, vim-plugins, neovim-plugin
Vim Dadbod Completion
Database autocompletion powered by https://github.com/tpope/vim-dadbod
Stars: ✭ 163 (-63.53%)
Mutual labels:  neovim, vim-plugin, vim-plugins, neovim-plugin
Dashboard Nvim
vim dashboard
Stars: ✭ 294 (-34.23%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Ghost
Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
Stars: ✭ 245 (-45.19%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Dadbod Ui
Simple UI for https://github.com/tpope/vim-dadbod
Stars: ✭ 315 (-29.53%)
Mutual labels:  neovim, vim-plugins, neovim-plugin
vim-tmuxlike
A vim plugin that mimics the actions of tmux. 像操作Tmux一样操作Vim
Stars: ✭ 20 (-95.53%)
Mutual labels:  tmux, vim-plugin, vim-plugins
Vimux
easily interact with tmux from vim
Stars: ✭ 1,980 (+342.95%)
Mutual labels:  tmux, vim-plugin, vim-plugins
virt-column.nvim
Display a character as the colorcolumn
Stars: ✭ 64 (-85.68%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Vsnip
Snippet plugin for vim/nvim that supports LSP/VSCode's snippet format.
Stars: ✭ 224 (-49.89%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Indent Blankline.nvim
Indent guides for Neovim
Stars: ✭ 203 (-54.59%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Nvimux
Neovim as a TMUX replacement
Stars: ✭ 302 (-32.44%)
Mutual labels:  tmux, neovim, neovim-plugin
Vim Packager
Vim plugin manager that utilizes "jobs" and "pack" features.
Stars: ✭ 197 (-55.93%)
Mutual labels:  neovim, vim-plugins, neovim-plugin
onestatus
an api to customize tmux from vim
Stars: ✭ 82 (-81.66%)
Mutual labels:  tmux, vim-plugin, neovim-plugin
Vim Monokai Tasty
VIM Colour scheme
Stars: ✭ 279 (-37.58%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
format.nvim
Neovim lua plugin to format the current buffer with external executables
Stars: ✭ 189 (-57.72%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Lens.vim
A Vim Automatic Window Resizing Plugin
Stars: ✭ 381 (-14.77%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Blamer.nvim
A git blame plugin for neovim inspired by VS Code's GitLens plugin
Stars: ✭ 283 (-36.69%)
Mutual labels:  neovim, vim-plugin, neovim-plugin

tmux-complete.vim

Vim plugin for insert mode completion of words in adjacent tmux panes

Motivation

If you're using Vim in tandem with Tmux you might be familiar with this pesky situation:

You're happily editing your lovely files in Vim, when you notice you need to type a word that you can see in a different Tmux pane right next to Vim. This might 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 going into Tmux' copy mode, so you end typing it out again.

But fear no longer!

This plugin adds a completion function that puts all words visible in your Tmux panes right under your fingertips. Just enter insert mode, start typing any word you see and press <C-X><C-U> to the trigger user defined insert mode completion.

It also completes words that are scrolled off, hidden in background tmux windows and even different tmux sessions. And it even works from gvim or MacVim!

Third party integration

Tmux complete is automatically integrated with the following plugins:

  • asyncomplete

    To see tmux completions in your asyncomplete pop-up you will need the async plugin 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 to fine tune it. To start put a block like this into your vimrc:

    let g:tmuxcomplete#asyncomplete_source_options = {
                \ 'name':      'tmuxcomplete',
                \ 'whitelist': ['*'],
                \ 'config': {
                \     'splitmode':      'words',
                \     'filter_prefix':   1,
                \     'show_incomplete': 1,
                \     'sort_candidates': 0,
                \     'scrollback':      0,
                \     'truncate':        0
                \     }
                \ }
    

    With name you can change how it appears in the pop-up. whitelist makes it possible to enable this integration only for certain filetypes.

    The splitmode can be words, lines, ilines, or linies,words. ilines stands for "inner line", starting with a word character (ignoring special chararcters in front) and ilines,words completes both lines and words.

    If filter_prefix is enabled, we will filter candidates based on the entered text, this usually gives faster results. For fuzzy matching this should 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 as they come in. If you prefer to only see candidates once the list is complete, you can disable this by setting show_incomplete.

    sort_candidates controls whether we sort candidates from tmux externally. If it's enabled we can't get early incomplete results. If you have show_incomplete disabled, this might get slightly quicker results and potentially better sorted completions.

    If scrollback is positive we will consider that many lines in each tmux pane's history for completion.

    If 'truncate' is positive, then only prefixes of the matches up to this length are shown in the completion pop-up. Upon selection the full match is completed of course.

  • coc

    You can see tmux completions right in your coc pop-up.

  • ncm2

    You can see tmux completions right in your ncm2 pop-up.

  • neocomplete

    You can see tmux completions right in your neocomplete pop-up.

  • neocomplcache

    You can see tmux completions right in your neocomplcache pop-up.

  • deoplete

    You can see tmux completions right in your deoplete pop-up.

  • unite

    You can use tmux complete as a unite source:

    Unite tmuxcomplete       " opens a menu containing words from adjacent tmux windows
    Unite tmuxcomplete/lines " opens a menu containing words from adjacent tmux windows and lines where they were found
    

Installation

Use your favorite plugin manager.

  • Vim-plug

    Plug 'wellle/tmux-complete.vim'
    
  • NeoBundle

    NeoBundle 'wellle/tmux-complete.vim'
    
  • Vundle

    Bundle 'wellle/tmux-complete.vim'
    
  • Pathogen

    git clone git://github.com/wellle/tmux-complete.vim.git ~/.vim/bundle/tmux-complete.vim
    

Settings

Use the #trigger option to tune the way you interact with tmux-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>.

    let g:tmuxcomplete#trigger = 'completefunc'
    
  • Alternatively, you can use Vim's omnifunc, that can be invoked with <C-X><C-O>. This setting also integrates with YouCompleteMe so you can see Tmux completions when hitting <C-Space>.

    let g:tmuxcomplete#trigger = 'omnifunc'
    
  • If you're using the neocomplete, neocomplcache or deoplete integration, you probably don't need the additional trigger.

    let g:tmuxcomplete#trigger = ''
    

The trigger function itself is named tmuxcomplete#complete (in case you want to call it manually).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].