Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make all functions script local

  • Loading branch information...
commit 8551e06915e6d89bc7d9250b1bc38034ea780675 1 parent 61cf5d3
@randymorris authored
View
6 cycle_unicode_characters_in_insert_mode.vim
@@ -17,7 +17,7 @@ let g:unicode_list = [
\ [ 'U', 'Û', 'Ù', 'Ü' ],
\]
-function! CycleUnicode(mode)
+function! s:CycleUnicode(mode)
let char = matchstr(getline('.'), '.', col('.')-1)
for sublist in g:unicode_list
let idx = index(sublist, char)
@@ -36,5 +36,5 @@ function! CycleUnicode(mode)
endif
endfunction
-inoremap <f12> <esc>:call CycleUnicode('i')<enter><right>
-nnoremap <f12> :call CycleUnicode('n')<enter>
+inoremap <f12> <esc>:call <SID>CycleUnicode('i')<enter><right>
+nnoremap <f12> :call <SID>CycleUnicode('n')<enter>
View
4 lowercase_commands.vim
@@ -8,7 +8,7 @@ let s:command_line_substitutes = [
\ ['^h ', 'vertical help '],
\]
-function! CommandLineSubstitute()
+function! s:CommandLineSubstitute()
let cl = getcmdline()
if exists('s:command_line_substitutes') && getcmdtype() == ':'
for [k, v] in s:command_line_substitutes
@@ -21,4 +21,4 @@ function! CommandLineSubstitute()
return cl
endfunction
-cnoremap <enter> <c-\>eCommandLineSubstitute()<enter><enter>
+cnoremap <enter> <c-\>e<SID>CommandLineSubstitute()<enter><enter>
View
4 xml_tag_prompt.vim
@@ -2,10 +2,10 @@
" name then add the open/close pair at the current cursor position leaving the
" cursor in the tag in insert mode.
-function! GetTag()
+function! s:GetTag()
let tag = input("Tag: ")
execute "normal! i<".tag."></".tag.">"
execute "normal! " . repeat('h', strlen(tag)+2)
endfunction
-inoremap \tag <C-o>:call GetTag()<enter>
+inoremap \tag <C-o>:call <SID>GetTag()<enter>
Please sign in to comment.
Something went wrong with that request. Please try again.