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

This commit is contained in:
EinfachToll 2015-02-09 20:24:18 +01:00
parent 9ada4d2041
commit 6716ba709f
3 changed files with 17 additions and 17 deletions

View File

@ -303,7 +303,7 @@ function! vimwiki#base#resolve_scheme(lnk, as_html, ...) " {{{ Resolve scheme
" default link for directories
if vimwiki#path#is_link_to_dir(lnk)
let ext = (g:vimwiki_dir_link != '' ? g:vimwiki_dir_link. ext : '')
let ext = (g:vimwiki_dir_link != '' ? g:vimwiki_dir_link . ext : '')
endif
elseif scheme =~ 'diary'
if a:as_html
@ -423,7 +423,7 @@ function! vimwiki#base#open_link(cmd, link, ...) "{{{
endif
let update_prev_link = ( (scheme == '' || scheme =~ 'wiki' || scheme =~ 'diary')
\ && lnk != expand('%:t:r')
\ && !vimwiki#path#is_equal(lnk, expand('%:t:r'))
\ ? 1 : 0)
let use_system_open = (
@ -1319,7 +1319,7 @@ function! vimwiki#base#rename_link() "{{{
" restore wiki buffers
for bitem in blist
if bitem[0] != cur_buffer[0]
if !vimwiki#path#is_equal(bitem[0], cur_buffer[0])
call s:open_wiki_buffer(bitem)
endif
endfor
@ -1751,16 +1751,16 @@ endfunction " }}}
" s:clean_url
function! s:clean_url(url) " {{{
let url = split(a:url, '/\|=\|-\|&\|?\|\.')
let url = filter(url, 'v:val != ""')
let url = filter(url, 'v:val != "www"')
let url = filter(url, 'v:val != "com"')
let url = filter(url, 'v:val != "org"')
let url = filter(url, 'v:val != "net"')
let url = filter(url, 'v:val != "edu"')
let url = filter(url, 'v:val != "http\:"')
let url = filter(url, 'v:val != "https\:"')
let url = filter(url, 'v:val != "file\:"')
let url = filter(url, 'v:val != "xml\:"')
let url = filter(url, 'v:val !=# ""')
let url = filter(url, 'v:val !=# "www"')
let url = filter(url, 'v:val !=# "com"')
let url = filter(url, 'v:val !=# "org"')
let url = filter(url, 'v:val !=# "net"')
let url = filter(url, 'v:val !=# "edu"')
let url = filter(url, 'v:val !=# "http\:"')
let url = filter(url, 'v:val !=# "https\:"')
let url = filter(url, 'v:val !=# "file\:"')
let url = filter(url, 'v:val !=# "xml\:"')
return join(url, " ")
endfunction " }}}

View File

@ -966,7 +966,7 @@ function! s:process_tag_h(line, id) "{{{
let h_id = s:safe_html_anchor(h_text)
let centered = (a:line =~ '^\s')
if h_text != g:vimwiki_toc_header
if h_text !=# g:vimwiki_toc_header
let a:id[h_level-1] = [h_text, a:id[h_level-1][1]+1]

View File

@ -188,7 +188,7 @@ function! s:get_level(lnum) "{{{
if getline(a:lnum) =~ '^\s*$'
return 0
endif
if VimwikiGet('syntax') != 'media'
if VimwikiGet('syntax') !=? 'media'
let level = indent(a:lnum)
else
let level = s:string_length(matchstr(getline(a:lnum), s:rx_bullet_chars))-1
@ -1112,7 +1112,7 @@ endfunction "}}}
function! s:set_new_mrkr(item, new_mrkr) "{{{
if a:item.type == 0
call s:substitute_rx_in_line(a:item.lnum, '^\s*\zs\ze', a:new_mrkr.' ')
if indent(a:item.lnum) == 0 && VimwikiGet('syntax') != 'media'
if indent(a:item.lnum) == 0 && VimwikiGet('syntax') !=? 'media'
call s:set_indent(a:item.lnum, vimwiki#lst#get_list_margin())
endif
else
@ -1223,7 +1223,7 @@ function! s:clone_marker_from_to(from, to) "{{{
if item_from.type == 0 | return | endif
let new_mrkr = item_from.mrkr . ' '
call s:substitute_rx_in_line(a:to, '^\s*', new_mrkr)
let new_indent = ( VimwikiGet('syntax') != 'media' ? indent(a:from) : 0 )
let new_indent = ( VimwikiGet('syntax') !=? 'media' ? indent(a:from) : 0 )
call s:set_indent(a:to, new_indent)
if item_from.cb != ''
call s:create_cb(s:get_item(a:to))