Skip to content

Instantly share code, notes, and snippets.

@PhilRunninger
PhilRunninger / nerdtree.vim
Last active February 24, 2024 09:47
Open multiple files in NERDTree at once with Visual selection and [NERDTree defaults] o, i, s, and t.
" Filename: ~/.vim/ftplugin/nerdtree.vim
" Purpose: Given a Visual-Line selection in the NERDTree buffer, this code
" lets you open all selected files with the same key mappings, which, by
" default, are:
" o - open files in previous window
" i - open files in horizontally split windows
" s - open files in vertically split windows
" t - open files in new tabs
execute "vnoremap <buffer> " . g:NERDTreeMapActivateNode . " :call <SID>OpenMultiple('p')<CR>"