mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 09:30:14 +08:00
Add option for relative numbers
This commit is contained in:
parent
9b465acb27
commit
9a407fe802
|
@ -731,6 +731,9 @@ the NERDTree. These settings should be set in your vimrc, using `:let`.
|
|||
|NERDTreeShowLineNumbers| Tells the NERDTree whether to display line
|
||||
numbers in the tree window.
|
||||
|
||||
|NERDTreeShowRelLineNumbers| Tells the NERDTree whether to display relative
|
||||
line numbers in the tree window.
|
||||
|
||||
|NERDTreeSortOrder| Tell the NERDTree how to sort the nodes in the
|
||||
tree.
|
||||
|
||||
|
@ -1107,6 +1110,16 @@ window. Use one of the follow lines for this setting: >
|
|||
let NERDTreeShowLineNumbers=0
|
||||
let NERDTreeShowLineNumbers=1
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTreeShowRelLineNumbers*
|
||||
Values: 0 or 1.
|
||||
Default: 0.
|
||||
|
||||
This setting tells vim whether to display relative line numbers for the NERDTree
|
||||
window. Use one of the follow lines for this setting: >
|
||||
let NERDTreeShowRelLineNumbers=0
|
||||
let NERDTreeShowRelLineNumbers=1
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTreeSortOrder*
|
||||
Values: a list of regular expressions.
|
||||
|
|
|
@ -344,6 +344,8 @@ function! s:Creator._setCommonBufOptions()
|
|||
|
||||
if g:NERDTreeShowLineNumbers
|
||||
setlocal number
|
||||
elseif g:NERDTreeShowRelLineNumbers
|
||||
setlocal relativenumber
|
||||
else
|
||||
setlocal nonumber
|
||||
if v:version >= 703
|
||||
|
|
|
@ -52,6 +52,7 @@ let g:NERDTreeShowBookmarks = get(g:, 'NERDTreeShowBookmarks', 0
|
|||
let g:NERDTreeShowFiles = get(g:, 'NERDTreeShowFiles', 1)
|
||||
let g:NERDTreeShowHidden = get(g:, 'NERDTreeShowHidden', 0)
|
||||
let g:NERDTreeShowLineNumbers = get(g:, 'NERDTreeShowLineNumbers', 0)
|
||||
let g:NERDTreeShowRelLineNumbers = get(g:, 'NERDTreeShowRelLineNumbers', 0)
|
||||
let g:NERDTreeSortDirs = get(g:, 'NERDTreeSortDirs', 1)
|
||||
let g:NERDTreeFileLines = get(g:, 'NERDTreeFileLines', 0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user