Permalink
Browse files

Updated bundles

  • Loading branch information...
1 parent 524b60d commit 8d2e23fc8f42fb036e043c0a86aaba2d35b16927 Tammer Saleh committed Dec 27, 2011
@@ -0,0 +1,44 @@
+!_TAG_FILE_ENCODING utf-8 //
+:AcpDisable acp.jax /*:AcpDisable*
+:AcpEnable acp.jax /*:AcpEnable*
+:AcpLock acp.jax /*:AcpLock*
+:AcpUnlock acp.jax /*:AcpUnlock*
+acp acp.jax /*acp*
+acp-about acp.jax /*acp-about*
+acp-author acp.jax /*acp-author*
+acp-commands acp.jax /*acp-commands*
+acp-contact acp.jax /*acp-contact*
+acp-installation acp.jax /*acp-installation*
+acp-introduction acp.jax /*acp-introduction*
+acp-options acp.jax /*acp-options*
+acp-perl-omni acp.jax /*acp-perl-omni*
+acp-snipMate acp.jax /*acp-snipMate*
+acp-usage acp.jax /*acp-usage*
+acp.txt acp.jax /*acp.txt*
+autocomplpop acp.jax /*autocomplpop*
+g:acp_behavior acp.jax /*g:acp_behavior*
+g:acp_behavior-command acp.jax /*g:acp_behavior-command*
+g:acp_behavior-completefunc acp.jax /*g:acp_behavior-completefunc*
+g:acp_behavior-meets acp.jax /*g:acp_behavior-meets*
+g:acp_behavior-onPopupClose acp.jax /*g:acp_behavior-onPopupClose*
+g:acp_behavior-repeat acp.jax /*g:acp_behavior-repeat*
+g:acp_behaviorCssOmniPropertyLength acp.jax /*g:acp_behaviorCssOmniPropertyLength*
+g:acp_behaviorCssOmniValueLength acp.jax /*g:acp_behaviorCssOmniValueLength*
+g:acp_behaviorFileLength acp.jax /*g:acp_behaviorFileLength*
+g:acp_behaviorHtmlOmniLength acp.jax /*g:acp_behaviorHtmlOmniLength*
+g:acp_behaviorKeywordCommand acp.jax /*g:acp_behaviorKeywordCommand*
+g:acp_behaviorKeywordIgnores acp.jax /*g:acp_behaviorKeywordIgnores*
+g:acp_behaviorKeywordLength acp.jax /*g:acp_behaviorKeywordLength*
+g:acp_behaviorPerlOmniLength acp.jax /*g:acp_behaviorPerlOmniLength*
+g:acp_behaviorPythonOmniLength acp.jax /*g:acp_behaviorPythonOmniLength*
+g:acp_behaviorRubyOmniMethodLength acp.jax /*g:acp_behaviorRubyOmniMethodLength*
+g:acp_behaviorRubyOmniSymbolLength acp.jax /*g:acp_behaviorRubyOmniSymbolLength*
+g:acp_behaviorSnipmateLength acp.jax /*g:acp_behaviorSnipmateLength*
+g:acp_behaviorUserDefinedFunction acp.jax /*g:acp_behaviorUserDefinedFunction*
+g:acp_behaviorUserDefinedMeets acp.jax /*g:acp_behaviorUserDefinedMeets*
+g:acp_behaviorXmlOmniLength acp.jax /*g:acp_behaviorXmlOmniLength*
+g:acp_completeOption acp.jax /*g:acp_completeOption*
+g:acp_completeoptPreview acp.jax /*g:acp_completeoptPreview*
+g:acp_enableAtStartup acp.jax /*g:acp_enableAtStartup*
+g:acp_ignorecaseOption acp.jax /*g:acp_ignorecaseOption*
+g:acp_mappingDriven acp.jax /*g:acp_mappingDriven*
@@ -155,6 +155,8 @@ Note that the following commands are only available in the NERD tree buffer.
:Bookmark <name>
Bookmark the current node as <name>. If there is already a <name>
bookmark, it is overwritten. <name> must not contain spaces.
+ If <name> is not provided, it defaults to the file or directory name.
+ For directories, a trailing slash is present.
:BookmarkToRoot <bookmark>
Make the directory corresponding to <bookmark> the new root. If a treenode
@@ -18,6 +18,13 @@ let g:loaded_nerdtree_fs_menu = 1
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
+
+if has("gui_mac") || has("gui_macvim")
+ call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
+ call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'})
+ call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'})
+endif
+
if g:NERDTreePath.CopyingSupported()
call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
endif
@@ -193,4 +200,25 @@ function! NERDTreeCopyNode()
redraw
endfunction
+function! NERDTreeQuickLook()
+ let treenode = g:NERDTreeFileNode.GetSelected()
+ if treenode != {}
+ call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'")
+ endif
+endfunction
+
+function! NERDTreeRevealInFinder()
+ let treenode = g:NERDTreeFileNode.GetSelected()
+ if treenode != {}
+ let x = system("open -R '" . treenode.path.str() . "'")
+ endif
+endfunction
+
+function! NERDTreeExecuteFile()
+ let treenode = g:NERDTreeFileNode.GetSelected()
+ if treenode != {}
+ let x = system("open '" . treenode.path.str() . "'")
+ endif
+endfunction
+
" vim: set sw=4 sts=4 et fdm=marker:
@@ -2,7 +2,7 @@
" File: NERD_tree.vim
" Description: vim global plugin that provides a nice tree explorer
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
-" Last Change: 1 December, 2009
+" Last Change: 31 August, 2011
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
@@ -27,6 +27,8 @@ let loaded_nerd_tree = 1
let s:old_cpo = &cpo
set cpo&vim
+let s:running_windows = has("win16") || has("win32") || has("win64")
+
"Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The
"variable is only initialised if it does not exist prior
@@ -66,7 +68,7 @@ call s:initVariable("g:NERDTreeShowFiles", 1)
call s:initVariable("g:NERDTreeShowHidden", 0)
call s:initVariable("g:NERDTreeShowLineNumbers", 0)
call s:initVariable("g:NERDTreeSortDirs", 1)
-call s:initVariable("g:NERDTreeDirArrows", 0)
+call s:initVariable("g:NERDTreeDirArrows", !s:running_windows)
if !exists("g:NERDTreeSortOrder")
let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$']
@@ -92,8 +94,6 @@ endif
call s:initVariable("g:NERDTreeWinPos", "left")
call s:initVariable("g:NERDTreeWinSize", 31)
-let s:running_windows = has("win16") || has("win32") || has("win64")
-
"init the shell commands that will be used to copy nodes, and remove dir trees
"
"Note: the space after the command is important
@@ -2658,46 +2658,9 @@ function! s:initNerdTreeInPlace(dir)
let b:NERDTreeRoot = s:TreeDirNode.New(path)
call b:NERDTreeRoot.open()
- "throwaway buffer options
- setlocal noswapfile
- setlocal buftype=nofile
- setlocal bufhidden=hide
- setlocal nowrap
- setlocal foldcolumn=0
- setlocal nobuflisted
- setlocal nospell
- if g:NERDTreeShowLineNumbers
- setlocal nu
- else
- setlocal nonu
- if v:version >= 703
- setlocal nornu
- endif
- endif
-
- iabc <buffer>
-
- if g:NERDTreeHighlightCursorline
- setlocal cursorline
- endif
-
- call s:setupStatusline()
-
- let b:treeShowHelp = 0
- let b:NERDTreeIgnoreEnabled = 1
- let b:NERDTreeShowFiles = g:NERDTreeShowFiles
- let b:NERDTreeShowHidden = g:NERDTreeShowHidden
- let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks
-
+ call s:setCommonBufOptions()
let b:NERDTreeType = "secondary"
- call s:bindMappings()
- setfiletype nerdtree
- " syntax highlighting
- if has("syntax") && exists("g:syntax_on")
- call s:setupSyntaxHighlighting()
- endif
-
call s:renderView()
endfunction
" FUNCTION: s:initNerdTreeMirror() {{{2
@@ -2897,37 +2860,7 @@ function! s:createTreeWin()
endif
setlocal winfixwidth
-
- "throwaway buffer options
- setlocal noswapfile
- setlocal buftype=nofile
- setlocal nowrap
- setlocal foldcolumn=0
- setlocal nobuflisted
- setlocal nospell
- if g:NERDTreeShowLineNumbers
- setlocal nu
- else
- setlocal nonu
- if v:version >= 703
- setlocal nornu
- endif
- endif
-
- iabc <buffer>
-
- if g:NERDTreeHighlightCursorline
- setlocal cursorline
- endif
-
- call s:setupStatusline()
-
- call s:bindMappings()
- setfiletype nerdtree
- " syntax highlighting
- if has("syntax") && exists("g:syntax_on")
- call s:setupSyntaxHighlighting()
- endif
+ call s:setCommonBufOptions()
endfunction
"FUNCTION: s:dumpHelp {{{2
@@ -3406,103 +3339,49 @@ function! s:saveScreenState()
endtry
endfunction
-"FUNCTION: s:setupStatusline() {{{2
-function! s:setupStatusline()
- if g:NERDTreeStatusline != -1
- let &l:statusline = g:NERDTreeStatusline
- endif
-endfunction
-"FUNCTION: s:setupSyntaxHighlighting() {{{2
-function! s:setupSyntaxHighlighting()
- "NERDTreeFlags are syntax items that should be invisible, but give clues as to
- "how things should be highlighted
- syn match NERDTreeFlag #\~#
- syn match NERDTreeFlag #\[RO\]#
-
- "highlighting for the .. (up dir) line at the top of the tree
- execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
-
- "highlighting for the ~/+ symbols for the directory nodes
- syn match NERDTreeClosable #\~\<#
- syn match NERDTreeClosable #\~\.#
- syn match NERDTreeOpenable #+\<#
- syn match NERDTreeOpenable #+\.#he=e-1
-
- "highlighting for the tree structural parts
- syn match NERDTreePart #|#
- syn match NERDTreePart #`#
- syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
-
- "quickhelp syntax elements
- syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
- syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
- syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag
- syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey
- syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey
- syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
- syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
-
- "highlighting for readonly files
- syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
-
- "highlighting for sym links
- syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
-
- "highlighing for directory nodes and file nodes
- syn match NERDTreeDirSlash #/#
- syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
- syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
- syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
- syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
- syn match NERDTreeCWD #^[</].*$#
-
- "highlighting for bookmarks
- syn match NERDTreeBookmark # {.*}#hs=s+1
-
- "highlighting for the bookmarks table
- syn match NERDTreeBookmarksLeader #^>#
- syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
- syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
- syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
-
- if g:NERDChristmasTree
- hi def link NERDTreePart Special
- hi def link NERDTreePartFile Type
- hi def link NERDTreeFile Normal
- hi def link NERDTreeExecFile Title
- hi def link NERDTreeDirSlash Identifier
- hi def link NERDTreeClosable Type
+"FUNCTION: s:setCommonBufOptions() {{{2
+function! s:setCommonBufOptions()
+ "throwaway buffer options
+ setlocal noswapfile
+ setlocal buftype=nofile
+ setlocal bufhidden=hide
+ setlocal nowrap
+ setlocal foldcolumn=0
+ setlocal nobuflisted
+ setlocal nospell
+ if g:NERDTreeShowLineNumbers
+ setlocal nu
else
- hi def link NERDTreePart Normal
- hi def link NERDTreePartFile Normal
- hi def link NERDTreeFile Normal
- hi def link NERDTreeClosable Title
+ setlocal nonu
+ if v:version >= 703
+ setlocal nornu
+ endif
endif
- hi def link NERDTreeBookmarksHeader statement
- hi def link NERDTreeBookmarksLeader ignore
- hi def link NERDTreeBookmarkName Identifier
- hi def link NERDTreeBookmark normal
+ iabc <buffer>
- hi def link NERDTreeHelp String
- hi def link NERDTreeHelpKey Identifier
- hi def link NERDTreeHelpCommand Identifier
- hi def link NERDTreeHelpTitle Macro
- hi def link NERDTreeToggleOn Question
- hi def link NERDTreeToggleOff WarningMsg
+ if g:NERDTreeHighlightCursorline
+ setlocal cursorline
+ endif
+
+ call s:setupStatusline()
- hi def link NERDTreeDir Directory
- hi def link NERDTreeUp Directory
- hi def link NERDTreeCWD Statement
- hi def link NERDTreeLink Macro
- hi def link NERDTreeOpenable Title
- hi def link NERDTreeFlag ignore
- hi def link NERDTreeRO WarningMsg
- hi def link NERDTreeBookmark Statement
- hi def link NERDTreeCurrentNode Search
+ let b:treeShowHelp = 0
+ let b:NERDTreeIgnoreEnabled = 1
+ let b:NERDTreeShowFiles = g:NERDTreeShowFiles
+ let b:NERDTreeShowHidden = g:NERDTreeShowHidden
+ let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks
+ setfiletype nerdtree
+ call s:bindMappings()
endfunction
+"FUNCTION: s:setupStatusline() {{{2
+function! s:setupStatusline()
+ if g:NERDTreeStatusline != -1
+ let &l:statusline = g:NERDTreeStatusline
+ endif
+endfunction
"FUNCTION: s:stripMarkupFromLine(line, removeLeadingSpaces){{{2
"returns the given line with all the tree parts stripped off
"
@@ -3645,7 +3524,7 @@ function! s:bindMappings()
"bind all the user custom maps
call s:KeyMap.BindAll()
- command! -buffer -nargs=1 Bookmark :call <SID>bookmarkNode('<args>')
+ command! -buffer -nargs=? Bookmark :call <SID>bookmarkNode('<args>')
command! -buffer -complete=customlist,s:completeBookmarks -nargs=1 RevealBookmark :call <SID>revealBookmark('<args>')
command! -buffer -complete=customlist,s:completeBookmarks -nargs=1 OpenBookmark :call <SID>openBookmark('<args>')
command! -buffer -complete=customlist,s:completeBookmarks -nargs=* ClearBookmarks call <SID>clearBookmarks('<args>')
@@ -3657,11 +3536,15 @@ endfunction
" FUNCTION: s:bookmarkNode(name) {{{2
" Associate the current node with the given name
-function! s:bookmarkNode(name)
+function! s:bookmarkNode(...)
let currentNode = s:TreeFileNode.GetSelected()
if currentNode != {}
+ let name = a:1
+ if empty(name)
+ let name = currentNode.path.getLastPathComponent(0)
+ endif
try
- call currentNode.bookmark(a:name)
+ call currentNode.bookmark(name)
call s:renderView()
catch /^NERDTree.IllegalBookmarkNameError/
call s:echo("bookmark names must not contain spaces")
Oops, something went wrong.

0 comments on commit 8d2e23f

Please sign in to comment.