You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It gave me the error "E121: Undefined variable: b:NERDTree"
My full vimrc is
set t_Co=256
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'editorconfig/editorconfig-vim' " editorconfig, always not fucking working
Plug 'tpope/vim-commentary' " allows typing v-select block then gc to comment block
Plug 'tpope/vim-fugitive' " allows some git commands inside vim
Plug 'joshdick/onedark.vim' " theme
Plug 'vim-airline/vim-airline' " status line
Plug 'leafgarland/typescript-vim'
Plug 'pangloss/vim-javascript'
Plug 'scrooloose/nerdtree' ""
Plug 'w0rp/ale' " autofix and linting
Plug 'Xuyuanp/nerdtree-git-plugin' " display files as modified from git in nerdtree
Plug 'junegunn/fzf.vim'
Plug 'yegappan/mru'
Plug 'scrooloose/nerdtree-project-plugin'
call plug#end()
colorscheme onedark
let g:airline#extensions#tabline#enabled = 1
autocmd vimenter * NERDTree
autocmd VimEnter * wincmd p
"closes nerdtree on last
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
set mouse=a
set autoread
set nu
set noswapfile
set nobackup
set nowb
let NERDTreeMouseMode=3
let g:ale_fixers = ['eslint']
let g:ale_fix_on_save = 1
set backspace=indent,eol,start " for some reason backspace doesn't work normally, wtf
set list
let g:EditorConfig_exclude_patterns = ['fugitive://.*']
The text was updated successfully, but these errors were encountered:
It looks like NERDTree window has to be focused to use this functionality. @scrooloose is it possible to e.g. fetch open directories without having NERDTree visible?
UPDATE: answering my own question:
let b_NERDTree = getbufvar(t:NERDTreeBufName, 'NERDTree')
Hi there,
I just was trying to use the command
:NERDTreeProjectSave myproj
It gave me the error "E121: Undefined variable: b:NERDTree"
My full vimrc is
The text was updated successfully, but these errors were encountered: