This plugin allows you to add a React/Typescript component folder from NerdTree.
You need to have a working verion of NerdTree running on vim
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/whatever555/nerdtree-react-component.git ~/.vim/pack/vendor/start/nerdtree-react-component
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/nerdtree-react-component/doc" -c q
Or you can use the following:
In the terminal,
git clone https://github.com/whatever555/nerdtree-react-component.git ~/.vim/bundle/nerdtree-react-component
In your vimrc,
call pathogen#infect()
syntax on
filetype plugin indent on
Then reload vim, run :helptags ~/.vim/bundle/nerdtree-react-component/doc/
or :Helptags
.
call vundle#begin()
Plugin 'whatever555/nerdtree-react-component'
call vundle#end()
call plug#begin()
Plug 'whatever555/nerdtree-react-component'
call plug#end()
call dein#begin()
call dein#add('whatever555/nerdtree-react-component')
call dein#end()
apt-vim install -y https://github.com/whatever555/nerdtree-react-component.git
In the NERDTree explorer type m
to open the menu. You should see a new option added to the list for adding a react component folder. Type t
and enter your react component's name. There should now be a new directory created for your component including a __tests__
, __mocks__
and __stories__
sub folders.
:help NERDTreeReactComponent