Skip to content

Commit

Permalink
Fix #17
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Comitti committed Jun 5, 2014
1 parent de6d32b commit 0e54301
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions plugin/wildfire.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,24 @@ if !hasmapto('<Plug>(wildfire-fuel)') && !hasmapto('<Plug>(wildfire-water)')
exe "map" g:wildfire_water_map "<Plug>(wildfire-water)"
endif


" Autocommands
" =============================================================================

fu! DisableWildfire()
sil! exec "nnoremap <buffer> " . g:wildfire_fuel_map . " " . g:wildfire_fuel_map
endfu

augroup wildfire
au!

" Disable Wildfire inside help or quickfix buffers
au BufReadPost,CmdWinEnter * if !empty(&bt) |
\ sil! exec "nnoremap <buffer> " . g:wildfire_fuel_map . " " . g:wildfire_fuel_map |
\ endif

" Disable Wildfire inside buffers with the `buftype` option set (See :h 'buftype')
au BufReadPost * if !empty(&bt) | call DisableWildfire() | endif
" Disable Wildfire inside the command-line window
au CmdWinEnter * call DisableWildfire()
" Disable Wildfire inside quickfix buffers
au FileType qf call DisableWildfire()
augroup END


let &cpo = s:save_cpo
unlet s:save_cpo

0 comments on commit 0e54301

Please sign in to comment.