Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Commit

Permalink
Keep functions as locals
Browse files Browse the repository at this point in the history
  • Loading branch information
5long committed Oct 23, 2011
1 parent 8dd90f3 commit 857569e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/ryve.vim
Expand Up @@ -3,13 +3,13 @@ if exists("g:loaded_ryve") || &cp
endif
let g:loaded_ryve = 1

function! SearchAMotion(type, ...)
function! s:SearchAMotion(type, ...)
silent exec 'normal! `[v`]y'
let @/ = @"
call search(@")
endfunction

function! ReplaceMotion(type, ...)
function! s:ReplaceMotion(type, ...)
let l:str_to_lay = @"
silent exec 'normal! `[v`]d'
let l:deleted = @"
Expand All @@ -18,5 +18,5 @@ function! ReplaceMotion(type, ...)
let @" = l:deleted
endfunction

nnoremap g/ :set opfunc=SearchAMotion<CR>g@
nnoremap gr :set opfunc=ReplaceMotion<CR>g@
nnoremap g/ :set opfunc=<SID>SearchAMotion<CR>g@
nnoremap gr :set opfunc=<SID>ReplaceMotion<CR>g@

0 comments on commit 857569e

Please sign in to comment.