turn all == into ==# or ==? when comparing strings

or vimwiki#path#is_equal, if the strings are file names
This commit is contained in:
EinfachToll
2015-02-09 20:05:25 +01:00
parent b240b52a3f
commit 9ada4d2041
9 changed files with 62 additions and 59 deletions

View File

@ -134,11 +134,11 @@ function! vimwiki#tbl#get_cells(line) "{{{
for idx in range(strlen(a:line))
" The only way I know Vim can do Unicode...
let ch = a:line[idx]
if state == 'NONE'
if state ==# 'NONE'
if ch == '|'
let state = 'CELL'
endif
elseif state == 'CELL'
elseif state ==# 'CELL'
if ch == '[' || ch == '{'
let state = 'BEFORE_QUOTE_START'
let quote = ch
@ -148,7 +148,7 @@ function! vimwiki#tbl#get_cells(line) "{{{
else
let cell .= ch
endif
elseif state == 'BEFORE_QUOTE_START'
elseif state ==# 'BEFORE_QUOTE_START'
if ch == '[' || ch == '{'
let state = 'QUOTE'
let quote .= ch
@ -157,12 +157,12 @@ function! vimwiki#tbl#get_cells(line) "{{{
let cell .= quote.ch
let quote = ''
endif
elseif state == 'QUOTE'
elseif state ==# 'QUOTE'
if ch == ']' || ch == '}'
let state = 'BEFORE_QUOTE_END'
endif
let quote .= ch
elseif state == 'BEFORE_QUOTE_END'
elseif state ==# 'BEFORE_QUOTE_END'
if ch == ']' || ch == '}'
let state = 'CELL'
endif
@ -495,7 +495,7 @@ function! vimwiki#tbl#kbd_shift_tab() "{{{
endfunction "}}}
function! vimwiki#tbl#format(lnum, ...) "{{{
if !(&filetype == 'vimwiki')
if !(&filetype ==? 'vimwiki')
return
endif
let line = getline(a:lnum)
@ -570,7 +570,7 @@ function! vimwiki#tbl#align_or_cmd(cmd) "{{{
endfunction "}}}
function! vimwiki#tbl#reset_tw(lnum) "{{{
if !(&filetype == 'vimwiki')
if !(&filetype ==? 'vimwiki')
return
endif
let line = getline(a:lnum)