summaryrefslogtreecommitdiff
path: root/ftplugin/ruby.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/ruby.vim')
-rw-r--r--ftplugin/ruby.vim16
1 files changed, 8 insertions, 8 deletions
diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim
index aa1a619..5f71c87 100644
--- a/ftplugin/ruby.vim
+++ b/ftplugin/ruby.vim
@@ -1,4 +1,4 @@
-function! AddParameter()
+function! s:AddParameter()
let name = input("parameter name: ")
let cursor_position = getpos(".")
@@ -16,7 +16,7 @@ function! AddParameter()
call setpos(".", cursor_position)
endfunction
-function! InlineTemp()
+function! s:InlineTemp()
let cursor_position = getpos(".")
normal "ayiw
normal $"byiW
@@ -25,7 +25,7 @@ function! InlineTemp()
call setpos(".", cursor_position)
endfunction
-function! ExtractLet()
+function! s:ExtractLet()
let cursor_position = getpos(".")
normal 0
normal! dd
@@ -37,7 +37,7 @@ function! ExtractLet()
normal jw
endfunction
-function! RenameVariable()
+function! s:RenameVariable()
let cursor_position = getpos(".")
let name = input("new name: ")
normal "ayiw
@@ -45,10 +45,10 @@ function! RenameVariable()
call setpos(".", cursor_position)
endfunction
-command! RAddParameter call AddParameter()
-command! RInlineTemp call InlineTemp()
-command! RExtractLet call ExtractLet()
-command! RRenameVariable call RenameVariable()
+command! RAddParameter call s:AddParameter()
+command! RInlineTemp call s:InlineTemp()
+command! RExtractLet call s:ExtractLet()
+command! RRenameVariable call s:RenameVariable()
" run rspec test
nnoremap <leader>run :!rspec %<cr>