Commit Graph

623 Commits

Author SHA1 Message Date
pendulm
6ef67a2d8e Add correspoding close action to cascade open single child dir 2013-04-22 23:39:26 +08:00
pendulm
60683f1cce Fix typo Casade to Cascade 2013-04-22 23:35:15 +08:00
Martin Grenfell
eaf19734e7 move the class files out of the plugin dir
On some new versions of vim these files were being loaded before the
main NERD_tree.vim which was causing errors as dependencies werent
loaded in time. Move the classes into lib - so vim wont try to load them
until we tell it
2013-04-13 20:32:25 +01:00
Martin Grenfell
9a341ec18f fix a bug where the user couldnt override the mapping for <cr> 2013-04-09 10:10:14 +01:00
Martin Grenfell
f93d2c79e5 fix NERDTreeCWD
Closes #233
2013-04-03 13:39:10 +01:00
Martin Grenfell
40d05ace57 catch an error thrown when refreshing a dir with a FIFO or socket 2013-01-30 13:54:30 +00:00
Martin Grenfell
64cb6204cc move a couple of functions into NERDTreeCreator
The "next buffer name" functions are only used in NERDTreeCreator so put
them there.
2013-01-09 09:51:28 +00:00
Martin Grenfell
c3b63d2fd9 add some class methods to wrap the NERDTreeCreator public methods
This is needed because some versions of vim dont let you chain method
calls together. So do the work in NERDTreeCreator instead of forcing all
callers to break the New().createXXX() calls out onto 2 lines with an
intermediate variable.

Fixes #226.
2013-01-09 00:43:37 +00:00
Martin Grenfell
7cbaee253a Merge pull request #227 from kasyaar/copy_node_fix
fixed error messages on copy node in NERDTree buffer
2013-01-08 07:17:14 -08:00
Dmitry Kasimtsev
f5956dbbcf fixed error messages on copy node in NERDTree buffer 2013-01-08 17:17:04 +02:00
Martin Grenfell
25b80b8a16 extract the tree creation functions out into their own class
Add the NERDTreeCreator class.

Stick all functions related to creating a primary/secondary/mirror
nerdtree in there. We may break this down further in the future, but
this is a good starting point.

Make some of the interface binding functions in autoload/nerdtree
public. This is needed since we are accessing some of them from
NERDTreeCreator. Should be temporary until we get some kind of proper
interface binding system set up.
2013-01-08 00:04:30 +00:00
Martin Grenfell
29d3db8ffe fix a couple of function calls that should have been renamed
Call nerdtree#echo, not s:echo. This was changed in the big refactor.

Fixes #224.
2013-01-06 00:56:22 +00:00
Martin Grenfell
2eff928e7c some cosmetic updates to the class files
* fix the fold markers (they were unnecessarily deep)
* always have one line under each method
* update some of the fold comments -> always use FUNCTION in all caps
* add a modeline to each class file
2013-01-05 12:30:07 +00:00
Martin Grenfell
a7d5b3dbc1 fix the <enter> mapping
It now acts the same as the ActivateNode mapping ('o' by default) again.
This was broken in the big refactor.

Fixes #222
2013-01-05 11:58:36 +00:00
Martin Grenfell
cc0777b792 move KeyMap_Invoke into the autoload file
This will keep the class file cleaner, and may also fix #223
2013-01-05 11:44:48 +00:00
Martin Grenfell
8a984260e7 manually apply #220 to fix NERDTreeFind for hidden dirs 2013-01-05 01:48:13 +00:00
Martin Grenfell
370f180ca0 replace a script level var with a query 2013-01-05 01:47:20 +00:00
Martin Grenfell
fb4a5a116a decompose the giant NERD_tree.vim file
* Move the classes out into `plugin/nerdtree/<classname>`.
* Move the other functions out into `autoload/nerdtree.vim`.

Stuff still to do:

* extract out at least one view class from `autoload/nerdtree` -
  something like NERDTreeWindow
* figure out which functions in autoload/nerdtree should be scoped to
  the script instead of public
2013-01-05 01:08:06 +00:00
Martin Grenfell
1817ccdb57 Merge pull request #219 from felipebueno/master
A question asked by many VIM / NERDTree newcomers
2013-01-02 05:08:06 -08:00
Felipe Bueno
154f7aae7b Added a frequently asked question to README 2012-12-31 16:15:55 -02:00
Martin Grenfell
3a8310a60b Merge pull request #213 from cperl82/fixes
Fix s:Path.Resolve to it handles '/' properly
2012-12-10 12:26:44 -08:00
Chris Perl
bb1390c0c7 Fix s:Path.Resolve to it handles '/' properly 2012-12-10 14:44:01 -05:00
Martin Grenfell
1dc3891f96 Merge pull request #204 from techlivezheng/feature/chrootcwd
Add a NERDTreeCWD command to change tree root to CWD
2012-11-12 02:10:45 -08:00
Martin Grenfell
dff80ff7d0 Merge pull request #203 from techlivezheng/feature/find-in-existing-window
Reveal the current editing file in current NERDTree window instaead initiating a new one
2012-11-12 02:06:22 -08:00
Martin Grenfell
30a770aab0 add Path.isUnixHiddenFile and refactor to use it 2012-11-12 10:01:15 +00:00
Martin Grenfell
36cd8bfea7 Merge pull request #202 from techlivezheng/feature/find-hidden-file
Make NERDTreeFind work on hidden files
2012-11-12 01:57:46 -08:00
Techlive Zheng
072d46880a Add a NERDTreeCWD command to change tree root to CWD 2012-11-05 19:11:44 +08:00
Techlive Zheng
c59ac8fba1 Make NERDTreeFind use an existing NERDTree window 2012-11-05 01:25:11 +08:00
Techlive Zheng
ce6c347f85 Make NERDTreeFind work on hidden files 2012-11-05 01:25:11 +08:00
Martin Grenfell
22de74a45b Merge pull request #200 from hpesoj/master
NERD tree doesn't currently work on Vim 7.2 and below.
2012-10-31 04:02:45 -07:00
Joseph Thomson
16268c9c21 Fix call to globpath() for Vim 7.2 and below.
globpath() takes an extra optional parameter in Vim 7.3, but this
breaks NERD tree on earlier versions.
2012-10-29 16:30:29 +00:00
Martin Grenfell
3e44d4ea5c Merge pull request #191 from ZeusTheTrueGod/master
Improve handling obsolete buffers when renaming or deleting a file via the NERDTree 'm' menu
2012-10-18 01:11:35 -07:00
Martin Grenfell
d62180d0ff Merge pull request #150 from cperl82/issue-144
Replace virtcol() with len() in handleLeftClick().
2012-10-15 05:55:21 -07:00
Martin Grenfell
bf79e223ae Merge pull request #196 from mark-rushakoff/master
Fix typo in copy action
2012-10-03 13:03:09 -07:00
Mark Rushakoff
92a31a6fb2 Fix typo in copy action 2012-10-03 12:39:56 -07:00
ZeusTheTrueGod
6b687977d9 Better handling file renaming and deleting
If you are renaming a file via the mm hotkey and it is already opened then all
tabs and windows containing the old file will be replaced with a
new file. Current tab and windows structure is not changed anymore

If you are deleting a file via the md hotkey and it is already open, i.e.
presents in buffer lists then a buffer will be removed but a window and tab
will be kept with a ':enew' file
2012-08-26 13:23:06 +00:00
ZeusTheTrueGod
0a16b24268 Better flow for renaming and deleting files
Previously when you delete or moved a file via
md or mm commands the NERDTree was asking you about what to do
with the remaining buffer of the just deleted or moved file. I
always press 'y' in this cases so I've decided to add a new parameter,
NERDTreeAutoDeleteBuffer which you can set to 1 in order to skip
this confirmation.
2012-08-26 11:56:45 +00:00
Martin Grenfell
a1433c485e update the doc for NERDTreeCasadeOpenSingleChildDir 2012-07-05 15:56:11 +01:00
Martin Grenfell
b64f4428c1 default NERDTreeCasadeOpenSingleChildDir to 1 2012-07-05 15:51:13 +01:00
Martin Grenfell
e7b663fe94 Merge pull request #180 from pendulm/master
For recusive open single directory child
2012-07-05 07:40:19 -07:00
pendulm
29e687978b add option NERDTreeCasadeOpenSingleChildDir and function
TreeDirNode.openAlong for Issues #179.
2012-07-05 22:26:57 +08:00
Martin Grenfell
dbeb1947ea Merge pull request #172 from stephenprater/master
Files matching wildignore patterns are not shown in NERDTree
2012-06-30 01:59:22 -07:00
Martin Grenfell
cdb31d423c Merge pull request #178 from franksort/master
Fixed a typo. changing s:clearBoomarks to s:clearBookmarks in plugin/NERD_tree.vim.
2012-06-30 01:57:34 -07:00
Frank S
87208d210b Fixed typo. changing s:clearBoomarks to s:clearBookmarks. 2012-06-27 20:07:52 -07:00
A.G. Russell Knives
121607b351 ignore wildignore setting 2012-06-14 09:57:24 -05:00
Martin Grenfell
2cb0fc78fb add autocmds for fugitive integration
Add 2 autocmds - NERDTreeInit and NERDTreeNewRoot. These are called when
a tree is created and when the root is changed. The goal is to give the
fugitive plugin something to listen for so it can add the G* commands to
nerdtree buffers in git repo dirs.
2012-04-02 14:51:19 +01:00
Chris Perl
94b2db2de6 Replace virtcol() with len() in handleLeftClick().
When 'virtualedit' is set, the column where the cursor resides can no longer be
relied on for determining the number of elements in the 'line' list for
iterating.  Replacing virtcol() with len() seems to work correctly and not
result in E684 errors.  Fixes Issue #144
2012-03-17 09:36:47 -04:00
Martin Grenfell
678bb28168 add NERDTreeFocus command - calls the NERDTreeFocus() function 2012-02-17 15:31:37 +00:00
Martin Grenfell
aa1e7d642f fix previewing of directory nodes
Previously if we used the gi/gs mappings on a dir node/bookmark the
cursor would end up in the new window. Now it stays in the current
window as expected
2012-02-16 16:31:50 +00:00
Martin Grenfell
7e7e761d7f Merge pull request #122 from cperl82/fixes
Add calls to NERDTreeAddKeyMap for previewing Bookmarks
2012-02-16 08:16:51 -08:00