turn all =~ into =~# or =~?; !~ analogically

This commit is contained in:
EinfachToll
2015-02-09 20:47:11 +01:00
parent 6716ba709f
commit e4de62b7d5
7 changed files with 87 additions and 87 deletions

View File

@ -185,7 +185,7 @@ endfunction "}}}
"Returns: level of the line
"0 is the 'highest' level
function! s:get_level(lnum) "{{{
if getline(a:lnum) =~ '^\s*$'
if getline(a:lnum) =~# '^\s*$'
return 0
endif
if VimwikiGet('syntax') !=? 'media'
@ -207,7 +207,7 @@ function! s:guess_kind_of_numbered_item(item) "{{{
let number_chars = a:item.mrkr[:-2]
let divisor = a:item.mrkr[-1:]
if number_chars =~ '\d\+'
if number_chars =~# '\d\+'
return '1'
endif
if number_chars =~# '\l\+'
@ -1286,7 +1286,7 @@ endfunction "}}}
function! vimwiki#lst#kbd_O() "{{{
normal! Ox
let cur_ln = line('.')
if getline(cur_ln+1) !~ '^\s*$'
if getline(cur_ln+1) !~# '^\s*$'
call s:clone_marker_from_to(cur_ln+1, cur_ln)
else
call s:clone_marker_from_to(cur_ln-1, cur_ln)
@ -1365,7 +1365,7 @@ function! s:cr_on_list_item(lnum, insert_new_marker, not_at_eol) "{{{
if a:insert_new_marker
"the ultimate feature of this script: make new marker on <CR>
normal! gi


call s:clone_marker_from_to(a:lnum, a:lnum+1)
"tiny sweet extra feature: indent next line if current line ends with :
if !a:not_at_eol && getline(a:lnum) =~# ':$'
@ -1393,17 +1393,17 @@ function! vimwiki#lst#kbd_cr(normal, just_mrkr) "{{{
if has_bp == 1
call s:cr_on_empty_list_item(lnum, a:just_mrkr)
return
return
endif
let insert_new_marker = (a:normal == 1 || a:normal == 3)
if getline('.')[col("'^")-1:] =~ '^\s\+$'
if getline('.')[col("'^")-1:] =~# '^\s\+$'
let cur_col = 0
else
let cur_col = col("$") - col("'^")
if getline('.')[col("'^")-1] =~# '\s' && exists("*strdisplaywidth")
let ws_behind_cursor =
\ strdisplaywidth(matchstr(getline('.')[col("'^")-1:], '\s\+'),
\ strdisplaywidth(matchstr(getline('.')[col("'^")-1:], '\s\+'),
\ virtcol("'^")-1)
let cur_col -= ws_behind_cursor
endif
@ -1450,7 +1450,7 @@ function! vimwiki#lst#toggle_list_item() "{{{
endif
endif
"set cursor position s.t. it's on the same char as before
"set cursor position s.t. it's on the same char as before
let new_cur_col = col("$") - cur_col_from_eol
call cursor(cur_item.lnum, new_cur_col >= 1 ? new_cur_col : 1)