lazy load preservim/nerdtree
lazy load preservim/nerdtree

alternatively
- |     " toggle nerdtree with F12
  |     nnoremap <silent> <expr> <F12>
  |         \ printf(!exists('g:loaded_nerd_tree') ? ':packadd nerdtree<CR>' : '' ) .
  |         \ ':NERDTreeToggle<CR>'
  |     inoremap <silent> <expr> <F12>
  |         \ printf(!exists('g:loaded_nerd_tree') ? '<C-O>:packadd nerdtree<CR>' : '' ) .
  |         \ '<C-O>:NERDTreeToggle<CR>'
  |     vnoremap <silent> <expr> <F12>
  |         \ printf(!exists('g:loaded_nerd_tree') ? '<ESC>:packadd nerdtree<CR>gv' : '' ) .
  |         \ '<ESC>:NERDTreeToggle<CR>gv'
  |
  |     " if nerdtree is closed, find current file in nerdtree
  |     " if nerdtree is open, close it
  |     function! s:ToggleNERDTreeFind() abort
  |       if exists('t:NERDTreeBufName') && (bufwinnr(t:NERDTreeBufName) != -1)
  |         execute ':NERDTreeToggle'
  |       else
  |         execute ':NERDTreeFind'
  |       endif
  |     endfunction
  |     command! ToggleNERDTreeFind call <SID>ToggleNERDTreeFind()
  |     nnoremap <silent> <expr> <S-F12>
  |         \ printf(!exists('g:loaded_nerd_tree') ? ':packadd nerdtree<CR>' : '' ) .
  |         \ ':ToggleNERDTreeFind<CR>'

curious to know which approach is more efficient

atweiden/pacfiles,atweiden/pacfiles