aboutsummaryrefslogtreecommitdiff
path: root/plugin/nerdtree.vim
blob: b9665fb9c86610f5088a6bb751d40d3b9a5f650e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
augroup NERDTREE
    " NERDTree: replaces NetRW, as long as it has so many bugs
    let NERDTreeIgnore                = ['\.aux$', '\.o$']
    let NERDTreeCascadeSingleChildDir = 0 | " I don't get how one can use <m> to create files in that included directory
    let NERDTreeChDirMode             = 0
    let NERDTreeHiddenFirst           = 1
    let NERDTreeMinimalUI             = 1
    let NERDTreeShowBookmarks         = 1 | " show bookmarks by default (when opening for the first time)
    let NERDTreeWinSize               = 40
    let NERDTreeQuitOnOpen            = 1

    " depending on if NERDTree has the focus:
    nnoremap <expr>
                \ <leader><leader>
                \ bufwinnr("%")==g:NERDTree.GetWinNum() ? ':NERDTreeClose<CR>' : ':NERDTreeFind<CR>'
    nnoremap <expr>
                \ <F2>
                \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '<C-W><C-W>' : ':N<CR>'

    nnoremap <expr>
                \ <F3>
                \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '<C-W><C-W>' : ':n<CR>'

    packadd nerdtree
augroup END
..