File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -1128,7 +1128,7 @@ setting is used.
1128
1128
1129
1129
------------------------------------------------------------------------------
1130
1130
*NERDTreeWinPos*
1131
- Values: "left" or "right "
1131
+ Values: "left", "right", "top" or "bottom "
1132
1132
Default: "left".
1133
1133
1134
1134
This setting is used to determine where NERDTree window is placed on the
@@ -1138,6 +1138,13 @@ This setting makes it possible to use two different explorer plugins
1138
1138
simultaneously. For example, you could have the taglist plugin on the left of
1139
1139
the window and the NERDTree on the right.
1140
1140
1141
+ When setting this variable to "top" or "bottom" make sure to also change the
1142
+ | NERDTreeWinSize | to a more reasonable size.
1143
+
1144
+ For example:
1145
+ >
1146
+ let g:NERDTreeWinSize = 15
1147
+ <
1141
1148
------------------------------------------------------------------------------
1142
1149
*NERDTreeWinSize*
1143
1150
Values: a positive integer.
Original file line number Diff line number Diff line change @@ -182,16 +182,17 @@ endfunction
182
182
" Initialize the NERDTree window. Open the window, size it properly, set all
183
183
" local options, etc.
184
184
function ! s: Creator ._createTreeWin ()
185
- let l: splitLocation = g: NERDTreeWinPos == # ' left' ? ' topleft ' : ' botright '
185
+ let l: splitLocation = g: NERDTreeWinPos == # ' left' || g: NERDTreeWinPos == # ' top' ? ' topleft ' : ' botright '
186
+ let l: splitDirection = g: NERDTreeWinPos == # ' left' || g: NERDTreeWinPos == # ' right' ? ' vertical' : ' '
186
187
let l: splitSize = g: NERDTreeWinSize
187
188
188
189
if ! g: NERDTree .ExistsForTab ()
189
190
let t :NERDTreeBufName = self ._nextBufferName ()
190
- silent ! execute l: splitLocation . ' vertical ' . l: splitSize . ' new'
191
+ silent ! execute l: splitLocation . l: splitDirection . ' ' . l: splitSize . ' new'
191
192
silent ! execute ' edit ' . t :NERDTreeBufName
192
- silent ! execute ' vertical resize ' . l: splitSize
193
+ silent ! execute l: splitDirection . ' resize ' . l: splitSize
193
194
else
194
- silent ! execute l: splitLocation . ' vertical ' . l: splitSize . ' split'
195
+ silent ! execute l: splitLocation . l: splitDirection . ' ' . l: splitSize . ' split'
195
196
silent ! execute ' buffer ' . t :NERDTreeBufName
196
197
endif
197
198
You can’t perform that action at this time.
0 commit comments