This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This syntax file changes the indentation of NERDTree to appear as 1 space | |
" per level instead of the normal 2 spaces. It works only if your vim has the | |
" +conceal feature turned on, and it must be saved as | |
" ~/.vim/after/syntax/nerdtree.vim to work properly. | |
if has("conceal") | |
syntax clear NERDTreeOpenable | |
syntax clear NERDTreeClosable | |
let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-') | |
exec 'syntax match CompressSpaces #['.s:dirArrows.' ]\zs \ze.*' . g:NERDTreeNodeDelimiter . '# containedin=ALL conceal' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:PurgeFiles(folder, regex) | |
" Read file listing into new buffer, and delete empty line. | |
enew | |
call execute ("r! ls " . a:folder, "silent") | |
execute "1delete" | |
" Duplicate text on each line (minus the .swp extension). We now have: | |
" swapfile without extension | swapfile | |
" undofile | undofile | |
call execute(a:regex, "silent") |