From 7bd0237c3f0b1085d03ffdedfabcd9dc1e1742e6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 18 May 2012 16:16:55 +0530 Subject: [PATCH] ... --- session.vim | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/session.vim b/session.vim index 2bc23acd88..e9cfc39c87 100644 --- a/session.vim +++ b/session.vim @@ -1,40 +1,9 @@ " Project wide builtins let $PYFLAKES_BUILTINS = "_,dynamic_property,__,P,I,lopen,icu_lower,icu_upper,icu_title,ngettext" -python << EOFPY -import os, sys - -import vipy - -source_file = vipy.vipy.eval('expand("")') -project_dir = os.path.dirname(source_file) -src_dir = os.path.abspath(os.path.join(project_dir, 'src')) -base_dir = os.path.join(src_dir, 'calibre') - -sys.path.insert(0, src_dir) -sys.resources_location = os.path.join(project_dir, 'resources') -sys.extensions_location = os.path.join(base_dir, 'plugins') -sys.executables_location = os.environ.get('CALIBRE_EXECUTABLES_PATH', '/usr/bin') - -vipy.session.initialize(project_name='calibre', src_dir=src_dir, - project_dir=project_dir, base_dir=project_dir) - -def recipe_title_callback(raw): - try: - raw = eval(raw) - if isinstance(raw, bytes): - raw = raw.decode('utf-8') - return raw.replace(u' ', u'_') - except: - print ('Failed to decode recipe title: %r'%raw) - raise - -vipy.session.add_content_browser('r', 'Recipe', - vipy.session.glob_based_iterator(os.path.join(project_dir, 'recipes', '*.recipe')), - vipy.session.regexp_based_matcher(r'title\s*=\s*(?P.+)', 'title', recipe_title_callback)) -EOFPY - fun! CalibreLog() + " Setup buffers to edit the calibre changelog and version info prior to + " making a release. enew read ! bzr log -l 500 set nomodifiable noswapfile buftype=nofile