Skip to content

Fixes 'tree view' mapping suggestion in doc to not change file order, and not overwrite " register #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions doc/dirvish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,11 @@ There is a hacky solution. Put this in your vimrc and hit "t" on a directory: >
augroup dirvish_config
autocmd!
autocmd FileType dirvish
\ nnoremap <silent><buffer> t ddO<Esc>:let @"=substitute(@", '\n', '', 'g')<CR>:r ! find "<C-R>"" -maxdepth 1 -print0 \| xargs -0 ls -Fd<CR>:silent! keeppatterns %s/\/\//\//g<CR>:silent! keeppatterns %s/[^a-zA-Z0-9\/]$//g<CR>:silent! keeppatterns g/^$/d<CR>:noh<CR>
\ nnoremap <silent><buffer> t :let b:dirvish_old_default_reg = @"<CR>0C<Esc>:let @"=substitute(@", '\n', '', 'g')<CR>:r ! find "<C-R>"" -maxdepth 1 -print0 \| xargs -0 ls -Fd<CR>:silent! keeppatterns %s/\/\//\//g<CR>:silent! keeppatterns %s/[^a-zA-Z0-9\/]$//g<CR>:silent! keeppatterns g/^$/d<CR>:noh<CR>:let @"=b:dirvish_old_default_reg<CR>:unlet b:dirvish_old_default_reg<CR>
augroup END

Note:
- Expects unix-style filepaths.
- Will overwrite your " register.

==============================================================================
vim:tw=78:ts=4:et:ft=help:norl: