mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4245517689 | ||
|
|
926ff0ec03 | ||
|
|
53eef21ad6 | ||
|
|
4fe24d3156 | ||
|
|
2d639b70e7 |
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -5,9 +5,12 @@ Closes # <!-- Issue number this PR addresses. If none, remove this line. -->
|
|||||||
---
|
---
|
||||||
### New Version Info
|
### New Version Info
|
||||||
|
|
||||||
- [ ] Derive a new version number. Increment the:
|
#### Author's Instructions
|
||||||
- [ ] `MAJOR` version when you make incompatible API changes
|
- [ ] Derive a new `MAJOR.MINOR.PATCH` version number. Increment the:
|
||||||
- [ ] `MINOR` version when you add functionality in a backwards-compatible manner
|
- `MAJOR` version when you make incompatible API changes
|
||||||
- [ ] `PATCH` version when you make backwards-compatible bug fixes
|
- `MINOR` version when you add functionality in a backwards-compatible manner
|
||||||
|
- `PATCH` version when you make backwards-compatible bug fixes
|
||||||
- [ ] Update [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), following the established pattern.
|
- [ ] Update [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), following the established pattern.
|
||||||
- [ ] Tag the merge commit, e.g. `git tag -a 3.1.4 -m "v3.1.4" && git push origin --tags`
|
#### Collaborator's Instructions
|
||||||
|
- [ ] Review [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), suggesting a different version number if necessary.
|
||||||
|
- [ ] After merge, tag the merge commit, e.g. `git tag -a 3.1.4 -m "v3.1.4" && git push origin --tags`
|
||||||
|
|||||||
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,16 +1,28 @@
|
|||||||
# Change Log
|
# NERDTree Change Log
|
||||||
|
|
||||||
#### 6.1...
|
<!--
|
||||||
|
Introduce a new MAJOR.MINOR version with a 4-hash header.
|
||||||
|
|
||||||
|
PATCH versions are listed from newest to oldest under their respective MAJOR.MINOR version
|
||||||
|
in an unordered list. The format is:
|
||||||
|
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||||
|
-->
|
||||||
|
|
||||||
|
#### 6.1
|
||||||
|
- **.4**: Add VIM built-in package management to read me file. (pesarkhobeee) [#1049](https://github.com/scrooloose/nerdtree/pull/1049)
|
||||||
|
- **.3**: Save/Set screen state also on WinLeave and WinEnter. (PhilRunninger) [#1048](https://github.com/scrooloose/nerdtree/pull/1048)
|
||||||
|
- **.2**: Wrap saveScreenState's statements in a try-catch block. (PhilRunninger) [#1047](https://github.com/scrooloose/nerdtree/pull/1047)
|
||||||
|
- **.1**: Catch errors when trying to read CHANGELOG.md. (PhilRunninger) [#1045](https://github.com/scrooloose/nerdtree/pull/1045)
|
||||||
- **.0**: If file path doesn't exist, :NERDTreeFind its parent directory instead. (PhilRunninger) [#1043](https://github.com/scrooloose/nerdtree/pull/1043)
|
- **.0**: If file path doesn't exist, :NERDTreeFind its parent directory instead. (PhilRunninger) [#1043](https://github.com/scrooloose/nerdtree/pull/1043)
|
||||||
#### 6.0...
|
#### 6.0
|
||||||
- **.1**: Reintroduce necessary variable mistakenly removed. (PhilRunninger) [#1040](https://github.com/scrooloose/nerdtree/pull/1040)
|
- **.1**: Reintroduce necessary variable mistakenly removed. (PhilRunninger) [#1040](https://github.com/scrooloose/nerdtree/pull/1040)
|
||||||
- **.0**: Make the behavior of window splits consistent (dragonxlwang, PhilRunninger) [#1035](https://github.com/scrooloose/nerdtree/pull/1035)
|
- **.0**: Make the behavior of window splits consistent (dragonxlwang, PhilRunninger) [#1035](https://github.com/scrooloose/nerdtree/pull/1035)
|
||||||
#### 5.3...
|
#### 5.3
|
||||||
- **.3**: Fix (p)ath not displaying in the minimal menu (tuzz) [#1038](https://github.com/scrooloose/nerdtree/pull/1038)
|
- **.3**: Fix (p)ath not displaying in the minimal menu (tuzz) [#1038](https://github.com/scrooloose/nerdtree/pull/1038)
|
||||||
- **.2**: Enable events when closing NerdTree window. (PhilRunninger) [#1037](https://github.com/scrooloose/nerdtree/pull/1037)
|
- **.2**: Enable events when closing NerdTree window. (PhilRunninger) [#1037](https://github.com/scrooloose/nerdtree/pull/1037)
|
||||||
- **.1**: Fix the `e` key mapping to use netrw if desired (PhilRunninger) [#1031](https://github.com/scrooloose/nerdtree/pull/1031)
|
- **.1**: Fix the `e` key mapping to use netrw if desired (PhilRunninger) [#1031](https://github.com/scrooloose/nerdtree/pull/1031)
|
||||||
- **.0**: Add file extension and size to sorting capabilities (PhilRunninger) [#1029](https://github.com/scrooloose/nerdtree/pull/1029)
|
- **.0**: Add file extension and size to sorting capabilities (PhilRunninger) [#1029](https://github.com/scrooloose/nerdtree/pull/1029)
|
||||||
#### 5.2...
|
#### 5.2
|
||||||
- **.9**: Suppress events for intermediate window/tab/buffer changes (PhilRunninger) [#1026](https://github.com/scrooloose/nerdtree/pull/1026)
|
- **.9**: Suppress events for intermediate window/tab/buffer changes (PhilRunninger) [#1026](https://github.com/scrooloose/nerdtree/pull/1026)
|
||||||
- **.8**: Revert [#1019](https://github.com/scrooloose/nerdtree/pull/1019) to fix nvim artifacts and flickering. (PhilRunninger) [#1021](https://github.com/scrooloose/nerdtree/pull/1021)
|
- **.8**: Revert [#1019](https://github.com/scrooloose/nerdtree/pull/1019) to fix nvim artifacts and flickering. (PhilRunninger) [#1021](https://github.com/scrooloose/nerdtree/pull/1021)
|
||||||
- **.7**: Use :mode only in neovim. MacVim still needs to use :redraw! (PhilRunninger) [#1019](https://github.com/scrooloose/nerdtree/pull/1019)
|
- **.7**: Use :mode only in neovim. MacVim still needs to use :redraw! (PhilRunninger) [#1019](https://github.com/scrooloose/nerdtree/pull/1019)
|
||||||
@@ -21,7 +33,7 @@
|
|||||||
- **.2**: Make Enter work on the `.. ( up a dir )` line (PhilRunninger) [#1013](https://github.com/scrooloose/nerdtree/pull/1013)
|
- **.2**: Make Enter work on the `.. ( up a dir )` line (PhilRunninger) [#1013](https://github.com/scrooloose/nerdtree/pull/1013)
|
||||||
- **.1**: Fix nerdtree#version() on Windows. (PhilRunninger)
|
- **.1**: Fix nerdtree#version() on Windows. (PhilRunninger)
|
||||||
- **.0**: Expand functionality of `<CR>` mapping. (PhilRunninger) [#1011](https://github.com/scrooloose/nerdtree/pull/1011)
|
- **.0**: Expand functionality of `<CR>` mapping. (PhilRunninger) [#1011](https://github.com/scrooloose/nerdtree/pull/1011)
|
||||||
#### 5.1...
|
#### 5.1
|
||||||
- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) [#1009](https://github.com/scrooloose/nerdtree/pull/1009)
|
- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) [#1009](https://github.com/scrooloose/nerdtree/pull/1009)
|
||||||
- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) [#1008](https://github.com/scrooloose/nerdtree/pull/1008)
|
- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) [#1008](https://github.com/scrooloose/nerdtree/pull/1008)
|
||||||
- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/scrooloose/nerdtree/pull/1007)
|
- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/scrooloose/nerdtree/pull/1007)
|
||||||
|
|||||||
@@ -17,6 +17,13 @@ included documentation.
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
If you are using VIM version 8 or higher you can use its built-in package management; see `:help packages` for more information. Just run these commands in your terminal:
|
||||||
|
|
||||||
|
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/pack/vendor/start/nerdtree
|
||||||
|
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/nerdtree/doc" -c q
|
||||||
|
|
||||||
|
Otherwise, these are some of the other options:
|
||||||
|
|
||||||
#### [pathogen.vim](https://github.com/tpope/vim-pathogen)
|
#### [pathogen.vim](https://github.com/tpope/vim-pathogen)
|
||||||
|
|
||||||
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
|
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ let s:rootNERDTreePath = resolve(expand("<sfile>:p:h:h"))
|
|||||||
" change log is shown for the current version; otherwise, only the version
|
" change log is shown for the current version; otherwise, only the version
|
||||||
" number is shown.
|
" number is shown.
|
||||||
function! nerdtree#version(...)
|
function! nerdtree#version(...)
|
||||||
let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash()))
|
|
||||||
let l:text = 'Unknown'
|
let l:text = 'Unknown'
|
||||||
|
try
|
||||||
|
let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash()))
|
||||||
let l:line = 0
|
let l:line = 0
|
||||||
while l:line <= len(l:changelog)
|
while l:line <= len(l:changelog)
|
||||||
if l:changelog[l:line] =~ '\d\+\.\d\+'
|
if l:changelog[l:line] =~ '\d\+\.\d\+'
|
||||||
@@ -21,6 +22,8 @@ function! nerdtree#version(...)
|
|||||||
endif
|
endif
|
||||||
let l:line += 1
|
let l:line += 1
|
||||||
endwhile
|
endwhile
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
return l:text
|
return l:text
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -355,12 +355,15 @@ endfunction
|
|||||||
" scroll position
|
" scroll position
|
||||||
function! s:UI.saveScreenState()
|
function! s:UI.saveScreenState()
|
||||||
let win = winnr()
|
let win = winnr()
|
||||||
call g:NERDTree.CursorToTreeWin()
|
|
||||||
let self._screenState = {}
|
let self._screenState = {}
|
||||||
|
try
|
||||||
|
call g:NERDTree.CursorToTreeWin()
|
||||||
let self._screenState['oldPos'] = getpos(".")
|
let self._screenState['oldPos'] = getpos(".")
|
||||||
let self._screenState['oldTopLine'] = line("w0")
|
let self._screenState['oldTopLine'] = line("w0")
|
||||||
let self._screenState['oldWindowSize']= winwidth("")
|
let self._screenState['oldWindowSize']= winwidth("")
|
||||||
call nerdtree#exec(win . "wincmd w", 1)
|
call nerdtree#exec(win . "wincmd w", 1)
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: s:UI.setShowHidden(val) {{{1
|
" FUNCTION: s:UI.setShowHidden(val) {{{1
|
||||||
|
|||||||
@@ -170,10 +170,10 @@ call nerdtree#ui_glue#setupCommands()
|
|||||||
"============================================================
|
"============================================================
|
||||||
augroup NERDTree
|
augroup NERDTree
|
||||||
"Save the cursor position whenever we close the nerd tree
|
"Save the cursor position whenever we close the nerd tree
|
||||||
exec "autocmd BufLeave ". g:NERDTreeCreator.BufNamePrefix() ."* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif"
|
exec "autocmd BufLeave,WinLeave ". g:NERDTreeCreator.BufNamePrefix() ."* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif"
|
||||||
|
|
||||||
"disallow insert mode in the NERDTree
|
"disallow insert mode in the NERDTree
|
||||||
exec "autocmd BufEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
|
exec "autocmd BufEnter,WinEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
if g:NERDTreeHijackNetrw
|
if g:NERDTreeHijackNetrw
|
||||||
|
|||||||
Reference in New Issue
Block a user