Skip to content

Instantly share code, notes, and snippets.

@mattn
Created March 4, 2014 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/9340575 to your computer and use it in GitHub Desktop.
Save mattn/9340575 to your computer and use it in GitHub Desktop.
diff --git a/plugin/wildfire.vim b/plugin/wildfire.vim
index 5bfcd5a..3ed25b6 100644
--- a/plugin/wildfire.vim
+++ b/plugin/wildfire.vim
@@ -269,10 +269,15 @@ fu! s:safenet(count)
return a:count
endfu
-exe "nnoremap <silent> " . g:wildfire_fuel_map . " :<C-U>call <SID>Start(<SID>safenet(v:count1))<CR>"
-exe "vnoremap <silent> " . g:wildfire_fuel_map . " :<C-U>call <SID>Fuel(<SID>safenet(v:count1))<CR>"
-exe "vnoremap <silent> " . g:wildfire_water_map . " :<C-U>call <SID>Water()<CR>"
-
+nnoremap <silent> <Plug>(wildfire-fuel) :<C-U>call <SID>Start(<SID>safenet(v:count1))<CR>
+vnoremap <silent> <Plug>(wildfire-fuel) :<C-U>call <SID>Fuel(<SID>safenet(v:count1))<CR>
+vnoremap <silent> <Plug>(wildfire-water) :<C-U>call <SID>Water()<CR>
+
+if !hasmapto('<Plug>(wildfire-fuel)') && !hasmapto('<Plug>(wildfire-water)')
+ exe "nnoremap " . g:wildfire_fuel_map . " <Plug>(wildfire-fuel)"
+ exe "map" g:wildfire_fuel_map "<Plug>(wildfire-fuel)"
+ exe "map" g:wildfire_water_map "<Plug>(wildfire-water)"
+endif
" Autocommands
" =============================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment