https://github.com/sunaku/vim-dasht
:information_desk_person: (Neo)Vim plugin for dasht integration
https://github.com/sunaku/vim-dasht
dash-docset vim-plugins
Last synced: 10 months ago
JSON representation
:information_desk_person: (Neo)Vim plugin for dasht integration
- Host: GitHub
- URL: https://github.com/sunaku/vim-dasht
- Owner: sunaku
- Created: 2016-05-18T06:21:12.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T06:41:23.000Z (about 3 years ago)
- Last Synced: 2025-03-27T21:15:02.377Z (11 months ago)
- Topics: dash-docset, vim-plugins
- Language: Vim Script
- Homepage: https://github.com/sunaku/dasht
- Size: 25.4 KB
- Stars: 134
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dasht.vim
A (Neo)Vim plugin for [dasht]( https://github.com/sunaku/dasht ) integration:
* Search docsets for something you type:
```vim
" search related docsets
nnoremap k :Dasht
" search ALL the docsets
nnoremap k :Dasht!
```
* Search docsets for words under cursor:
```vim
" search related docsets
nnoremap K :call Dasht(dasht#cursor_search_terms())
" search ALL the docsets
nnoremap K :call Dasht(dasht#cursor_search_terms(), '!')
```
* Search docsets for your selected text:
```vim
" search related docsets
vnoremap K y:call Dasht(getreg(0))
" search ALL the docsets
vnoremap K y:call Dasht(getreg(0), '!')
```
* Specify related docsets for searching:
```vim
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'] = ['elixir', 'erlang']
" When in C++, also search C, Boost, and OpenGL:
let g:dasht_filetype_docsets['cpp'] = ['cpp', '^c$', 'boost', 'OpenGL']
" When in Python, also search NumPy, SciPy, and Pandas:
let g:dasht_filetype_docsets['python'] = ['python', '(num|sci)py', 'pandas']
" When in HTML, also search CSS, JavaScript, Bootstrap, and jQuery:
let g:dasht_filetype_docsets['html'] = ['html', 'css', 'js', 'bootstrap']
" When in Java, search Java SE11, but not JavaScript:
let g:dasht_filetype_docsets['java'] = ['java_se11']
" and so on... }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
```
* Configure where results are displayed:
```vim
" 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]( https://github.com/kana/vim-vspec ) tests:
```sh
gem install bundler # first time
bundle install # first time
bundle exec vim-flavor test # every time
```
## License
[Spare A Life]: https://sunaku.github.io/vegan-for-life.html
> Like my work? 👍 Please [spare a life] today as thanks! 🐄🐖🐑🐔🐣🐟✨🙊✌
> Why? For 💕 ethics, the 🌎 environment, and 💪 health; see link above. 🙇
Copyright 2016 Suraj N. Kurapati
Distributed under the same terms as Vim itself.