From 167abeb068a741a034edb8e0a3d99fd7698447d7 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sat, 8 Jun 2013 09:03:30 +0900 Subject: [PATCH] - Improved context filetype check. --- autoload/neosnippet.vim | 21 +++++++++++---------- doc/neosnippet.txt | 3 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index d788893..d418bfd 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: neosnippet.vim " AUTHOR: Shougo Matsushita -" Last Modified: 04 Jun 2013. +" Last Modified: 08 Jun 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 @@ -43,15 +43,6 @@ let s:neosnippet_options = [ \ '-runtime', \ '-vertical', '-horizontal', '-direction=', '-split', \] -" context_filetype.vim installation check. -if !exists('s:exists_context_filetype') - try - call context_filetype#version() - let s:exists_context_filetype = 1 - catch - let s:exists_context_filetype = 0 - endtry -endif "}}} function! neosnippet#initialize() "{{{ @@ -1049,6 +1040,16 @@ function! neosnippet#get_runtime_snippets_directory() "{{{ return copy(s:runtime_dir) endfunction"}}} function! neosnippet#get_filetype() "{{{ + if !exists('s:exists_context_filetype') + " context_filetype.vim installation check. + try + call context_filetype#version() + let s:exists_context_filetype = 1 + catch + let s:exists_context_filetype = 0 + endtry + endif + let context_filetype = \ s:exists_context_filetype ? \ context_filetype#get_filetype() : &filetype diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index e0045b8..dc54c8b 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -722,6 +722,9 @@ A: You can use |:NeoSnippetSource| for it. ============================================================================== CHANGELOG *neosnippet-changelog* +2013-06-08 +- Improved context filetype check. + 2013-06-05 - Improved documentation.