Commit 3d77b47
Changed files (1)
ftplugin
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>