Commits

Meikel Brandmeyer committed 9d39880

Fix MakePlug to handle also insert mode

Comments (0)

Files changed (1)

vim/autoload/vimclojure.vim

 
 " Key mappings and Plugs
 function! vimclojure#MakePlug(mode, plug, f, args)
+	if a:mode == "i"
+		let esc = "<ESC>"
+	else
+		let esc = ""
+	endif
+
 	execute a:mode . "noremap <Plug>Clojure" . a:plug
-				\ . " :call " . a:f . "(" . a:args . ")<CR>"
+				\ . " " . esc . ":call " . a:f . "(" . a:args . ")<CR>"
 endfunction
 
 function! vimclojure#MakeProtectedPlug(mode, plug, f, args)