Commit 89143d5

mo khan <mo@mokhan.ca>
2014-05-30 23:15:22
when renaming a variable use a full match.
1 parent f608c54
Changed files (1)
vimrc
@@ -145,7 +145,7 @@ function! InlineTemp()
   normal "ayiw
   normal $"byiW
   normal dd
-  exec ":.,/end/ s:\\<" . @a . "\\>:" . @b . ":gI"
+  exec ":.,/end/ s/\\<" . @a . "\\>/" . @b . "/gI"
   call setpos(".", cursor_position)
 endfunction
 
@@ -165,7 +165,7 @@ function! RenameVariable()
   let cursor_position = getpos(".")
   let name = input("new name: ")
   normal "ayiw
-  exec ":.,/end/ s/" . @a . '/' . name . '/'
+  exec ":.,/end/ s/\\<" . @a . "\\>/" . name . "/gI"
   call setpos(".", cursor_position)
 endfunction