Skip to content

Commit

Permalink
FZF fuzzy completion Vim
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Slusny <[email protected]>
  • Loading branch information
deathbeam committed Apr 5, 2017
1 parent 9cb76b5 commit 0011eba
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@
[submodule "vim/.vim/bundle/committia.vim"]
path = vim/.vim/bundle/committia.vim
url = https://github.com/rhysd/committia.vim
[submodule "vim/.vim/bundle/tmux-complete.vim"]
path = vim/.vim/bundle/tmux-complete.vim
url = https://github.com/wellle/tmux-complete.vim
[submodule "vim/.vim/bundle/editorconfig-vim"]
path = vim/.vim/bundle/editorconfig-vim
url = https://github.com/editorconfig/editorconfig-vim
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ To add your own Vim, Tmux or Zsh plugin you can just clone it to proper
insert mode completions with Tab
* [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks
for vim
* [tmux-complete.vim](https://github.com/wellle/tmux-complete.vim): Vim plugin
for insert mode completion of words in adjacent tmux panes
* [tsuquyomi](https://github.com/Quramy/tsuquyomi): A Vim plugin for TypeScript
* [ultisnips](https://github.com/SirVer/ultisnips): The ultimate snippet
solution for Vim
Expand Down
1 change: 0 additions & 1 deletion vim/.vim/bundle/tmux-complete.vim
Submodule tmux-complete.vim deleted from e74076
18 changes: 18 additions & 0 deletions vim/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ command! -bar Session :call Session()
" VimWiki
let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
let g:vimwiki_global_ext=0
let g:vimwiki_table_mappings = 0

" EditorConfig
let g:EditorConfig_core_mode = 'external_command' " Speed up editorconfig plugin
Expand Down Expand Up @@ -393,6 +394,23 @@ nmap <silent> <leader>mT :TestSuite<CR>
nmap <silent> <leader>mtt :TestNearest<CR>
" FZF {{{

" Fuzzy completion
function! FzfCompletionPop(findstart, base)
if !a:findstart
" let b:SuperTabChain = ( &omnifunc, &tmuxcomplete#complete, "<c-p>" )
" let res = SuperTabCodeComplete(a:findstart, a:base)
let l:res = function(&omnifunc)(a:findstart, a:base)
call fzf#complete(l:res)
endif

return ''
endfunction
set completefunc=FzfCompletionPop
imap <c-x><c-k> <plug>(fzf-complete-word)
imap <c-x><c-f> <plug>(fzf-complete-path)
imap <c-x><c-l> <plug>(fzf-complete-line)
" rg command suffix, [options]
function! VRg_raw(command_suffix, ...)
return call('fzf#vim#grep', extend(['rg --no-heading --column --color always '.a:command_suffix, 1], a:000))
Expand Down
2 changes: 1 addition & 1 deletion zsh/.zsh/bundle/ix.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ ix() {
}
echo "^C to cancel, ^D to send."
}
curl $opts -F f:1='<-' $* ix.io/$id
curl --http1.0 $opts -F f:1='<-' $* ix.io/$id
}

0 comments on commit 0011eba

Please sign in to comment.