- Fixed #190 regexp feature.

This commit is contained in:
Shougo Matsushita 2013-11-18 12:02:49 +09:00
parent b59609c74e
commit afa9ecc176

View File

@ -1,7 +1,7 @@
"=============================================================================
" FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 12 Nov 2013.
" Last Modified: 18 Nov 2013.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@ -1012,16 +1012,17 @@ function! neosnippet#get_snippets() "{{{
call extend(snippets, s:snippets[filetype], 'keep')
endfor
let cur_text = neosnippet#util#get_cur_text()
if mode() ==# 'i'
" Special filters.
let cur_text = neosnippet#util#get_cur_text()
if !s:is_beginning_of_line(cur_text)
call filter(snippets, '!v:val.options.head')
endif
call filter(snippets, "cur_text =~ get(v:val, 'regexp', '')")
endif
call filter(snippets, "cur_text =~# get(v:val, 'regexp', '')")
return snippets
endfunction"}}}
function! neosnippet#get_snippets_directory() "{{{