Skip to content
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

Improvements, issue fixes #21

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions autoload/smoothie.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ if !exists('g:smoothie_break_on_reverse')
let g:smoothie_break_on_reverse = 0
endif

if !exists('g:smoothie_bell_enabled')
""
" Enable beeping when either end of the buffer has been reached, and we
" cannot proceed any further
subnut marked this conversation as resolved.
Show resolved Hide resolved
" disabled by default
let g:smoothie_bell_enabled = 0
endif

""
" Execute {command}, but saving 'scroll' value before, and restoring it
" afterwards. Useful for some commands (such as ^D or ^U), which overwrite
Expand Down Expand Up @@ -161,6 +169,13 @@ function s:movement_tick(_)
if s:step_many(l:step_size)
" we've collided with either buffer end
call s:stop_moving()
if g:smoothie_bell_enabled
" bell
let l:belloff = &belloff
set belloff=
exe "normal \<Esc>"
exe 'set belloff=' . l:belloff
endif
else
let s:target_displacement -= l:step_size
let s:subline_position = l:subline_step_size - l:step_size
Expand Down