Don't insert marker character with o or O within a code block.
Previously if a code block was part of a list and o or O was used a new list marker would be inserted. Also moved the is_codeblock check function to utils file for use elsewhere.
This commit is contained in:
@ -93,3 +93,13 @@ function vimwiki#u#map_key(mode, key, plug, ...)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
function! vimwiki#u#is_codeblock(lnum)
|
||||
let syn_g = synIDattr(synID(a:lnum,1,1),'name')
|
||||
if syn_g =~# 'textSnip.*' || syn_g =~# 'VimwikiPre.*' || syn_g =~# '.*Comment'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user