From e14e19102e9850eba58dc21c6f769ae523650193 Mon Sep 17 00:00:00 2001 From: Jack Mudge Date: Fri, 2 Sep 2016 12:02:56 -0700 Subject: [PATCH] Added support for use with motion commands by separating nmap and omap, it's possible for combinations such as d/, y/, etc. to work correctly with SearchComplete enabled. This modifies the plugin to support this behavior. --- plugin/SearchComplete.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/SearchComplete.vim b/plugin/SearchComplete.vim index 8e950c6..b12c37e 100644 --- a/plugin/SearchComplete.vim +++ b/plugin/SearchComplete.vim @@ -18,6 +18,8 @@ " Simply drop this file into your $HOME/.vim/plugin directory. " " Changelog: +" 2016-09-02 - v1.2 (Jack Mudge ) +" Fixed so that it works with motion commands " 2002-11-08 v1.1 " Convert to unix eol " 2002-11-05 v1.0 @@ -39,7 +41,9 @@ let loaded_search_complete = 1 "-------------------------------------------------- " Key mappings "-------------------------------------------------- -noremap / :call SearchCompleteStart()/ +onoremap / /=SearchCompleteStart() +nnoremap / :call SearchCompleteStart()/ + "-------------------------------------------------- @@ -49,6 +53,7 @@ function! SearchCompleteStart() cnoremap :call SearchComplete()/s cnoremap :call SearchCompleteStop() cnoremap :call SearchCompleteStop() + return '' " Enables expression to use this function for omap endfunction "--------------------------------------------------