Comments (52)
+1
I would love to see NERDTree commands working on visual mode, such as open a file, delete and move.
from nerdtree.
I've updated the gist to work with the current version of NERDTree. You can find it here: https://gist.github.com/PhilRunninger/99f0c78e48de42bf2010f30d983ff61f. Just place this file in your ~/.vim/nerdtree_plugin
folder, and you'll be good to go. I'd like to get some feedback on this, and then we can decide whether (and how) to include it in the base NERDTree code.
Thanks!
from nerdtree.
+1 would like this feature as well. Tried putting gist above into:
C:\Users\User\vimfiles\plugged\nerdtree\nerdtree_plugin
in gvim, restarting etc, didn't work for me, the 'o' mapping just toggled back and forth from beg to end cursor position, its default.
from nerdtree.
@elig0n, @jimafisk, I don't know if you get @-mention notifications directly from the gist, so I'm tagging you here. I've fixed the issue that required you to put the gist in ~/.vim/bundle/nerdtree/nerdtree_plugin/
. See https://gist.github.com/PhilRunninger/99f0c78e48de42bf2010f30d983ff61f#gistcomment-2890723.
from nerdtree.
I'd like this as well, to be able like I do with the MRU plugin for example.
from nerdtree.
+1
from nerdtree.
+2
from nerdtree.
+1
from nerdtree.
+1 Woudl be great to open a folder in tabs
from nerdtree.
+1
from nerdtree.
Any progress 5 months later? This would be a nice thing to have.
from nerdtree.
+1 for this feature and for opening all selected files in different tabs
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
Hey, @scrooloose:
Is this Something you'd be interested in Implementing? If not, is it something you'd be up for investigating a Pull Request creating?
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
π
from nerdtree.
π
from nerdtree.
+1
from nerdtree.
Was hoping I'd find a post on stackoverflow explaining me how to do this instead of finding a feature request on github when googling this!
from nerdtree.
+1
from nerdtree.
π
from nerdtree.
+1
from nerdtree.
+1 PLEEEEEZE
from nerdtree.
This is something I'd like to see as well. In the mean time, I'll continue to use a macro.
from nerdtree.
Chuck this in your ~/.vim/nerdtree_plugin/
dir (or ~/.vim/bundle/nerdtree_open_multiple/nerdtree_plugin
depending on your preferred setup)
https://gist.github.com/scrooloose/5eedbf80a4c62d01d25c
It's not the most fully featured solution, but it does the job. Just select a few files in visual mode and hit o.
Thoughts?
from nerdtree.
Hmmm.... actually, chuck the code into your ~/.vim/ftplugin/nerdtree/
directory instead.
My previous instructions would have the o
mapping overridden for all buffers... not just nerdtree buffers. I have updated the gist accordingly.
from nerdtree.
Same need here.
from nerdtree.
π΄ yes please
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
@scrooloose I tried a few different places to put the file, even pasting it at the bottom of fs_menu.vim
, it only lets me use o
like it was before.
I'll keep at it, but I wanted to thank you for putting the gist up, even if I am a year late.
from nerdtree.
I'm away from the computer till Monday night. Currently typing this on my phone (it hurts). Is the code working for you if you change the mapping to something other than 'o'? If so then I guess nerd tree is loading it's own mappings after setting the file type
from nerdtree.
Nerd Tree tabs?
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
This might be useful too. Instead of using visual mode to select and open from the tree list view how about using the current directory of nerdtree to pass along the name to the args list and then tab all:
args c:\dir*
tab all
That should open all files in the directory. It sort of works for me but then the tab bar runs out of room and gvim gives e36 'no more room' and the remaining buffers get put into a single split window. Not so useful.
from nerdtree.
+1
Didnt try the proposed solution. Will give feedback if I ever get to it. Thanks for the awesome plugin!
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
+1
from nerdtree.
The problem with the gist above is that it executes while in the [No Name]
buffer, so the mapping is not available where it's needed. Removing <buffer>
(which is not the solution) reveals other error messages that may be a result of the age of the code vs. the current version of NERDTree.
from nerdtree.
+1
from nerdtree.
I'm going to close this issue, since the gist is available as a NERDTree plugin.
from nerdtree.
Thanks for this!
I found I need to put the gist in my plugins directory's nerdtree/nerdtree_plugin/ which already existed.
By all means I think such a functionality should be incorporated to the base code with more options (like open in multiple tabs).
from nerdtree.
@elig0n , If you put it there, it may be deleted when you up date NERDTree or will interfere with the update. Instead, try putting it in the ~/.vim/nerdtree_plugin
folder, which you probably will need to create.
from nerdtree.
For folks who are interested in opening in multiple tabs instead of splits, in @PhilRunninger's gist above just change the h
to a t
on line 16:
call node.open({'where':'t', 'stay':1, 'keepopen':1})
from nerdtree.
I've updated my gist to include mappings for opening into split or separate tabs. Its location has changed to ~/.vim/ftplugin/nerdtree.vim
.
from nerdtree.
Related Issues (20)
- remote authentication required but no callback set HOT 3
- Command to Find current file in tree with VCS root HOT 8
- Can't find how to actually select the dropped-down result
- `(m)ove the current node` shortcut doesn't treat filepaths as case sensitive HOT 10
- Unable to open file on newly opened tree after the default tree is closed HOT 4
- Adding change logs for few last merged PRs and create tags for them HOT 10
- How to set the padding width between arrow and the icon HOT 4
- Issue #1368 remote authentication requiredβ¦. HOT 2
- What's the remap api for nerdtree menu? HOT 2
- Change license to something more standard HOT 3
- Customize key to open quick help menu HOT 3
- Error when loading a vim session: BufLeave NERD_tree_* autocommand: Variable b:NERDTree does not exist HOT 3
- E1208: -complete used without allowing arguments HOT 2
- BUG: NERDTree Hijacked Movement Keys HOT 6
- Installing NERDTree with Vim 9 on Windows 10 HOT 4
- Error detected while processing WinEnter Autocommands for "*"..function <SNR>38_HandleOnlyWindow[13]..<SNR>38_CloseWindow: HOT 1
- Add user choice to follow symlinks or keep them HOT 4
- Installation??? HOT 4
- highlight the current filename in the tree window after following a tag HOT 1
- NERDTree.TreeNotOpen thrown when opening Neovim into NERDTree HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerdtree.