Permalink
Browse files

Replaced <C-x><C-p> completion with omni completion (if &omnifunc is …

…empty), documented it

--HG--
branch : purgecxcp
  • Loading branch information...
1 parent 6e7790c commit d66aca012a951349bd2564f551582b22498dfcb0 @ZyX-I ZyX-I committed Jan 25, 2012
Showing with 8 additions and 9 deletions.
  1. +1 −8 autoload/vam.vim
  2. +7 −1 doc/vim-addon-manager.txt
View
@@ -364,13 +364,6 @@ command! -nargs=* -complete=customlist,vam#install#UninstallCompletion Uninstall
" plugin name completion function:
-augroup VAM
- function! s:CompleteAddonName()
- let savedof=&l:omnifunc
- let &l:omnifunc='vam#install#CompleteAddonName'
- return "\<C-x>\<C-o>\<C-r>=['', setbufvar('%', '&omnifunc', ".string(savedof).")][0]\n"
- endfunction
- autocmd FileType vim inoremap <buffer> <expr> <C-x><C-p> <SID>CompleteAddonName()
-augroup END
+autocmd FileType vim if empty(&omnifunc) | setlocal omnifunc=vam#install#CompleteAddonName | endif
" vim: et ts=8 sts=2 sw=2
@@ -244,7 +244,7 @@ Or overwrite the MergeSources function: >
------------------------------------------------------------------------------
-2.3 Example: personal configurable setup *VAM-complex-setup-sample*
+2.3 Example: personal configurable setup *VAM-complex-setup-sample*
>
call vam#ActivateAddons(["github:YOURNAME"],{'auto_install' : 0})
" this initializes Vim the way *you* want also loading more plugins:
@@ -411,6 +411,12 @@ vam#install#RewriteName({name}) *vam#install#RewriteName()*
"url": "git://github.com/{N}/{Repo}"}
git:{URL} {"type": "git", "url": {URL}} (experimental)
+vam#install#CompleteAddonName *vam#install#CompleteAddonName()*
+ Function suitable to be a completion function for omni completion
+ ('omnifunc'). Completes addon names. Value of 'omnifunction' option will
+ be set by VAM for files with “vim” filetype iff this option is empty (uses
+ |FileType| event).
+
==============================================================================
4. Options *VAM-options*
*g:vim_addon_manager*

0 comments on commit d66aca0

Please sign in to comment.