Skip to content

Commit 25d1b6e

Browse files
committed
Merge branch 'add-nerdtree-plugin'
2 parents 4c2b05e + f3b8012 commit 25d1b6e

File tree

5 files changed

+88
-0
lines changed

5 files changed

+88
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ Normal:
131131

132132
- `<esc><esc>`: Disable highlight search word.
133133

134+
### NerdTree
135+
136+
- `<F2>`: Toggle NERDTree split window.
137+
138+
### Tagbar
139+
140+
- `<F3>`: Toggle tagbar split window.
141+
134142
## Commands
135143

136144
### Plugins Commands
@@ -148,6 +156,13 @@ Normal:
148156

149157
For more information, see `:help fugitive`.
150158

159+
#### NerdTree (NerdTree-Tabs)
160+
161+
- `:NerdTreeTabsOpen`: Switches NERDTree on for all tabs.
162+
- `:NerdTreeTabsClose`: Switches NERDTree off for all tabs.
163+
164+
For more information, see [nerdtree-tabs-key-mappings](https://github.com/jistr/vim-nerdtree-tabs#commands-and-mappings).
165+
151166
## Plugin List
152167

153168
<!-- prettier-ignore-start -->
@@ -157,7 +172,11 @@ For more information, see `:help fugitive`.
157172
| [incsearch.vim](https://github.com/haya14busa/incsearch.vim) [:gear:](./plug_plugins/incsearch.vim) | 🔦 Improved incremental searching for Vim |
158173
| [lightline.vim](https://github.com/itchyny/lightline.vim) [:gear:](./plug_plugins/lightline.vim) | A light and configurable statusline/tabline plugin for Vim |
159174
| [molokai](https://github.com/tomasr/molokai) [:gear:](./plug_plugins/molokai.vim) | Molokai color scheme for Vim |
175+
| [nerdtree](https://github.com/vim-nerdtree/nerdtree) [:gear:](./plug_plugins/nerdtree.vim) | A tree explorer plugin for vim. |
176+
| [tagbar](https://github.com/majutsushi/tagbar) [:gear:](./plug_plugins/tagbar.vim) | Vim plugin that displays tags in a window, ordered by scope |
160177
| [vim-fugitive](https://github.com/tpope/vim-fugitive) [:gear:](./plug_plugins/vim-fugitive.vim) | fugitive.vim: A Git wrapper so awesome, it should be illegal |
178+
| [vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight) [:gear:](./plug_plugins/vim-nerdtree-syntax-highlight.vim) | Extra syntax and highlight for nerdtree files |
179+
| [vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs) [:gear:](./plug_plugins/vim-nerdtree-tabs.vim) | NERDTree and tabs together in Vim, painlessly |
161180
| [vim-polyglot](https://github.com/sheerun/vim-polyglot) [:gear:](./plug_plugins/vim-polyglot.vim) | A solid language pack for Vim. |
162181
| [vim-signify](https://github.com/mhinz/vim-signify) [:gear:](./plug_plugins/vim-signify.vim) | :heavy_plus_sign: Show a diff using Vim its sign column. |
163182
| [vimwiki](https://github.com/vimwiki/vimwiki) [:gear:](./plug_plugins/vimwiki.vim) | Personal Wiki for Vim |

plug_plugins/nerdtree.vim

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
" Copyright (c) 2019-present Kaiming Guo. All rights reserved.
2+
" Use of this source code is governed by a BSD-style license that can be
3+
" found in the LICENSE file.
4+
5+
if exists('g:plug_installing_plugins')
6+
Plug 'scrooloose/nerdtree'
7+
finish
8+
endif
9+
10+
if has('autocmd')
11+
augroup auto_nerdtree_settings
12+
autocmd!
13+
14+
" close vim if NERDTree is the last buffer
15+
autocmd BufEnter * if (winnr('$') is# 1 && exists('b:NERDTree')
16+
\&& b:NERDTree.isTabTree()) | q | endif
17+
18+
autocmd FileType nerdtree setlocal nocursorline
19+
augroup END
20+
endif
21+
22+
let g:NERDTreeShowBookmarks = 1
23+
let g:NERDTreeChDirMode = 1
24+
let g:NERDTreeMinimalUI = 1
25+
let g:NERDTreeHighlightCursorLine = 0
26+
let g:NERDTreeWinSize = 30
27+
let g:NERDTreeMapOpenInTabSilent = '<RightMouse>'
28+
let g:NERDTreeNodeDelimiter = "\u00a0"
29+
let g:NERDTreeIgnore = [
30+
\ '\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__' ]
31+
let g:NERDTreeSortOrder = ['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
32+
33+
nnoremap <silent> <F2> :NERDTreeToggle<cr>:wincmd =<cr>
34+
35+
" vim: set sw=2 ts=2 et tw=78 :

plug_plugins/tagbar.vim

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
" Copyright (c) 2019-present Kaiming Guo. All rights reserved.
2+
" Use of this source code is governed by a BSD-style license that can be
3+
" found in the LICENSE file.
4+
5+
if exists('g:plug_installing_plugins')
6+
Plug 'majutsushi/tagbar'
7+
finish
8+
endif
9+
10+
nmap <silent> <F3> :TagbarToggle<cr>
11+
12+
" vim: set sw=2 ts=2 et tw=78 :
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
" Copyright (c) 2019-present Kaiming Guo. All rights reserved.
2+
" Use of this source code is governed by a BSD-style license that can be
3+
" found in the LICENSE file.
4+
5+
if exists('g:plug_installing_plugins')
6+
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
7+
finish
8+
endif
9+
10+
let g:NERDTreeFileExtensionHighlightFullName = 1
11+
12+
" vim: set sw=2 ts=2 et tw=78 :

plug_plugins/vim-nerdtree-tabs.vim

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
" Copyright (c) 2019-present Kaiming Guo. All rights reserved.
2+
" Use of this source code is governed by a BSD-style license that can be
3+
" found in the LICENSE file.
4+
5+
if exists('g:plug_installing_plugins')
6+
Plug 'jistr/vim-nerdtree-tabs'
7+
finish
8+
endif
9+
10+
" vim: set sw=2 ts=2 et tw=78 :

0 commit comments

Comments
 (0)