Add option for relative numbers

This commit is contained in:
jeielcms 2024-09-27 11:24:59 -03:00
parent 9b465acb27
commit 9a407fe802
No known key found for this signature in database
3 changed files with 16 additions and 0 deletions

View File

@ -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.

View File

@ -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

View File

@ -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)