mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-02 01:30:28 +08:00
Compare commits
No commits in common. "e9c0f6c4c6301531c5f4661cc7167deb9c263c48" and "2c92c0b51ffa5303eb54f54b3ea5a1a8385a36bc" have entirely different histories.
e9c0f6c4c6
...
2c92c0b51f
@ -436,14 +436,7 @@ EOT
|
||||
_checkdir autoload/SpaceVim/plugins/
|
||||
_detact autoload/SpaceVim/plugins/scrollbar.vim
|
||||
_detact LICENSE
|
||||
_detact_bundle scrollbar.vim README.md
|
||||
_checkdir plugin
|
||||
_detact_bundle scrollbar.vim plugin/scrollbar.vim
|
||||
_checkdir lua/spacevim/plugin
|
||||
_detact lua/spacevim/plugin/scrollbar.lua
|
||||
_checkdir lua/spacevim/api/vim
|
||||
_detact lua/spacevim/api/vim/buffer.lua
|
||||
_detact lua/spacevim/api/vim/window.lua
|
||||
_default_readme "scrollbar.vim" "floating scrollbar support for neovim/vim[wip]"
|
||||
;;
|
||||
GitHub.vim)
|
||||
git clone https://github.com/wsdjeg/GitHub.vim.git detach/$1
|
||||
|
@ -113,10 +113,6 @@ function! SpaceVim#layers#ui#plugins() abort
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-airline-themes',
|
||||
\ { 'merged' : 0}])
|
||||
endif
|
||||
if s:enable_scrollbar
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/scrollbar.vim',
|
||||
\ { 'merged' : 0}])
|
||||
endif
|
||||
|
||||
return plugins
|
||||
|
||||
@ -175,8 +171,20 @@ function! SpaceVim#layers#ui#config() abort
|
||||
noremap <silent> <F2> :TagbarToggle<CR>
|
||||
endif
|
||||
|
||||
" this options only support neovim now.
|
||||
augroup spacevim_layer_ui
|
||||
autocmd!
|
||||
let events = join(filter( ['BufEnter','WinEnter', 'QuitPre', 'CursorMoved', 'VimResized', 'FocusGained', 'WinScrolled' ], 'exists("##" . v:val)'), ',')
|
||||
if s:enable_scrollbar && SpaceVim#plugins#scrollbar#usable()
|
||||
exe printf('autocmd %s * call SpaceVim#plugins#scrollbar#show()',
|
||||
\ events)
|
||||
autocmd WinLeave,BufLeave,BufWinLeave,FocusLost
|
||||
\ * call SpaceVim#plugins#scrollbar#clear()
|
||||
" why this autocmd is needed?
|
||||
"
|
||||
" because the startify use noautocmd enew
|
||||
autocmd User Startified call s:clear_previous_scrollbar()
|
||||
endif
|
||||
if !empty(s:cursorword_exclude_filetypes)
|
||||
exe printf('autocmd FileType %s let b:cursorword = 0',
|
||||
\ join(s:cursorword_exclude_filetypes, ','))
|
||||
@ -634,6 +642,11 @@ function! SpaceVim#layers#ui#set_variable(var) abort
|
||||
\ ))
|
||||
endfunction
|
||||
|
||||
function! s:clear_previous_scrollbar() abort
|
||||
let bufnr = bufnr('#')
|
||||
call SpaceVim#plugins#scrollbar#clear(bufnr)
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#ui#health() abort
|
||||
call SpaceVim#layers#ui#plugins()
|
||||
call SpaceVim#layers#ui#config()
|
||||
|
@ -1,37 +0,0 @@
|
||||
# scrollbar.vim
|
||||
|
||||
> _scrollbar.vim_ is floating scrollbar plugin for vim and neovim.
|
||||
|
||||
[](https://spacevim.org)
|
||||
[](LICENSE)
|
||||
|
||||

|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Install](#install)
|
||||
- [Feedback](#feedback)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Install
|
||||
|
||||
1. Using `scrollbar.vim` in SpaceVim:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = 'ui'
|
||||
enable_scrollbar = true
|
||||
```
|
||||
|
||||
2. Using `scrollbar.vim` without SpaceVim:
|
||||
|
||||
```
|
||||
Plug 'wsdjeg/scrollbar.vim'
|
||||
```
|
||||
|
||||
## Feedback
|
||||
|
||||
The development of this plugin is in [`SpaceVim/bundle/scrollbar.vim`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/scrollbar.vim) directory.
|
||||
|
||||
If you encounter any bugs or have suggestions, please file an issue in the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues)
|
@ -1,26 +0,0 @@
|
||||
"=============================================================================
|
||||
" scrollbar.vim --- scrollbar plugin for vim and neovim
|
||||
" Copyright (c) 2016-2019 Wang Shidong & Contributors
|
||||
" Author: Wang Shidong < wsdjeg@outlook.com >
|
||||
" URL: https://spacevim.org
|
||||
" License: GPLv3
|
||||
"=============================================================================
|
||||
|
||||
function! s:clear_previous_scrollbar() abort
|
||||
let bufnr = bufnr('#')
|
||||
call SpaceVim#plugins#scrollbar#clear(bufnr)
|
||||
endfunction
|
||||
augroup spacevim_scrollbar
|
||||
autocmd!
|
||||
let events = join(filter( ['BufEnter','WinEnter', 'QuitPre', 'CursorMoved', 'VimResized', 'FocusGained', 'WinScrolled' ], 'exists("##" . v:val)'), ',')
|
||||
if SpaceVim#plugins#scrollbar#usable()
|
||||
exe printf('autocmd %s * call SpaceVim#plugins#scrollbar#show()',
|
||||
\ events)
|
||||
autocmd WinLeave,BufLeave,BufWinLeave,FocusLost
|
||||
\ * call SpaceVim#plugins#scrollbar#clear()
|
||||
" why this autocmd is needed?
|
||||
"
|
||||
" because the startify use noautocmd enew
|
||||
autocmd User Startified call s:clear_previous_scrollbar()
|
||||
endif
|
||||
augroup end
|
Loading…
x
Reference in New Issue
Block a user