summaryrefslogtreecommitdiff
path: root/ftplugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-22 15:53:01 +0100
committerw0rp <devw0rp@gmail.com>2018-04-22 15:53:01 +0100
commit87ad4dfbe78665029521667afb2f159f3865523b (patch)
treeb90164f51ac80c22c6bf2f82e60ecf60227cc33a /ftplugin
parentd8a673515a8ec9fd102d6da8d8fa499ae2770f11 (diff)
downloadale-87ad4dfbe78665029521667afb2f159f3865523b.zip
Implement a preview window for selecting locations to open
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/ale-preview-selection.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/ftplugin/ale-preview-selection.vim b/ftplugin/ale-preview-selection.vim
new file mode 100644
index 00000000..d77b4f98
--- /dev/null
+++ b/ftplugin/ale-preview-selection.vim
@@ -0,0 +1,16 @@
+" Close the ALEPreviewWindow window with the q key.
+noremap <buffer> q :q!<CR>
+" Disable some keybinds for the selection window.
+noremap <buffer> v <NOP>
+noremap <buffer> i <NOP>
+noremap <buffer> I <NOP>
+noremap <buffer> <C-q> <NOP>
+noremap <buffer> <C-v> <NOP>
+noremap <buffer> <S-v> <NOP>
+noremap <buffer> a <NOP>
+noremap <buffer> A <NOP>
+noremap <buffer> o <NOP>
+noremap <buffer> O <NOP>
+" Keybinds for opening selection items.
+noremap <buffer> <CR> :call ale#preview#OpenSelectionInBuffer()<CR>
+noremap <buffer> t :call ale#preview#OpenSelectionInTab()<CR>