aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/autoload/quote.vim2
-rw-r--r--vim/filetype.vim2
-rw-r--r--vim/scripts.vim2
3 files changed, 3 insertions, 3 deletions
diff --git a/vim/autoload/quote.vim b/vim/autoload/quote.vim
index 35df76a4..2343b12a 100644
--- a/vim/autoload/quote.vim
+++ b/vim/autoload/quote.vim
@@ -27,7 +27,7 @@ function! quote#QuoteOpfunc(type) abort
" Only add a space after the quote character if this line isn't already
" quoted with the same character
- let l:new = stridx(l:cur, l:char) == 0
+ let l:new = l:cur[0] == l:char
\ ? l:char.l:cur
\ : l:char.' '.l:cur
call setline(l:li, l:new)
diff --git a/vim/filetype.vim b/vim/filetype.vim
index 192a7283..541976f4 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -45,7 +45,7 @@ endfunction
" Check whether the first line was changed and looks like a shebang, and if
" so, re-run filetype detection
function! s:CheckShebang()
- if line('''[') == 1 && stridx(getline(1), '#!') == 0
+ if line('''[') == 1 && getline(1) =~# '^#!'
doautocmd filetypedetect BufRead
endif
endfunction
diff --git a/vim/scripts.vim b/vim/scripts.vim
index ae792ada..f79fa74c 100644
--- a/vim/scripts.vim
+++ b/vim/scripts.vim
@@ -6,7 +6,7 @@
let s:line = getline(1)
" If it's not a shebang, we're done
-if stridx(s:line, '#!') != 0
+if s:line !~# '^#!'
finish
endif