Back to Home

NERDTree: add / delete files / folders in console vim

vim · nerdtree

NERDTree: add / delete files / folders in console vim

    One foot on the dark side


    Recently, I began to feel uncomfortable using vim on a new project. Frequent addition and deletion of files / folders in an actively developing project has become a little tiring. Therefore, being a man of suspiciously weak character, I decided that vim was not for me and began to “look for” happiness in the camp of the enemy ...


    Dark side


    Forgive me the emacs community, but damn what trained fingers you need to have in order to play emacs chords without hesitation. Although this is not the main reason for my return to the camp of the conditionally “bright” side of the force, it turned out to be decisive ... According to the words of my manipulator-employee, even an emacs-loving customer, being a very pragmatic person, complained to him that they say vim still gets less tired. And there, little things, little things, and my decision has accumulated to return ...

    The Return of the Jedi


    Having broken the manual assembly of vim on my mac at lunch, I tried in every way to recall the configure parameters that collect vim with all the options my plugins needed (the + clientserver option needed for the ruby_debug plugin became a stone of attraction). Having
    remembered the magic set of options, I still assembled vim and restored it on my mac an afternoon balance of power ... Although by that time I was in a firm decision to stay with vim forever, my problem with creating / deleting files / directories did not dare. I did it either using something like:! Mkdir or:! Touch - it was tiring.
    In general, how long it is short, but came across directly to the github-ovsky repository nerdtree .
    The nerdtree_plugin / folder immediately attracted attention .- there are two plugins that add additional menus in graphical mode, and specifically fs_menu.vim adds menu items with the addition / removal of nodes that are cherished to me. The NERDTreeAddNode function directly adds nodes and deletes NERDTreeDeleteNode accordingly ...
    Everything is just super, but I use only the console vim because of my conservatism :( It turns out that this joy passed me by :( But no ...

    May the force be with us


    Climbing there a bit by plugin / NERD_tree.vim, I kind of guessed that there is now a Public API in which there is a wonderful NERDTreeAddKeyMap method. And what do you think? This method allows you to do wonders with the NERDTree panel. At the entrance, he takes a Dictionary of the form: Well then I think even the most lazy Padovan knows what to do ...
    {'key':'<быстрые клавиши>' ,
    'quickhelpText': '<Текст для отображения в помощи панели NERDTree>',
    'callback': '<имя вызываемой функции по нажатию key>'}

    Read Next