项目作者: antonk52

项目描述 :
fs menu for vim-dirvish
高级语言: Vim script
项目地址: git://github.com/antonk52/dirvish-fs.vim.git
创建时间: 2020-09-11T01:03:13Z
项目社区:https://github.com/antonk52/dirvish-fs.vim

开源协议:MIT License

下载


dirvish-fs.vim

dirvish-fs is a complimentary plugin to vim-dirvish. It adds nerdtree like shortcuts to add/move/copy/remove nodes in dirvish buffers.

Installation

Install both using your favorite plugin manager. An example using vim-plug:

  1. Plug 'justinmk/vim-dirvish'
  2. Plug 'antonk52/dirvish-fs.vim'

Mappings

In dirvish buffer

  • ma - add node, end with / to add directory
  • mm - move node
  • mc - copy node
  • dd - remove node

Custom mappings

To disable the default mappings add the following to your .vimrc

  1. " disables default mappings
  2. let g:dirvish_fs_default_mappings = 0
  3. " sets custom mappings
  4. function! DivrishMappings()
  5. nmap <buffer> <silent>dd <Plug>DirvishFsRemove
  6. nmap <buffer> <silent>ma <Plug>DirvishFsAdd
  7. nmap <buffer> <silent>mm <Plug>DirvishFsMove
  8. nmap <buffer> <silent>mc <Plug>DirvishFsCopy
  9. endfunction
  10. autocmd FileType dirvish call DivrishMappings()

Why?

It was the only thing stopping me from jumping off bloated NERDTree plugin.

Pull requests are welcome