Commits

Evgeny Podjachev committed 2609f48

Updated plugins. Fixed cpp folding.

  • Participants
  • Parent commits 7fb7b5f

Comments (0)

Files changed (428)

.vim/bundle/cpp-vim/syntax/c.vim

 endif
 
 if &filetype ==# 'cpp' && !exists("cpp_no_cpp11")
-  syntax region	cBadBlock		start="{" end="}" transparent fold
+  syntax region	cBadBlock		start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold
 else
   syntax region	cBadBlock	keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold
 endif

.vim/bundle/nerdtree/.git/FETCH_HEAD

-3a8310a60bd165841e768d2569c98d40066c35df		branch 'master' of https://github.com/scrooloose/nerdtree
+40d05ace57fb51cc2c2b2e9eb81c4832ed291630		branch 'master' of https://github.com/scrooloose/nerdtree
 57ccede2509ed5c421cc7baacc9fade973069cd6	not-for-merge	branch 'refactor-open' of https://github.com/scrooloose/nerdtree

.vim/bundle/nerdtree/.git/ORIG_HEAD

-1dc3891f960c25aa3f23aa46f5afc8d41db38233
+40d05ace57fb51cc2c2b2e9eb81c4832ed291630

.vim/bundle/nerdtree/.git/index

Binary file modified.

.vim/bundle/nerdtree/.git/logs/HEAD

 3e44d4ea5c3d8cfa192e66c77afd05629ddc92e6 22de74a45bf0c2b07ec149da215526a8516c24d2 evgeny <evgeny.podjachev@gmail.com> 1352029644 +0400	pull: Fast-forward
 22de74a45bf0c2b07ec149da215526a8516c24d2 1dc3891f960c25aa3f23aa46f5afc8d41db38233 evgeny <evgeny.podjachev@gmail.com> 1354360757 +0400	pull: Fast-forward
 1dc3891f960c25aa3f23aa46f5afc8d41db38233 3a8310a60bd165841e768d2569c98d40066c35df evgeny <evgeny.podjachev@gmail.com> 1356371303 +0400	pull: Fast-forward
+3a8310a60bd165841e768d2569c98d40066c35df c3b63d2fd9c929359231363bcabc880ba29eb96e evgeny <evgeny.podjachev@gmail.com> 1358517562 +0400	pull: Fast-forward
+c3b63d2fd9c929359231363bcabc880ba29eb96e 40d05ace57fb51cc2c2b2e9eb81c4832ed291630 evgeny <evgeny.podjachev@gmail.com> 1361264632 +0400	pull: Fast-forward

.vim/bundle/nerdtree/.git/logs/refs/heads/master

 3e44d4ea5c3d8cfa192e66c77afd05629ddc92e6 22de74a45bf0c2b07ec149da215526a8516c24d2 evgeny <evgeny.podjachev@gmail.com> 1352029644 +0400	pull: Fast-forward
 22de74a45bf0c2b07ec149da215526a8516c24d2 1dc3891f960c25aa3f23aa46f5afc8d41db38233 evgeny <evgeny.podjachev@gmail.com> 1354360757 +0400	pull: Fast-forward
 1dc3891f960c25aa3f23aa46f5afc8d41db38233 3a8310a60bd165841e768d2569c98d40066c35df evgeny <evgeny.podjachev@gmail.com> 1356371303 +0400	pull: Fast-forward
+3a8310a60bd165841e768d2569c98d40066c35df c3b63d2fd9c929359231363bcabc880ba29eb96e evgeny <evgeny.podjachev@gmail.com> 1358517562 +0400	pull: Fast-forward
+c3b63d2fd9c929359231363bcabc880ba29eb96e 40d05ace57fb51cc2c2b2e9eb81c4832ed291630 evgeny <evgeny.podjachev@gmail.com> 1361264632 +0400	pull: Fast-forward

.vim/bundle/nerdtree/.git/logs/refs/remotes/origin/master

 3e44d4ea5c3d8cfa192e66c77afd05629ddc92e6 22de74a45bf0c2b07ec149da215526a8516c24d2 Evgeny Podjachev <evgeny@linux-dzvi.(none)> 1352029644 +0400	pull: fast-forward
 22de74a45bf0c2b07ec149da215526a8516c24d2 1dc3891f960c25aa3f23aa46f5afc8d41db38233 Evgeny Podjachev <evgeny@linux-dzvi.(none)> 1354360757 +0400	pull: fast-forward
 1dc3891f960c25aa3f23aa46f5afc8d41db38233 3a8310a60bd165841e768d2569c98d40066c35df Evgeny Podjachev <evgeny@linux-dzvi.(none)> 1356371303 +0400	pull: fast-forward
+3a8310a60bd165841e768d2569c98d40066c35df c3b63d2fd9c929359231363bcabc880ba29eb96e evgeny <evgeny@localhost.(none)> 1358517562 +0400	pull: fast-forward
+c3b63d2fd9c929359231363bcabc880ba29eb96e 40d05ace57fb51cc2c2b2e9eb81c4832ed291630 evgeny <evgeny@localhost.(none)> 1361264632 +0400	pull: fast-forward

.vim/bundle/nerdtree/.git/objects/03/255985461a8e0adf1818375bcc2235647b9d14

Binary file added.

.vim/bundle/nerdtree/.git/objects/08/54328a1ce0e67c0bcbc5a787030b3cabfca84c

Binary file added.

.vim/bundle/nerdtree/.git/objects/08/ae9975a610252da898f085b02e9654bea6cd11

Binary file added.

.vim/bundle/nerdtree/.git/objects/0d/37b4786cc8d2286edd2b1bd66bf10bd1b64620

Binary file added.

.vim/bundle/nerdtree/.git/objects/15/4f7aae7b880264544eb1b6089ba1c5243789f1

+x��1n�0S��GR<�� �;]����

.vim/bundle/nerdtree/.git/objects/18/17ccdb57d3d1314cd60aaceb063f14cd9f23a2

+x��MK�@

.vim/bundle/nerdtree/.git/objects/1a/033fea2266815d2fe2828302d88f4c9ca2826c

Binary file added.

.vim/bundle/nerdtree/.git/objects/1b/1a231d57e63a712f53d3f5a2141cb80bffbaf4

Binary file added.

.vim/bundle/nerdtree/.git/objects/1d/893f5b041353812c21662cbf132050c85178fb

Binary file added.

.vim/bundle/nerdtree/.git/objects/23/4bdede7b6e400786d9fce93189c48757a71809

Binary file added.

.vim/bundle/nerdtree/.git/objects/25/b80b8a16bcea662117b2a5dcfc1169dd740c77

Binary file added.

.vim/bundle/nerdtree/.git/objects/25/f103491c225ae2a0df2baf25b412976b16e57b

Binary file added.

.vim/bundle/nerdtree/.git/objects/29/d3db8ffe795e1b2d29c3333fe52f71acd4c9be

Binary file added.

.vim/bundle/nerdtree/.git/objects/2c/ecedfa2e628819b43bdbc0cd5c123935690d18

Binary file added.

.vim/bundle/nerdtree/.git/objects/2e/ff928e7ca9aab73ef3a8ec8f2ece1a8628d1d3

Binary file added.

.vim/bundle/nerdtree/.git/objects/2f/8d0cb402e85f14f6c41a1ed6a97cf3061267af

Binary file added.

.vim/bundle/nerdtree/.git/objects/36/6e2d4adda417925e35435d15047abc28f9e703

Binary file added.

.vim/bundle/nerdtree/.git/objects/37/0f180ca0d24da5861b4b5c017567a9914ef8df

+x��Mj1
+��-���d�U����`g��3���)�A�{���Zk�G��3(�Z'&D缲�G�%F�	s��]5~tH�!KJ9��)��q&ti	��x�VFox������Z���r�R�Ta����V)�)����Gm�1r�:�����x+���C�

.vim/bundle/nerdtree/.git/objects/3b/8e699a4fc1c9f5befc1992c70d6b2cf1524ddc

Binary file added.

.vim/bundle/nerdtree/.git/objects/3c/2b5a4a945d1f2b552485d2bb8b35960108de4e

Binary file added.

.vim/bundle/nerdtree/.git/objects/3c/38c729ee04d13a315e6daddc72fcdc0722a1dd

+x+)JMU025a040031Q�K�,�L��/Je0�q�}��Kw�
+s�(I�Of8��u���w��|k�1g��|���'!�y�E)%@G�䔦g�1�z�}ݒ������ї��K��Oㅨ�*���s�_ҕ5_����y�fl(DAqe^IbæWD_���2�ʗ������׏DHo

.vim/bundle/nerdtree/.git/objects/40/d05ace57fb51cc2c2b2e9eb81c4832ed291630

Binary file added.

.vim/bundle/nerdtree/.git/objects/46/983dddffcaa81783f35d1f11b04fa030a5f88a

Binary file added.

.vim/bundle/nerdtree/.git/objects/49/dd5afaa177a011ebef9832e74dbe491c752c36

Binary file added.

.vim/bundle/nerdtree/.git/objects/4c/f83fd5ae36360e02378b699078baedc66b67d0

Binary file added.

.vim/bundle/nerdtree/.git/objects/51/0f8bec6e3dd102d5f857801de1aeae13e4406e

Binary file added.

.vim/bundle/nerdtree/.git/objects/51/31d8ea39c6bffcd6e489a7cae5e23a4ca80004

Binary file added.

.vim/bundle/nerdtree/.git/objects/58/bb0138140ebc9c41db237274ea7d249b273734

Binary file added.

.vim/bundle/nerdtree/.git/objects/5a/dc9601595c35f745b46feb926f7139efc09444

Binary file added.

.vim/bundle/nerdtree/.git/objects/5b/463cc32d99ebc07dcc713b1a05abd06f7d4417

Binary file added.

.vim/bundle/nerdtree/.git/objects/60/3da53f2765fba5d6831ed8d60257294026a187

Binary file added.

.vim/bundle/nerdtree/.git/objects/60/869deab44f02b241c6f8154770f126f3198bfa

Binary file added.

.vim/bundle/nerdtree/.git/objects/62/9338c8d906e84db22d7366230f241831158865

Binary file added.

.vim/bundle/nerdtree/.git/objects/63/becf5a0ca6bd802bc81c65ac3eccee88004196

Binary file added.

.vim/bundle/nerdtree/.git/objects/64/cb6204ccfeaa0ea73c946e0082b4da138f4a72

Binary file added.

.vim/bundle/nerdtree/.git/objects/66/7c20b4ccc120369ffdbddb588c8109c6afecbe

Binary file added.

.vim/bundle/nerdtree/.git/objects/68/d50215b61e3cf465991d5ef341dbe06879eb50

Binary file added.

.vim/bundle/nerdtree/.git/objects/6b/5246f94cdab59d272e6f3dd9499a4ec8011587

Binary file added.

.vim/bundle/nerdtree/.git/objects/6c/19a3faedcf2330c284f45a27b4427e0d72be76

Binary file added.

.vim/bundle/nerdtree/.git/objects/6f/b9d9e39c49375d28b98ecd4709c1fc591278bc

Binary file added.

.vim/bundle/nerdtree/.git/objects/76/22302e2648918062e646a04698cda04cbeb490

Binary file added.

.vim/bundle/nerdtree/.git/objects/77/a50235e23f59c4dac8f672bd002226b391fdf4

Binary file added.

.vim/bundle/nerdtree/.git/objects/7c/baee253ad4e3888c241e0fcc47cb50e277ca39

+x���N�0E��#Q��?"!D�Z
+D��c&D�qp
+�B��|���\�

.vim/bundle/nerdtree/.git/objects/82/f6a4892ed5dcefbc62f8a9d3f3879e9a5382b3

Binary file added.

.vim/bundle/nerdtree/.git/objects/83/d3b49b8c0b6d6ca1e4aa22241be65a4d95bf95

Binary file added.

.vim/bundle/nerdtree/.git/objects/85/688bec20540589144a201c1109d0bb05047743

Binary file added.

.vim/bundle/nerdtree/.git/objects/86/4576528566cf1acb5f8ddc5b11de57d2469428

Binary file added.

.vim/bundle/nerdtree/.git/objects/86/6c2653746b8ed8ab967de2132051141126864e

Binary file added.

.vim/bundle/nerdtree/.git/objects/8a/984260e75f85869fcf897575f3950380410f92

Binary file added.

.vim/bundle/nerdtree/.git/objects/8b/853d413308f44a72b299696bf0721d82626fc6

Binary file added.

.vim/bundle/nerdtree/.git/objects/8c/01339ccf103bb644c011da28c866ad15f59617

Binary file added.

.vim/bundle/nerdtree/.git/objects/90/65ac8bcdcdd29dfcbd3033bef83446cc002bb6

Binary file added.

.vim/bundle/nerdtree/.git/objects/94/7d5e167a99958a0efe2484d006a0af745ab0b8

Binary file added.

.vim/bundle/nerdtree/.git/objects/97/d3906730049ebb44cdccf11d20529408f3cd08

Binary file added.

.vim/bundle/nerdtree/.git/objects/9e/7b303535aa40510d064288c0b17020e029bce7

Binary file added.

.vim/bundle/nerdtree/.git/objects/9e/f0b28daa3a3137710de05ef3dc336e20647ea5

Binary file added.

.vim/bundle/nerdtree/.git/objects/9f/4beb3c9a74a8e87efe16f2cf981cb0f3f92c24

Binary file added.

.vim/bundle/nerdtree/.git/objects/9f/8f4dc257e6db9f711cbcd5ca7d1c409fd5b0ba

Binary file added.

.vim/bundle/nerdtree/.git/objects/a4/07e0c8d84575e2b24442878b6d5b8ac333e060

Binary file added.

.vim/bundle/nerdtree/.git/objects/a7/bfb959d8fc3177cccae0e0db6e3d704ad1e028

Binary file added.

.vim/bundle/nerdtree/.git/objects/a7/d5b3dbc137cf42f723622a5b726e5d5f9376f6

+x��AN�0EY�#�(�R;��HU
+���]�i��#�S�W�

.vim/bundle/nerdtree/.git/objects/ab/8d37198c8199c6895cf4c0de3b79d56c099077

Binary file added.

.vim/bundle/nerdtree/.git/objects/ae/0ee84852597175542eb93fde7b497708190ab7

Binary file added.

.vim/bundle/nerdtree/.git/objects/af/c2f62eb9feb683117544189d92d306110e5100

Binary file added.

.vim/bundle/nerdtree/.git/objects/b1/137f43404d7298de2c5361dcddbe9786a9c0d6

Binary file added.

.vim/bundle/nerdtree/.git/objects/b1/6728623c99f032b3df292c9c3336922587473b

Binary file added.

.vim/bundle/nerdtree/.git/objects/b3/2edb2715799453c8f35b921d8d0d36a5a16ab7

Binary file added.

.vim/bundle/nerdtree/.git/objects/b4/e634f41cd0b9dc845481cbc3377eede9541da4

Binary file added.

.vim/bundle/nerdtree/.git/objects/b8/f69dcac1e9cc28dd61d69f9559a00382349a3e

Binary file added.

.vim/bundle/nerdtree/.git/objects/b9/1560ebd09aad3dfaa3f9792e4d14fafa2f050a

Binary file added.

.vim/bundle/nerdtree/.git/objects/bb/82acb21bcd825460f71cc770154ce41db5476b

Binary file added.

.vim/bundle/nerdtree/.git/objects/bc/c0d4fc5e20718657cfd32c24a1df49d7db1f0c

Binary file added.

.vim/bundle/nerdtree/.git/objects/bd/b4ec95d98fd33171fab91e01ae826df31f0ec7

Binary file added.

.vim/bundle/nerdtree/.git/objects/c1/5a304df4c42a37a1069f3e71c482a0c5d2532f

Binary file added.

.vim/bundle/nerdtree/.git/objects/c2/ada5c0664b845daa440b0441fe1ab5e01f3eda

Binary file added.

.vim/bundle/nerdtree/.git/objects/c2/e61cb2b91e444902fd0398dad75f55a9fb8430

Binary file added.

.vim/bundle/nerdtree/.git/objects/c3/b63d2fd9c929359231363bcabc880ba29eb96e

Binary file added.

.vim/bundle/nerdtree/.git/objects/c8/373bd06914926cc43d231480ac4c4a125ddabe

Binary file added.

.vim/bundle/nerdtree/.git/objects/c9/f8d5784d2d352368ef6fea9c767f9e17dce0cc

Binary file added.

.vim/bundle/nerdtree/.git/objects/cc/0777b7921e2aaca670e9bed28e06c669dcef92

+x��MK�0�=�W
+Z�]]��,�i��wD�F�^�Iy�>e�IjI�#�Xh�\�b�
+'Zk��Ҏ=�Ǵ���<��xp%=��f�8t�� ۈF�l���\��v���5_˅!�Z��

.vim/bundle/nerdtree/.git/objects/d0/10c5a111e1bf20d1028bfce513e388e7b91d68

Binary file added.

.vim/bundle/nerdtree/.git/objects/d0/f984f3d6598a1a1080de6ca2016a5445dc7ca0

Binary file added.

.vim/bundle/nerdtree/.git/objects/d1/2b055cdad80e62d4acf4e617f999dcec295d55

Binary file added.

.vim/bundle/nerdtree/.git/objects/d9/74b5bfa059e7e6934fcc450b9ddf628341a8b6

Binary file added.

.vim/bundle/nerdtree/.git/objects/db/8a764f0138860ff9907356d94335738105ff9d

Binary file added.

.vim/bundle/nerdtree/.git/objects/dd/aacd7b80d0ccd8af2189335b7c53244dd30746

Binary file added.

.vim/bundle/nerdtree/.git/objects/de/ecea81fff7a554d7475327f41c46ef181bb930

Binary file added.

.vim/bundle/nerdtree/.git/objects/df/2509914d70efbaf5504b7e97079ab69d637cfe

Binary file added.

.vim/bundle/nerdtree/.git/objects/df/8978f2f541f34f958dd9aa1814bb4385f56a89

Binary file added.

.vim/bundle/nerdtree/.git/objects/e3/a068ed0b2a21956b038b1e45346a32d8ab7407

Binary file added.

.vim/bundle/nerdtree/.git/objects/e6/054e0376b5147ce6175c5637b248d054d9ece6

Binary file added.

.vim/bundle/nerdtree/.git/objects/e7/99587755a3551a61e40a9217eaf7f03aba5640

Binary file added.

.vim/bundle/nerdtree/.git/objects/ee/5f7407eccc76401ae268b7ffb79dfef5746411

Binary file added.

.vim/bundle/nerdtree/.git/objects/f1/d94a727193c6ee01247bb6998abae80c8811e5

Binary file added.

.vim/bundle/nerdtree/.git/objects/f5/956dbbcfedff22c2c6d31ec3c980de6883bd5b

+x��KJD1D
+�H!l�Ac�I��Ɠ�,\�u8��~��0J��>����G����L��G��h'��\r�]Ƥ��b�|���U#|Ѐ�Cj��

.vim/bundle/nerdtree/.git/objects/f9/2ec6cd07b37c6589b2dbae137ef6582169e981

Binary file added.

.vim/bundle/nerdtree/.git/objects/fb/4a5a116addead2b829a26fbc5aa481e50d84e9

+x�QM��0��_1gVt�:MZ�Zq�՞� q��x�X؞�vZ~>N@��
+�Xγ_F�#%������=�w�T�&	��8������?�ջ��ײX

.vim/bundle/nerdtree/.git/objects/fd/c816d0751e22570d3a50fca2b8b25c1bda2d90

Binary file added.

.vim/bundle/nerdtree/.git/refs/heads/master

-3a8310a60bd165841e768d2569c98d40066c35df
+40d05ace57fb51cc2c2b2e9eb81c4832ed291630

.vim/bundle/nerdtree/.git/refs/remotes/origin/master

-3a8310a60bd165841e768d2569c98d40066c35df
+40d05ace57fb51cc2c2b2e9eb81c4832ed291630

.vim/bundle/nerdtree/README.markdown

 
 A. Stick this in your vimrc `autocmd vimenter * if !argc() | NERDTree | endif`
 
+__Q. How can I map a specific key or shortcut to open NERDTree?__
+
+A. Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want): `map <C-n> :NERDTreeToggle<CR>`
+
 __Q. How can I close vim if the only window left open is a NERDTree?__
 
 A. Stick this in your vimrc:

.vim/bundle/nerdtree/autoload/nerdtree.vim

+if exists("g:loaded_nerdtree_autoload")
+    finish
+endif
+let g:loaded_nerdtree_autoload = 1
+
+function! nerdtree#version()
+    return '4.2.0'
+endfunction
+
+" SECTION: General Functions {{{1
+"============================================================
+"FUNCTION: nerdtree#bufInWindows(bnum){{{2
+"[[STOLEN FROM VTREEEXPLORER.VIM]]
+"Determine the number of windows open to this buffer number.
+"Care of Yegappan Lakshman.  Thanks!
+"
+"Args:
+"bnum: the subject buffers buffer number
+function! nerdtree#bufInWindows(bnum)
+    let cnt = 0
+    let winnum = 1
+    while 1
+        let bufnum = winbufnr(winnum)
+        if bufnum < 0
+            break
+        endif
+        if bufnum ==# a:bnum
+            let cnt = cnt + 1
+        endif
+        let winnum = winnum + 1
+    endwhile
+
+    return cnt
+endfunction
+
+"FUNCTION: nerdtree#checkForBrowse(dir) {{{2
+"inits a secondary nerd tree in the current buffer if appropriate
+function! nerdtree#checkForBrowse(dir)
+    if a:dir != '' && isdirectory(a:dir)
+        call g:NERDTreeCreator.CreateSecondary(a:dir)
+    endif
+endfunction
+
+" FUNCTION: nerdtree#completeBookmarks(A,L,P) {{{2
+" completion function for the bookmark commands
+function! nerdtree#completeBookmarks(A,L,P)
+    return filter(g:NERDTreeBookmark.BookmarkNames(), 'v:val =~# "^' . a:A . '"')
+endfunction
+
+"FUNCTION: nerdtree#compareBookmarks(dir) {{{2
+function! nerdtree#compareBookmarks(first, second)
+    return a:first.compareTo(a:second)
+endfunction
+
+"FUNCTION: nerdtree#compareNodes(dir) {{{2
+function! nerdtree#compareNodes(n1, n2)
+    return a:n1.path.compareTo(a:n2.path)
+endfunction
+
+" FUNCTION: nerdtree#createDefaultBindings() {{{2
+function! nerdtree#createDefaultBindings()
+    let s = '<SNR>' . s:SID() . '_'
+
+    call NERDTreeAddKeyMap({ 'key': '<MiddleRelease>', 'scope': "all", 'callback': s."handleMiddleMouse" })
+    call NERDTreeAddKeyMap({ 'key': '<LeftRelease>', 'scope': "all", 'callback': s."handleLeftClick" })
+    call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "DirNode", 'callback': s."activateDirNode" })
+    call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "FileNode", 'callback': s."activateFileNode" })
+    call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "Bookmark", 'callback': s."activateBookmark" })
+    call NERDTreeAddKeyMap({ 'key': '<2-LeftMouse>', 'scope': "all", 'callback': s."activateAll" })
+
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "DirNode", 'callback': s."activateDirNode" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "FileNode", 'callback': s."activateFileNode" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "Bookmark", 'callback': s."activateBookmark" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "all", 'callback': s."activateAll" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': "Node", 'callback': s."openHSplit" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': "Node", 'callback': s."openVSplit" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': "Bookmark", 'callback': s."openHSplit" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': "Bookmark", 'callback': s."openVSplit" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': "Node", 'callback': s."previewNodeCurrent" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': "Node", 'callback': s."previewNodeVSplit" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': "Node", 'callback': s."previewNodeHSplit" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': "Bookmark", 'callback': s."previewNodeCurrent" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': "Bookmark", 'callback': s."previewNodeVSplit" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': "Bookmark", 'callback': s."previewNodeHSplit" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': "DirNode", 'callback': s."openNodeRecursively" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdir, 'scope': "all", 'callback': s."upDirCurrentRootClosed" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdirKeepOpen, 'scope': "all", 'callback': s."upDirCurrentRootOpen" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChangeRoot, 'scope': "Node", 'callback': s."chRoot" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapChdir, 'scope': "Node", 'callback': s."chCwd" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapQuit, 'scope': "all", 'callback': s."closeTreeWindow" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCWD, 'scope': "all", 'callback': s."chRootCwd" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefreshRoot, 'scope': "all", 'callback': s."refreshRoot" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapRefresh, 'scope': "Node", 'callback': s."refreshCurrent" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapHelp, 'scope': "all", 'callback': s."displayHelp" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleZoom, 'scope': "all", 'callback': s."toggleZoom" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleHidden, 'scope': "all", 'callback': s."toggleShowHidden" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFilters, 'scope': "all", 'callback': s."toggleIgnoreFilter" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleFiles, 'scope': "all", 'callback': s."toggleShowFiles" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapToggleBookmarks, 'scope': "all", 'callback': s."toggleShowBookmarks" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseDir, 'scope': "Node", 'callback': s."closeCurrentDir" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCloseChildren, 'scope': "DirNode", 'callback': s."closeChildren" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapMenu, 'scope': "Node", 'callback': s."showMenu" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpParent, 'scope': "Node", 'callback': s."jumpToParent" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpFirstChild, 'scope': "Node", 'callback': s."jumpToFirstChild" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpLastChild, 'scope': "Node", 'callback': s."jumpToLastChild" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpRoot, 'scope': "all", 'callback': s."jumpToRoot" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpNextSibling, 'scope': "Node", 'callback': s."jumpToNextSibling" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapJumpPrevSibling, 'scope': "Node", 'callback': s."jumpToPrevSibling" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTab, 'scope': "Node", 'callback': s."openInNewTab" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTabSilent, 'scope': "Node", 'callback': s."openInNewTabSilent" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTab, 'scope': "Bookmark", 'callback': s."openInNewTab" })
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenInTabSilent, 'scope': "Bookmark", 'callback': s."openInNewTabSilent" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenExpl, 'scope': "DirNode", 'callback': s."openExplorer" })
+
+    call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapDeleteBookmark, 'scope': "Bookmark", 'callback': s."deleteBookmark" })
+endfunction
+
+" FUNCTION: nerdtree#deprecated(func, [msg]) {{{2
+" Issue a deprecation warning for a:func. If a second arg is given, use this
+" as the deprecation message
+function! nerdtree#deprecated(func, ...)
+    let msg = a:0 ? a:func . ' ' . a:1 : a:func . ' is deprecated'
+
+    if !exists('s:deprecationWarnings')
+        let s:deprecationWarnings = {}
+    endif
+    if !has_key(s:deprecationWarnings, a:func)
+        let s:deprecationWarnings[a:func] = 1
+        echomsg msg
+    endif
+endfunction
+
+"FUNCTION: nerdtree#escChars(dir) {{{2
+function! nerdtree#escChars()
+    if nerdtree#runningWindows()
+        return " `\|\"#%&,?()\*^<>"
+    endif
+
+    return " \\`\|\"#%&,?()\*^<>[]"
+endfunction
+
+" FUNCTION: nerdtree#exec(cmd) {{{2
+" same as :exec cmd  but eventignore=all is set for the duration
+function! nerdtree#exec(cmd)
+    let old_ei = &ei
+    set ei=all
+    exec a:cmd
+    let &ei = old_ei
+endfunction
+
+" FUNCTION: nerdtree#findAndRevealPath() {{{2
+function! nerdtree#findAndRevealPath()
+    try
+        let p = g:NERDTreePath.New(expand("%:p"))
+    catch /^NERDTree.InvalidArgumentsError/
+        call nerdtree#echo("no file for the current buffer")
+        return
+    endtry
+
+    if p.isUnixHiddenPath()
+        let showhidden=g:NERDTreeShowHidden
+        let g:NERDTreeShowHidden = 1
+    endif
+
+    if !nerdtree#treeExistsForTab()
+        try
+            let cwd = g:NERDTreePath.New(getcwd())
+        catch /^NERDTree.InvalidArgumentsError/
+            call nerdtree#echo("current directory does not exist.")
+            let cwd = p.getParent()
+        endtry
+
+        if p.isUnder(cwd)
+            call g:NERDTreeCreator.CreatePrimary(cwd.str())
+        else
+            call g:NERDTreeCreator.CreatePrimary(p.getParent().str())
+        endif
+    else
+        if !p.isUnder(g:NERDTreeFileNode.GetRootForTab().path)
+            if !nerdtree#isTreeOpen()
+                call g:NERDTreeCreator.TogglePrimary('')
+            else
+                call nerdtree#putCursorInTreeWin()
+            endif
+            let b:NERDTreeShowHidden = g:NERDTreeShowHidden
+            call nerdtree#chRoot(g:NERDTreeDirNode.New(p.getParent()))
+        else
+            if !nerdtree#isTreeOpen()
+                call g:NERDTreeCreator.TogglePrimary("")
+            endif
+        endif
+    endif
+    call nerdtree#putCursorInTreeWin()
+    call b:NERDTreeRoot.reveal(p)
+
+    if p.isUnixHiddenFile()
+        let g:NERDTreeShowHidden = showhidden
+    endif
+endfunction
+
+" FUNCTION: nerdtree#has_opt(options, name) {{{2
+function! nerdtree#has_opt(options, name)
+    return has_key(a:options, a:name) && a:options[a:name] == 1
+endfunction
+
+" FUNCTION: nerdtree#invokeKeyMap(key) {{{2
+"this is needed since I cant figure out how to invoke dict functions from a
+"key map
+function! nerdtree#invokeKeyMap(key)
+    call g:NERDTreeKeyMap.Invoke(a:key)
+endfunction
+
+" FUNCTION: nerdtree#postSourceActions() {{{2
+function! nerdtree#postSourceActions()
+    call g:NERDTreeBookmark.CacheBookmarks(0)
+    call nerdtree#createDefaultBindings()
+
+    "load all nerdtree plugins
+    runtime! nerdtree_plugin/**/*.vim
+endfunction
+
+"FUNCTION: nerdtree#runningWindows(dir) {{{2
+function! nerdtree#runningWindows()
+    return has("win16") || has("win32") || has("win64")
+endfunction
+
+" Function: s:SID()   {{{2
+function s:SID()
+    if !exists("s:sid")
+        let s:sid = matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')
+    endif
+    return s:sid
+endfun
+
+" FUNCTION: nerdtree#tabpagevar(tabnr, var) {{{2
+function! nerdtree#tabpagevar(tabnr, var)
+    let currentTab = tabpagenr()
+    let old_ei = &ei
+    set ei=all
+
+    exec "tabnext " . a:tabnr
+    let v = -1
+    if exists('t:' . a:var)
+        exec 'let v = t:' . a:var
+    endif
+    exec "tabnext " . currentTab
+
+    let &ei = old_ei
+
+    return v
+endfunction
+
+" Function: nerdtree#treeExistsForBuffer()   {{{2
+" Returns 1 if a nerd tree root exists in the current buffer
+function! nerdtree#treeExistsForBuf()
+    return exists("b:NERDTreeRoot")
+endfunction
+
+" Function: nerdtree#treeExistsForTab()   {{{2
+" Returns 1 if a nerd tree root exists in the current tab
+function! nerdtree#treeExistsForTab()
+    return exists("t:NERDTreeBufName")
+endfunction
+
+"FUNCTION: nerdtree#treeMarkupReg(dir) {{{2
+function! nerdtree#treeMarkupReg()
+    if g:NERDTreeDirArrows
+        return '^\([▾▸] \| \+[▾▸] \| \+\)'
+    endif
+
+    return '^[ `|]*[\-+~]'
+endfunction
+
+"FUNCTION: nerdtree#treeUpDirLine(dir) {{{2
+function! nerdtree#treeUpDirLine()
+    return '.. (up a dir)'
+endfunction
+
+"FUNCTION: nerdtree#treeWid(dir) {{{2
+function! nerdtree#treeWid()
+    return 2
+endfunction
+
+"FUNCTION: nerdtree#upDir(keepState) {{{2
+"moves the tree up a level
+"
+"Args:
+"keepState: 1 if the current root should be left open when the tree is
+"re-rendered
+function! nerdtree#upDir(keepState)
+    let cwd = b:NERDTreeRoot.path.str({'format': 'UI'})
+    if cwd ==# "/" || cwd =~# '^[^/]..$'
+        call nerdtree#echo("already at top dir")
+    else
+        if !a:keepState
+            call b:NERDTreeRoot.close()
+        endif
+
+        let oldRoot = b:NERDTreeRoot
+
+        if empty(b:NERDTreeRoot.parent)
+            let path = b:NERDTreeRoot.path.getParent()
+            let newRoot = g:NERDTreeDirNode.New(path)
+            call newRoot.open()
+            call newRoot.transplantChild(b:NERDTreeRoot)
+            let b:NERDTreeRoot = newRoot
+        else
+            let b:NERDTreeRoot = b:NERDTreeRoot.parent
+        endif
+
+        if g:NERDTreeChDirMode ==# 2
+            call b:NERDTreeRoot.path.changeToDir()
+        endif
+
+        call nerdtree#renderView()
+        call oldRoot.putCursorHere(0, 0)
+    endif
+endfunction
+
+" Function: nerdtree#unique(list)   {{{2
+" returns a:list without duplicates
+function! nerdtree#unique(list)
+  let uniqlist = []
+  for elem in a:list
+    if index(uniqlist, elem) ==# -1
+      let uniqlist += [elem]
+    endif
+  endfor
+  return uniqlist
+endfunction
+
+" SECTION: View Functions {{{1
+"============================================================
+"
+"FUNCTION: nerdtree#centerView() {{{2
+"centers the nerd tree window around the cursor (provided the nerd tree
+"options permit)
+function! nerdtree#centerView()
+    if g:NERDTreeAutoCenter
+        let current_line = winline()
+        let lines_to_top = current_line
+        let lines_to_bottom = winheight(nerdtree#getTreeWinNum()) - current_line
+        if lines_to_top < g:NERDTreeAutoCenterThreshold || lines_to_bottom < g:NERDTreeAutoCenterThreshold
+            normal! zz
+        endif
+    endif
+endfunction
+
+" FUNCTION: nerdtree#chRoot(node) {{{2
+" changes the current root to the selected one
+function! nerdtree#chRoot(node)
+    call s:chRoot(a:node)
+endfunction
+"FUNCTION: nerdtree#closeTree() {{{2
+"Closes the primary NERD tree window for this tab
+function! nerdtree#closeTree()
+    if !nerdtree#isTreeOpen()
+        throw "NERDTree.NoTreeFoundError: no NERDTree is open"
+    endif
+
+    if winnr("$") != 1
+        if winnr() == nerdtree#getTreeWinNum()
+            call nerdtree#exec("wincmd p")
+            let bufnr = bufnr("")
+            call nerdtree#exec("wincmd p")
+        else
+            let bufnr = bufnr("")
+        endif
+
+        call nerdtree#exec(nerdtree#getTreeWinNum() . " wincmd w")
+        close
+        call nerdtree#exec(bufwinnr(bufnr) . " wincmd w")
+    else
+        close
+    endif
+endfunction
+
+"FUNCTION: nerdtree#closeTreeIfOpen() {{{2
+"Closes the NERD tree window if it is open
+function! nerdtree#closeTreeIfOpen()
+   if nerdtree#isTreeOpen()
+      call nerdtree#closeTree()
+   endif
+endfunction
+
+"FUNCTION: nerdtree#closeTreeIfQuitOnOpen() {{{2
+"Closes the NERD tree window if the close on open option is set
+function! nerdtree#closeTreeIfQuitOnOpen()
+    if g:NERDTreeQuitOnOpen && nerdtree#isTreeOpen()
+        call nerdtree#closeTree()
+    endif
+endfunction
+
+"FUNCTION: nerdtree#dumpHelp  {{{2
+"prints out the quick help
+function! nerdtree#dumpHelp()
+    let old_h = @h
+    if b:treeShowHelp ==# 1
+        let @h=   "\" NERD tree (" . nerdtree#version() . ") quickhelp~\n"
+        let @h=@h."\" ============================\n"
+        let @h=@h."\" File node mappings~\n"
+        let @h=@h."\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n"
+        let @h=@h."\" <CR>,\n"
+        if b:NERDTreeType ==# "primary"
+            let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in prev window\n"
+        else
+            let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in current window\n"
+        endif
+        if b:NERDTreeType ==# "primary"
+            let @h=@h."\" ". g:NERDTreeMapPreview .": preview\n"
+        endif
+        let @h=@h."\" ". g:NERDTreeMapOpenInTab.": open in new tab\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n"
+        let @h=@h."\" middle-click,\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenSplit .": open split\n"
+        let @h=@h."\" ". g:NERDTreeMapPreviewSplit .": preview split\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenVSplit .": open vsplit\n"
+        let @h=@h."\" ". g:NERDTreeMapPreviewVSplit .": preview vsplit\n"
+
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Directory node mappings~\n"
+        let @h=@h."\" ". (g:NERDTreeMouseMode ==# 1 ? "double" : "single") ."-click,\n"
+        let @h=@h."\" ". g:NERDTreeMapActivateNode .": open & close node\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenRecursively .": recursively open node\n"
+        let @h=@h."\" ". g:NERDTreeMapCloseDir .": close parent of node\n"
+        let @h=@h."\" ". g:NERDTreeMapCloseChildren .": close all child nodes of\n"
+        let @h=@h."\"    current node recursively\n"
+        let @h=@h."\" middle-click,\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenExpl.": explore selected dir\n"
+
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Bookmark table mappings~\n"
+        let @h=@h."\" double-click,\n"
+        let @h=@h."\" ". g:NERDTreeMapActivateNode .": open bookmark\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenInTab.": open in new tab\n"
+        let @h=@h."\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n"
+        let @h=@h."\" ". g:NERDTreeMapDeleteBookmark .": delete bookmark\n"
+
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Tree navigation mappings~\n"
+        let @h=@h."\" ". g:NERDTreeMapJumpRoot .": go to root\n"
+        let @h=@h."\" ". g:NERDTreeMapJumpParent .": go to parent\n"
+        let @h=@h."\" ". g:NERDTreeMapJumpFirstChild  .": go to first child\n"
+        let @h=@h."\" ". g:NERDTreeMapJumpLastChild   .": go to last child\n"
+        let @h=@h."\" ". g:NERDTreeMapJumpNextSibling .": go to next sibling\n"
+        let @h=@h."\" ". g:NERDTreeMapJumpPrevSibling .": go to prev sibling\n"
+
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Filesystem mappings~\n"
+        let @h=@h."\" ". g:NERDTreeMapChangeRoot .": change tree root to the\n"
+        let @h=@h."\"    selected dir\n"
+        let @h=@h."\" ". g:NERDTreeMapUpdir .": move tree root up a dir\n"
+        let @h=@h."\" ". g:NERDTreeMapUpdirKeepOpen .": move tree root up a dir\n"
+        let @h=@h."\"    but leave old root open\n"
+        let @h=@h."\" ". g:NERDTreeMapRefresh .": refresh cursor dir\n"
+        let @h=@h."\" ". g:NERDTreeMapRefreshRoot .": refresh current root\n"
+        let @h=@h."\" ". g:NERDTreeMapMenu .": Show menu\n"
+        let @h=@h."\" ". g:NERDTreeMapChdir .":change the CWD to the\n"
+        let @h=@h."\"    selected dir\n"
+        let @h=@h."\" ". g:NERDTreeMapCWD .":change tree root to CWD\n"
+
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Tree filtering mappings~\n"
+        let @h=@h."\" ". g:NERDTreeMapToggleHidden .": hidden files (" . (b:NERDTreeShowHidden ? "on" : "off") . ")\n"
+        let @h=@h."\" ". g:NERDTreeMapToggleFilters .": file filters (" . (b:NERDTreeIgnoreEnabled ? "on" : "off") . ")\n"
+        let @h=@h."\" ". g:NERDTreeMapToggleFiles .": files (" . (b:NERDTreeShowFiles ? "on" : "off") . ")\n"
+        let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (b:NERDTreeShowBookmarks ? "on" : "off") . ")\n"
+
+        "add quickhelp entries for each custom key map
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Custom mappings~\n"
+        for i in g:NERDTreeKeyMap.All()
+            if !empty(i.quickhelpText)
+                let @h=@h."\" ". i.key .": ". i.quickhelpText ."\n"
+            endif
+        endfor
+
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Other mappings~\n"
+        let @h=@h."\" ". g:NERDTreeMapQuit .": Close the NERDTree window\n"
+        let @h=@h."\" ". g:NERDTreeMapToggleZoom .": Zoom (maximize-minimize)\n"
+        let @h=@h."\"    the NERDTree window\n"
+        let @h=@h."\" ". g:NERDTreeMapHelp .": toggle help\n"
+        let @h=@h."\"\n\" ----------------------------\n"
+        let @h=@h."\" Bookmark commands~\n"
+        let @h=@h."\" :Bookmark <name>\n"
+        let @h=@h."\" :BookmarkToRoot <name>\n"
+        let @h=@h."\" :RevealBookmark <name>\n"
+        let @h=@h."\" :OpenBookmark <name>\n"
+        let @h=@h."\" :ClearBookmarks [<names>]\n"
+        let @h=@h."\" :ClearAllBookmarks\n"
+        silent! put h
+    elseif g:NERDTreeMinimalUI == 0
+        let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
+        silent! put h
+    endif
+
+    let @h = old_h
+endfunction
+
+"FUNCTION: nerdtree#echo  {{{2
+"A wrapper for :echo. Appends 'NERDTree:' on the front of all messages
+"
+"Args:
+"msg: the message to echo
+function! nerdtree#echo(msg)
+    redraw
+    echomsg "NERDTree: " . a:msg
+endfunction
+
+"FUNCTION: nerdtree#echoError {{{2
+"Wrapper for nerdtree#echo, sets the message type to errormsg for this message
+"Args:
+"msg: the message to echo
+function! nerdtree#echoError(msg)
+    echohl errormsg
+    call nerdtree#echo(a:msg)
+    echohl normal
+endfunction
+
+"FUNCTION: nerdtree#echoWarning {{{2
+"Wrapper for nerdtree#echo, sets the message type to warningmsg for this message
+"Args:
+"msg: the message to echo
+function! nerdtree#echoWarning(msg)
+    echohl warningmsg
+    call nerdtree#echo(a:msg)
+    echohl normal
+endfunction
+
+"FUNCTION: nerdtree#firstUsableWindow(){{{2
+"find the window number of the first normal window
+function! nerdtree#firstUsableWindow()
+    let i = 1
+    while i <= winnr("$")
+        let bnum = winbufnr(i)
+        if bnum != -1 && getbufvar(bnum, '&buftype') ==# ''
+                    \ && !getwinvar(i, '&previewwindow')
+                    \ && (!getbufvar(bnum, '&modified') || &hidden)
+            return i
+        endif
+
+        let i += 1
+    endwhile
+    return -1
+endfunction
+
+"FUNCTION: nerdtree#getPath(ln) {{{2
+"Gets the full path to the node that is rendered on the given line number
+"
+"Args:
+"ln: the line number to get the path for
+"
+"Return:
+"A path if a node was selected, {} if nothing is selected.
+"If the 'up a dir' line was selected then the path to the parent of the
+"current root is returned
+function! nerdtree#getPath(ln)
+    let line = getline(a:ln)
+
+    let rootLine = g:NERDTreeFileNode.GetRootLineNum()
+
+    "check to see if we have the root node
+    if a:ln == rootLine
+        return b:NERDTreeRoot.path
+    endif
+
+    if !g:NERDTreeDirArrows
+        " in case called from outside the tree
+        if line !~# '^ *[|`▸▾ ]' || line =~# '^$'
+            return {}
+        endif
+    endif
+
+    if line ==# nerdtree#treeUpDirLine()
+        return b:NERDTreeRoot.path.getParent()
+    endif
+
+    let indent = nerdtree#indentLevelFor(line)
+
+    "remove the tree parts and the leading space
+    let curFile = nerdtree#stripMarkupFromLine(line, 0)
+
+    let wasdir = 0
+    if curFile =~# '/$'
+        let wasdir = 1
+        let curFile = substitute(curFile, '/\?$', '/', "")
+    endif
+
+    let dir = ""
+    let lnum = a:ln
+    while lnum > 0
+        let lnum = lnum - 1
+        let curLine = getline(lnum)
+        let curLineStripped = nerdtree#stripMarkupFromLine(curLine, 1)
+
+        "have we reached the top of the tree?
+        if lnum == rootLine
+            let dir = b:NERDTreeRoot.path.str({'format': 'UI'}) . dir
+            break
+        endif
+        if curLineStripped =~# '/$'
+            let lpindent = nerdtree#indentLevelFor(curLine)
+            if lpindent < indent
+                let indent = indent - 1
+
+                let dir = substitute (curLineStripped,'^\\', "", "") . dir
+                continue
+            endif
+        endif
+    endwhile
+    let curFile = b:NERDTreeRoot.path.drive . dir . curFile
+    let toReturn = g:NERDTreePath.New(curFile)
+    return toReturn
+endfunction
+
+"FUNCTION: nerdtree#getTreeWinNum() {{{2
+"gets the nerd tree window number for this tab
+function! nerdtree#getTreeWinNum()
+    if exists("t:NERDTreeBufName")
+        return bufwinnr(t:NERDTreeBufName)
+    else
+        return -1
+    endif
+endfunction
+
+"FUNCTION: nerdtree#indentLevelFor(line) {{{2
+function! nerdtree#indentLevelFor(line)
+    let level = match(a:line, '[^ \-+~▸▾`|]') / nerdtree#treeWid()
+    " check if line includes arrows
+    if match(a:line, '[▸▾]') > -1
+        " decrement level as arrow uses 3 ascii chars
+        let level = level - 1
+    endif
+    return level
+endfunction
+
+"FUNCTION: nerdtree#isTreeOpen() {{{2
+function! nerdtree#isTreeOpen()
+    return nerdtree#getTreeWinNum() != -1
+endfunction
+
+"FUNCTION: nerdtree#isWindowUsable(winnumber) {{{2
+"Returns 0 if opening a file from the tree in the given window requires it to
+"be split, 1 otherwise
+"
+"Args:
+"winnumber: the number of the window in question
+function! nerdtree#isWindowUsable(winnumber)
+    "gotta split if theres only one window (i.e. the NERD tree)
+    if winnr("$") ==# 1
+        return 0
+    endif
+
+    let oldwinnr = winnr()
+    call nerdtree#exec(a:winnumber . "wincmd p")
+    let specialWindow = getbufvar("%", '&buftype') != '' || getwinvar('%', '&previewwindow')
+    let modified = &modified
+    call nerdtree#exec(oldwinnr . "wincmd p")
+
+    "if its a special window e.g. quickfix or another explorer plugin then we
+    "have to split
+    if specialWindow
+        return 0
+    endif
+
+    if &hidden
+        return 1
+    endif
+
+    return !modified || nerdtree#bufInWindows(winbufnr(a:winnumber)) >= 2
+endfunction
+
+" FUNCTION: nerdtree#jumpToChild(direction) {{{2
+" Args:
+" direction: 0 if going to first child, 1 if going to last
+function! nerdtree#jumpToChild(currentNode, direction)
+    if a:currentNode.isRoot()
+        return nerdtree#echo("cannot jump to " . (a:direction ? "last" : "first") .  " child")
+    end
+    let dirNode = a:currentNode.parent
+    let childNodes = dirNode.getVisibleChildren()
+
+    let targetNode = childNodes[0]
+    if a:direction
+        let targetNode = childNodes[len(childNodes) - 1]
+    endif
+
+    if targetNode.equals(a:currentNode)
+        let siblingDir = a:currentNode.parent.findOpenDirSiblingWithVisibleChildren(a:direction)
+        if siblingDir != {}
+            let indx = a:direction ? siblingDir.getVisibleChildCount()-1 : 0
+            let targetNode = siblingDir.getChildByIndex(indx, 1)
+        endif
+    endif
+
+    call targetNode.putCursorHere(1, 0)
+
+    call nerdtree#centerView()
+endfunction
+
+" FUNCTION: nerdtree#jumpToSibling(currentNode, forward) {{{2
+" moves the cursor to the sibling of the current node in the given direction
+"
+" Args:
+" forward: 1 if the cursor should move to the next sibling, 0 if it should
+" move back to the previous sibling
+function! nerdtree#jumpToSibling(currentNode, forward)
+    let sibling = a:currentNode.findSibling(a:forward)
+
+    if !empty(sibling)
+        call sibling.putCursorHere(1, 0)
+        call nerdtree#centerView()
+    endif
+endfunction
+
+"FUNCTION: nerdtree#promptToDelBuffer(bufnum, msg){{{2
+"prints out the given msg and, if the user responds by pushing 'y' then the
+"buffer with the given bufnum is deleted
+"
+"Args:
+"bufnum: the buffer that may be deleted
+"msg: a message that will be echoed to the user asking them if they wish to
+"     del the buffer
+function! nerdtree#promptToDelBuffer(bufnum, msg)
+    echo a:msg
+    if nr2char(getchar()) ==# 'y'
+        exec "silent bdelete! " . a:bufnum
+    endif
+endfunction
+
+"FUNCTION: nerdtree#putCursorOnBookmarkTable(){{{2
+"Places the cursor at the top of the bookmarks table
+function! nerdtree#putCursorOnBookmarkTable()
+    if !b:NERDTreeShowBookmarks
+        throw "NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active"
+    endif
+
+    if g:NERDTreeMinimalUI
+        return cursor(1, 2)
+    endif
+
+    let rootNodeLine = g:NERDTreeFileNode.GetRootLineNum()
+
+    let line = 1
+    while getline(line) !~# '^>-\+Bookmarks-\+$'
+        let line = line + 1
+        if line >= rootNodeLine
+            throw "NERDTree.BookmarkTableNotFoundError: didnt find the bookmarks table"
+        endif
+    endwhile
+    call cursor(line, 2)
+endfunction
+
+"FUNCTION: nerdtree#putCursorInTreeWin(){{{2
+"Places the cursor in the nerd tree window
+function! nerdtree#putCursorInTreeWin()
+    if !nerdtree#isTreeOpen()
+        throw "NERDTree.InvalidOperationError: cant put cursor in NERD tree window, no window exists"
+    endif
+
+    call nerdtree#exec(nerdtree#getTreeWinNum() . "wincmd w")
+endfunction
+
+"FUNCTION: nerdtree#renderBookmarks {{{2
+function! nerdtree#renderBookmarks()
+
+    if g:NERDTreeMinimalUI == 0
+        call setline(line(".")+1, ">----------Bookmarks----------")
+        call cursor(line(".")+1, col("."))
+    endif
+
+    for i in g:NERDTreeBookmark.Bookmarks()
+        call setline(line(".")+1, i.str())
+        call cursor(line(".")+1, col("."))
+    endfor
+
+    call setline(line(".")+1, '')
+    call cursor(line(".")+1, col("."))
+endfunction
+
+"FUNCTION: nerdtree#renderView {{{2
+"The entry function for rendering the tree
+function! nerdtree#renderView()
+    setlocal modifiable
+
+    "remember the top line of the buffer and the current line so we can
+    "restore the view exactly how it was
+    let curLine = line(".")
+    let curCol = col(".")
+    let topLine = line("w0")
+
+    "delete all lines in the buffer (being careful not to clobber a register)
+    silent 1,$delete _
+
+    call nerdtree#dumpHelp()
+
+    "delete the blank line before the help and add one after it
+    if g:NERDTreeMinimalUI == 0
+        call setline(line(".")+1, "")
+        call cursor(line(".")+1, col("."))
+    endif
+
+    if b:NERDTreeShowBookmarks
+        call nerdtree#renderBookmarks()
+    endif
+
+    "add the 'up a dir' line
+    if !g:NERDTreeMinimalUI
+        call setline(line(".")+1, nerdtree#treeUpDirLine())
+        call cursor(line(".")+1, col("."))
+    endif
+
+    "draw the header line
+    let header = b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)})
+    call setline(line(".")+1, header)
+    call cursor(line(".")+1, col("."))
+
+    "draw the tree
+    let old_o = @o
+    let @o = b:NERDTreeRoot.renderToString()
+    silent put o
+    let @o = old_o
+
+    "delete the blank line at the top of the buffer
+    silent 1,1delete _
+
+    "restore the view
+    let old_scrolloff=&scrolloff
+    let &scrolloff=0
+    call cursor(topLine, 1)
+    normal! zt
+    call cursor(curLine, curCol)