vim-dasht

:information_desk_person: (Neo)Vim plugin for dasht integration

Github星跟蹤圖

dasht.vim

A (Neo)Vim plugin for dasht integration:

  • Search docsets for something you type:

    " search related docsets
    nnoremap <Leader>k :Dasht<Space>
    
    " search ALL the docsets
    nnoremap <Leader><Leader>k :Dasht!<Space>
    
  • Search docsets for words under cursor:

    " search related docsets
    nnoremap <silent> <Leader>K :call Dasht([expand('<cword>'), expand('<cWORD>')])<Return>
    
    " search ALL the docsets
    nnoremap <silent> <Leader><Leader>K :call Dasht([expand('<cword>'), expand('<cWORD>')], '!')<Return>
    
  • Search docsets for your selected text:

    " search related docsets
    vnoremap <silent> <Leader>K y:<C-U>call Dasht(getreg(0))<Return>
    
    " search ALL the docsets
    vnoremap <silent> <Leader><Leader>K y:<C-U>call Dasht(getreg(0), '!')<Return>
    
  • Specify related docsets for searching:

    let g:dasht_filetype_docsets = {} " filetype => list of docset name regexp
    
    " For example: {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
      " When in Elixir, also search Erlang:
      let g:dasht_filetype_docsets['elixir'] = ['erlang']
    
      " When in C++, also search C, Boost, and OpenGL:
      let g:dasht_filetype_docsets['cpp'] = ['^c$', 'boost', 'OpenGL']
    
      " When in Python, also search NumPy, SciPy, and Pandas:
      let g:dasht_filetype_docsets['python'] = ['(num, sci)py', 'pandas']
    
      " When in HTML, also search CSS, JavaScript, Bootstrap, and jQuery:
      let g:dasht_filetype_docsets['html'] = ['css', 'js', 'bootstrap']
    
    " and so on... }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
    
  • Configure where results are displayed:

    " create window below current one (default)
    let g:dasht_results_window = 'new'
    
    " create window beside current one
    let g:dasht_results_window = 'vnew'
    
    " use current window to show results
    let g:dasht_results_window = 'enew'
    
    " create panel at left-most edge
    let g:dasht_results_window = 'topleft vnew'
    
    " create panel at right-most edge
    let g:dasht_results_window = 'botright vnew'
    
    " create new tab beside current one
    let g:dasht_results_window = 'tabnew'
    

Testing

Developers can run the vim-vspec tests:

gem install bundler         # first time
bundle install              # first time
bundle exec vim-flavor test # every time

License

Like my work? :+1: Please spare a life today as thanks!
:cow::pig::chicken::fish::speak_no_evil::v::revolving_hearts:

Copyright 2016 Suraj N. Kurapati https://github.com/sunaku

Distributed under the same terms as Vim itself.

主要指標

概覽
名稱與所有者sunaku/vim-dasht
主編程語言Vim Script
編程語言Ruby (語言數: 2)
平台
許可證
所有者活动
創建於2016-05-18 06:21:12
推送於2023-01-31 06:41:23
最后一次提交2022-12-11 09:31:04
發布數0
用户参与
星數133
關注者數4
派生數4
提交數32
已啟用問題?
問題數15
打開的問題數3
拉請求數1
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?