summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ftplugin/ale-fix-suggest.vim3
-rw-r--r--ftplugin/ale-info.vim6
-rw-r--r--ftplugin/ale-preview-selection.vim15
-rw-r--r--ftplugin/ale-preview.vim3
4 files changed, 27 insertions, 0 deletions
diff --git a/ftplugin/ale-fix-suggest.vim b/ftplugin/ale-fix-suggest.vim
index 189a4dc2..42ade0fd 100644
--- a/ftplugin/ale-fix-suggest.vim
+++ b/ftplugin/ale-fix-suggest.vim
@@ -1,2 +1,5 @@
" Close the ALEFixSuggest window with the q key.
noremap <buffer> q :q!<CR>
+
+let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute')
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> q"'
diff --git a/ftplugin/ale-info.vim b/ftplugin/ale-info.vim
index 65913a76..c2c794b2 100644
--- a/ftplugin/ale-info.vim
+++ b/ftplugin/ale-info.vim
@@ -14,3 +14,9 @@ endfunction
" Press space to open :help for an ALE Variable
nnoremap <buffer> <silent> <space> :call ALEInfoOpenHelp()<CR>
+
+let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute')
+let b:undo_ftplugin .= ' | setlocal synmaxcol<'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> q"'
+let b:undo_ftplugin .= ' | execute "silent! nunmap <buffer> <space>"'
+let b:undo_ftplugin .= ' | delfunction! ALEInfoOpenHelp'
diff --git a/ftplugin/ale-preview-selection.vim b/ftplugin/ale-preview-selection.vim
index 7ec84068..1ddd0abf 100644
--- a/ftplugin/ale-preview-selection.vim
+++ b/ftplugin/ale-preview-selection.vim
@@ -14,3 +14,18 @@ noremap <buffer> O <NOP>
" Keybinds for opening selection items.
noremap <buffer> <CR> :call ale#preview#OpenSelection()<CR>
noremap <buffer> t :call ale#preview#OpenSelectionInTab()<CR>
+
+let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute')
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> q"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> v"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> i"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> I"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> <C-q>"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> <C-v>"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> <S-v>"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> a"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> A"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> o"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> O"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> <CR>"'
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> t"'
diff --git a/ftplugin/ale-preview.vim b/ftplugin/ale-preview.vim
index ffbffbd5..75f3bb50 100644
--- a/ftplugin/ale-preview.vim
+++ b/ftplugin/ale-preview.vim
@@ -1,2 +1,5 @@
" Close the ALEPreviewWindow window with the q key.
noremap <buffer> q :q!<CR>
+
+let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute')
+let b:undo_ftplugin .= ' | execute "silent! unmap <buffer> q"'