Skip to content
Browse files

changed python list options to vim lists

  • Loading branch information...
1 parent 2c4a1fd commit 708793e1d736172a19aa6440741a79f5ae9f0fdf @troydm committed Oct 2, 2012
Showing with 11 additions and 14 deletions.
  1. +3 −6 doc/easytree.txt
  2. +8 −8 plugin/easytree.vim
View
9 doc/easytree.txt
@@ -49,19 +49,16 @@ g:easytree_highlight_cursor_line (Default: 1)
Highlight current line in easytree buffer
*g:easytree_ignore_dirs*
-g:easytree_ignore_dirs (Default: "['*.AppleDouble*','*.DS_Store*']")
+g:easytree_ignore_dirs (Default: ['*.AppleDouble*','*.DS_Store*'])
directory patterns present in the following list won't show up in easytree buffer
- this list is a standard Python complaint list of str objects
*g:easytree_ignore_files*
-g:easytree_ignore_files (Default: "['*.swp']")
+g:easytree_ignore_files (Default: ['*.swp'])
file patterns present in the following list won't show up in easytree buffer
- this list is a standard Python complaint list of str objects
*g:easytree_ignore_find_result*
-g:easytree_ignore_find_result (Default: "[]")
+g:easytree_ignore_find_result (Default: [])
file patterns present in the following list won't show up as find results
- this list is a standard Python complaint list of str objects
*g:easytree_hijack_netrw*
g:easytree_hijack_netrw (Default: 1)
View
16 plugin/easytree.vim
@@ -39,15 +39,15 @@ if !exists("g:easytree_highlight_cursor_line")
endif
if !exists("g:easytree_ignore_dirs")
- let g:easytree_ignore_dirs = "['*.AppleDouble*','*.DS_Store*']"
+ let g:easytree_ignore_dirs = ['*.AppleDouble*','*.DS_Store*']
endif
if !exists("g:easytree_ignore_files")
- let g:easytree_ignore_files = "['*.swp']"
+ let g:easytree_ignore_files = ['*.swp']
endif
if !exists("g:easytree_ignore_find_result")
- let g:easytree_ignore_find_result = "[]"
+ let g:easytree_ignore_find_result = []
endif
if !exists("g:easytree_hijack_netrw")
@@ -67,15 +67,15 @@ def EasyTreeFnmatchList(f,patterns):
def EasyTreeFind(pattern,dir,showhidden):
if not ('*' in pattern or '?' in pattern or '[' in pattern):
pattern = '*'+pattern+'*'
- ignore_find_result = eval(vim.eval('g:easytree_ignore_find_result'))
+ ignore_find_result = vim.eval('g:easytree_ignore_find_result')
filelist = EasyTreeList(dir,showhidden, lambda f: fnmatch.fnmatch(f,pattern))
filelist = filter(lambda f: not EasyTreeFnmatchList(f,ignore_find_result), filelist)
return filelist
def EasyTreeList(dir,showhidden,findfilter):
dir = os.path.expanduser(dir)
- ignore_dirs = eval(vim.eval('g:easytree_ignore_dirs'))
- ignore_files = eval(vim.eval('g:easytree_ignore_files'))
+ ignore_dirs = vim.eval('g:easytree_ignore_dirs')
+ ignore_files = vim.eval('g:easytree_ignore_files')
filelist = []
showhidden = int(showhidden) == 1
for root, dirs, files in os.walk(dir):
@@ -104,8 +104,8 @@ def EasyTreeList(dir,showhidden,findfilter):
def EasyTreeListDir(dir,showhidden):
dir = os.path.expanduser(dir)
- ignore_dirs = eval(vim.eval('g:easytree_ignore_dirs'))
- ignore_files = eval(vim.eval('g:easytree_ignore_files'))
+ ignore_dirs = vim.eval('g:easytree_ignore_dirs')
+ ignore_files = vim.eval('g:easytree_ignore_files')
for root, dirs, files in os.walk(dir):
if int(showhidden) == 0:
dirs = filter(lambda d: not d.startswith("."),dirs)

0 comments on commit 708793e

Please sign in to comment.
Something went wrong with that request. Please try again.