Code Monkey home page Code Monkey logo

Comments (52)

endel avatar endel commented on May 22, 2024 4

+1

I would love to see NERDTree commands working on visual mode, such as open a file, delete and move.

from nerdtree.

PhilRunninger avatar PhilRunninger commented on May 22, 2024 2

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.

arcadesdude avatar arcadesdude commented on May 22, 2024 1

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

PhilRunninger avatar PhilRunninger commented on May 22, 2024 1

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

IsaacRemuant avatar IsaacRemuant commented on May 22, 2024

I'd like this as well, to be able like I do with the MRU plugin for example.

from nerdtree.

lukeorland avatar lukeorland commented on May 22, 2024

+1

from nerdtree.

FlaviuSim avatar FlaviuSim commented on May 22, 2024

+2

from nerdtree.

baopham avatar baopham commented on May 22, 2024

+1

from nerdtree.

forthold avatar forthold commented on May 22, 2024

+1 Woudl be great to open a folder in tabs

from nerdtree.

zgstyle avatar zgstyle commented on May 22, 2024

+1

from nerdtree.

tankorsmash avatar tankorsmash commented on May 22, 2024

Any progress 5 months later? This would be a nice thing to have.

from nerdtree.

while0pass avatar while0pass commented on May 22, 2024

+1 for this feature and for opening all selected files in different tabs

from nerdtree.

daGrevis avatar daGrevis commented on May 22, 2024

+1

from nerdtree.

patrickkettner avatar patrickkettner commented on May 22, 2024

+1

from nerdtree.

AlyxRen avatar AlyxRen commented on May 22, 2024

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.

taesiri avatar taesiri commented on May 22, 2024

+1

from nerdtree.

lavrukov avatar lavrukov commented on May 22, 2024

+1

from nerdtree.

mkazantsev avatar mkazantsev commented on May 22, 2024

+1

from nerdtree.

mikedfunk avatar mikedfunk commented on May 22, 2024

πŸ‘

from nerdtree.

woltage avatar woltage commented on May 22, 2024

πŸ‘

from nerdtree.

kikyous avatar kikyous commented on May 22, 2024

+1

from nerdtree.

octagonal avatar octagonal commented on May 22, 2024

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.

mahemoff avatar mahemoff commented on May 22, 2024

+1

from nerdtree.

jrhorn424 avatar jrhorn424 commented on May 22, 2024

πŸ‘

from nerdtree.

xocoo avatar xocoo commented on May 22, 2024

+1

from nerdtree.

gad2103 avatar gad2103 commented on May 22, 2024

+1 PLEEEEEZE

from nerdtree.

tankorsmash avatar tankorsmash commented on May 22, 2024

This is something I'd like to see as well. In the mean time, I'll continue to use a macro.

from nerdtree.

scrooloose avatar scrooloose commented on May 22, 2024

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.

scrooloose avatar scrooloose commented on May 22, 2024

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.

noscripter avatar noscripter commented on May 22, 2024

Same need here.

from nerdtree.

bugeats avatar bugeats commented on May 22, 2024

🐴 yes please

from nerdtree.

helio-frota avatar helio-frota commented on May 22, 2024

+1

from nerdtree.

lisandrofernandez avatar lisandrofernandez commented on May 22, 2024

+1

from nerdtree.

tankorsmash avatar tankorsmash commented on May 22, 2024

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

scrooloose avatar scrooloose commented on May 22, 2024

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.

ryanblakeley avatar ryanblakeley commented on May 22, 2024

Nerd Tree tabs?

from nerdtree.

SukumarMehta avatar SukumarMehta commented on May 22, 2024

+1

from nerdtree.

hihihippp avatar hihihippp commented on May 22, 2024

+1

from nerdtree.

juegas avatar juegas commented on May 22, 2024

+1

from nerdtree.

arcadesdude avatar arcadesdude commented on May 22, 2024

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.

lethargi avatar lethargi commented on May 22, 2024

+1
Didnt try the proposed solution. Will give feedback if I ever get to it. Thanks for the awesome plugin!

from nerdtree.

gabrielps avatar gabrielps commented on May 22, 2024

+1

from nerdtree.

wmhorne avatar wmhorne commented on May 22, 2024

+1

from nerdtree.

 avatar commented on May 22, 2024

+1

from nerdtree.

mawkler avatar mawkler commented on May 22, 2024

+1

from nerdtree.

PhilRunninger avatar PhilRunninger commented on May 22, 2024

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.

f1nwe avatar f1nwe commented on May 22, 2024

+1

from nerdtree.

PhilRunninger avatar PhilRunninger commented on May 22, 2024

I'm going to close this issue, since the gist is available as a NERDTree plugin.

from nerdtree.

elig0n avatar elig0n commented on May 22, 2024

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.

PhilRunninger avatar PhilRunninger commented on May 22, 2024

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

jimafisk avatar jimafisk commented on May 22, 2024

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.

PhilRunninger avatar PhilRunninger commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.