Skip to content

Commit

Permalink
add b:undo_ftplugin (#4625)
Browse files Browse the repository at this point in the history
  • Loading branch information
benknoble authored Nov 19, 2023
1 parent 5cddc4c commit 1ccd99e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ftplugin/ale-fix-suggest.vim
Original file line number Diff line number Diff line change
@@ -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"'
6 changes: 6 additions & 0 deletions ftplugin/ale-info.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'
15 changes: 15 additions & 0 deletions ftplugin/ale-preview-selection.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
3 changes: 3 additions & 0 deletions ftplugin/ale-preview.vim
Original file line number Diff line number Diff line change
@@ -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"'

0 comments on commit 1ccd99e

Please sign in to comment.