summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-24 22:09:41 +0100
committerw0rp <devw0rp@gmail.com>2016-10-26 10:36:53 +0100
commitc8821fc0495d1d75cb3d716d73c4c28877e3513a (patch)
tree911963ee3e9954b12396bced5e834a6b922c4c50 /plugin
parent1bcee7ef33ffd2da752e85177bfa215c60f98e71 (diff)
downloadale-c8821fc0495d1d75cb3d716d73c4c28877e3513a.zip
#144 - Implement commands for moving through warnings/errors
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 64c20c66..43f38927 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -131,6 +131,18 @@ let g:ale_statusline_format = get(g:, 'ale_statusline_format',
let g:ale_warn_about_trailing_whitespace =
\ get(g:, 'ale_warn_about_trailing_whitespace', 1)
+" Define commands for moving through warnings and errors.
+command! ALEPrevious :call ale#loclist_jumping#Jump('before', 0)
+command! ALEPreviousWrap :call ale#loclist_jumping#Jump('before', 1)
+command! ALENext :call ale#loclist_jumping#Jump('after', 0)
+command! ALENextWrap :call ale#loclist_jumping#Jump('after', 1)
+
+" <Plug> mappings for commands
+nnoremap <silent> <Plug>(ale_previous) :ALEPrevious<Return>
+nnoremap <silent> <Plug>(ale_previous_wrap) :ALEPreviousWrap<Return>
+nnoremap <silent> <Plug>(ale_next) :ALENext<Return>
+nnoremap <silent> <Plug>(ale_next_wrap) :ALENextWrap<Return>
+
" Housekeeping
augroup ALECleanupGroup