From eaf19734e73dbaa5b30f10591079043b0eba0aab Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sat, 13 Apr 2013 20:32:25 +0100 Subject: [PATCH] move the class files out of the plugin dir On some new versions of vim these files were being loaded before the main NERD_tree.vim which was causing errors as dependencies werent loaded in time. Move the classes into lib - so vim wont try to load them until we tell it --- autoload/nerdtree.vim | 13 +++++++++++++ {plugin => lib}/nerdtree/bookmark.vim | 0 {plugin => lib}/nerdtree/creator.vim | 0 {plugin => lib}/nerdtree/key_map.vim | 0 {plugin => lib}/nerdtree/menu_controller.vim | 0 {plugin => lib}/nerdtree/menu_item.vim | 0 {plugin => lib}/nerdtree/opener.vim | 0 {plugin => lib}/nerdtree/path.vim | 0 {plugin => lib}/nerdtree/tree_dir_node.vim | 0 {plugin => lib}/nerdtree/tree_file_node.vim | 0 plugin/NERD_tree.vim | 10 +--------- 11 files changed, 14 insertions(+), 9 deletions(-) rename {plugin => lib}/nerdtree/bookmark.vim (100%) rename {plugin => lib}/nerdtree/creator.vim (100%) rename {plugin => lib}/nerdtree/key_map.vim (100%) rename {plugin => lib}/nerdtree/menu_controller.vim (100%) rename {plugin => lib}/nerdtree/menu_item.vim (100%) rename {plugin => lib}/nerdtree/opener.vim (100%) rename {plugin => lib}/nerdtree/path.vim (100%) rename {plugin => lib}/nerdtree/tree_dir_node.vim (100%) rename {plugin => lib}/nerdtree/tree_file_node.vim (100%) diff --git a/autoload/nerdtree.vim b/autoload/nerdtree.vim index 3da5566..3a2d71a 100644 --- a/autoload/nerdtree.vim +++ b/autoload/nerdtree.vim @@ -227,6 +227,19 @@ function! nerdtree#invokeKeyMap(key) call g:NERDTreeKeyMap.Invoke(a:key) endfunction +" FUNCTION: nerdtree#loadClassFiles() {{{2 +function! nerdtree#loadClassFiles() + runtime lib/nerdtree/path.vim + runtime lib/nerdtree/menu_controller.vim + runtime lib/nerdtree/menu_item.vim + runtime lib/nerdtree/key_map.vim + runtime lib/nerdtree/bookmark.vim + runtime lib/nerdtree/tree_file_node.vim + runtime lib/nerdtree/tree_dir_node.vim + runtime lib/nerdtree/opener.vim + runtime lib/nerdtree/creator.vim +endfunction + " FUNCTION: nerdtree#postSourceActions() {{{2 function! nerdtree#postSourceActions() call g:NERDTreeBookmark.CacheBookmarks(0) diff --git a/plugin/nerdtree/bookmark.vim b/lib/nerdtree/bookmark.vim similarity index 100% rename from plugin/nerdtree/bookmark.vim rename to lib/nerdtree/bookmark.vim diff --git a/plugin/nerdtree/creator.vim b/lib/nerdtree/creator.vim similarity index 100% rename from plugin/nerdtree/creator.vim rename to lib/nerdtree/creator.vim diff --git a/plugin/nerdtree/key_map.vim b/lib/nerdtree/key_map.vim similarity index 100% rename from plugin/nerdtree/key_map.vim rename to lib/nerdtree/key_map.vim diff --git a/plugin/nerdtree/menu_controller.vim b/lib/nerdtree/menu_controller.vim similarity index 100% rename from plugin/nerdtree/menu_controller.vim rename to lib/nerdtree/menu_controller.vim diff --git a/plugin/nerdtree/menu_item.vim b/lib/nerdtree/menu_item.vim similarity index 100% rename from plugin/nerdtree/menu_item.vim rename to lib/nerdtree/menu_item.vim diff --git a/plugin/nerdtree/opener.vim b/lib/nerdtree/opener.vim similarity index 100% rename from plugin/nerdtree/opener.vim rename to lib/nerdtree/opener.vim diff --git a/plugin/nerdtree/path.vim b/lib/nerdtree/path.vim similarity index 100% rename from plugin/nerdtree/path.vim rename to lib/nerdtree/path.vim diff --git a/plugin/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim similarity index 100% rename from plugin/nerdtree/tree_dir_node.vim rename to lib/nerdtree/tree_dir_node.vim diff --git a/plugin/nerdtree/tree_file_node.vim b/lib/nerdtree/tree_file_node.vim similarity index 100% rename from plugin/nerdtree/tree_file_node.vim rename to lib/nerdtree/tree_file_node.vim diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 6c19a3f..5bee03a 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -136,15 +136,7 @@ call s:initVariable("g:NERDTreeMapUpdirKeepOpen", "U") call s:initVariable("g:NERDTreeMapCWD", "CD") "SECTION: Load class files{{{2 -runtime plugin/nerdtree/path.vim -runtime plugin/nerdtree/menu_controller.vim -runtime plugin/nerdtree/menu_item.vim -runtime plugin/nerdtree/key_map.vim -runtime plugin/nerdtree/bookmark.vim -runtime plugin/nerdtree/tree_file_node.vim -runtime plugin/nerdtree/tree_dir_node.vim -runtime plugin/nerdtree/opener.vim -runtime plugin/nerdtree/creator.vim +call nerdtree#loadClassFiles() " SECTION: Commands {{{1 "============================================================