Commits

Meikel Brandmeyer  committed 1cb65c1

Allow whitelisting of key mappings

  • Participants
  • Parent commits 698b9a2

Comments (0)

Files changed (2)

File vim/autoload/vimclojure.vim

 	if exists("g:vimclojure#SetupKeyMap" . a:plug)
 		execute "let doSetup = g:vimclojure#SetupKeyMap" . a:plug
 	else
-		let doSetup = 1
+		let doSetup = g:vimclojure#SetupKeyMap
 	endif
 
-	if g:vimclojure#SetupKeyMap
-				\ && doSetup
-				\ && !hasmapto("<Plug>Clojure" . a:plug, a:mode)
+	if doSetup && !hasmapto("<Plug>Clojure" . a:plug, a:mode)
 		execute a:mode . "map <buffer> <unique> <silent> <LocalLeader>" . a:keys
 					\ . " <Plug>Clojure" . a:plug
 	endif

File vim/doc/clojure.txt

 >
         let vimclojure#SetupKeyMapEvalToplevel = 0
 <
+To enable only single mappings first turn off all flags, and then
+whitelist the ones you want to be enabled:
+>
+        let vimclojure#SetupKeyMap = 0
+        let vimclojure#SetupKeyMapEvalToplevel = 1
+<
+Whatever setting: it will still honor any key mapping made by yourself.
 
 <LocalLeader>et                                 *et* *EvalToplevel*
                         Send off the toplevel sexpression currently