Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add mode specifier to hasmapto checks

  • Loading branch information...
commit f321d5fab1367bc91b2d160aa41d81e76213f732 1 parent 95ea7ea
@kotarak authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 vim/autoload/vimclojure.vim
View
12 vim/autoload/vimclojure.vim
@@ -172,7 +172,7 @@ function! vimclojure#MakeCommandPlug(mode, plug, f, args)
endfunction
function! vimclojure#MapPlug(mode, keys, plug)
- if !hasmapto("<Plug>Clojure" . a:plug)
+ if !hasmapto("<Plug>Clojure" . a:plug, a:mode)
execute a:mode . "map <buffer> <unique> <silent> <LocalLeader>" . a:keys
\ . " <Plug>Clojure" . a:plug
endif
@@ -734,19 +734,19 @@ function! vimclojure#Repl.Init(namespace) dict
set filetype=clojure
let b:vimclojure_namespace = a:namespace
- if !hasmapto("<Plug>ClojureReplEnterHook")
+ if !hasmapto("<Plug>ClojureReplEnterHook", "i")
imap <buffer> <silent> <CR> <Plug>ClojureReplEnterHook
endif
- if !hasmapto("<Plug>ClojureReplEvaluate")
+ if !hasmapto("<Plug>ClojureReplEvaluate", "i")
imap <buffer> <silent> <C-CR> <Plug>ClojureReplEvaluate
endif
- if !hasmapto("<Plug>ClojureReplHatHook")
+ if !hasmapto("<Plug>ClojureReplHatHook", "n")
nmap <buffer> <silent> ^ <Plug>ClojureReplHatHook
endif
- if !hasmapto("<Plug>ClojureReplUpHistory")
+ if !hasmapto("<Plug>ClojureReplUpHistory", "i")
imap <buffer> <silent> <C-Up> <Plug>ClojureReplUpHistory
endif
- if !hasmapto("<Plug>ClojureReplDownHistory")
+ if !hasmapto("<Plug>ClojureReplDownHistory", "i")
imap <buffer> <silent> <C-Down> <Plug>ClojureReplDownHistory
endif
Please sign in to comment.
Something went wrong with that request. Please try again.