diff options
author | Andrew Crites <ajcrites@gmail.com> | 2018-03-02 15:22:29 -0500 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2018-03-02 20:22:29 +0000 |
commit | acbe527e15f1f388b8dbc9889216e9368d98e6c6 (patch) | |
tree | ad72db49a1fc7ef8c3028f2b97819ec76d24b1c2 /autoload | |
parent | 2096562899aa0994a2c6d2c30320810001d98591 (diff) | |
download | ale-acbe527e15f1f388b8dbc9889216e9368d98e6c6.zip |
Option to open lists vertically (#1381)
* Add configuration option to open lists vertically
* Add tests, clean up vertical list config
* Vertical list option cleanup
* Use is# for tests
* Order properties in documentation alphabetically
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/debugging.vim | 1 | ||||
-rw-r--r-- | autoload/ale/list.vim | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/autoload/ale/debugging.vim b/autoload/ale/debugging.vim index 9be1fbf6..cb93ec16 100644 --- a/autoload/ale/debugging.vim +++ b/autoload/ale/debugging.vim @@ -29,6 +29,7 @@ let s:global_variable_list = [ \ 'ale_linters', \ 'ale_linters_explicit', \ 'ale_list_window_size', +\ 'ale_list_vertical', \ 'ale_loclist_msg_format', \ 'ale_max_buffer_history_size', \ 'ale_max_signs', diff --git a/autoload/ale/list.vim b/autoload/ale/list.vim index b1a8d4a7..30b8f5cf 100644 --- a/autoload/ale/list.vim +++ b/autoload/ale/list.vim @@ -97,12 +97,17 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort let l:reset_visual_selection = l:mode is? 'v' || l:mode is# "\<c-v>" let l:reset_character_selection = l:mode is? 's' || l:mode is# "\<c-s>" + " open windows vertically instead of default horizontally + let l:open_type = '' + if ale#Var(a:buffer, 'list_vertical') == 1 + let l:open_type = 'vert ' + endif if g:ale_set_quickfix if !ale#list#IsQuickfixOpen() - silent! execute 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) + silent! execute l:open_type . 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) endif elseif g:ale_set_loclist - silent! execute 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) + silent! execute l:open_type . 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) endif " If focus changed, restore it (jump to the last window). |