summaryrefslogtreecommitdiff
path: root/ftplugin/ale-preview-selection.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/ale-preview-selection.vim')
-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>