Commits

Meikel Brandmeyer  committed 46bb2d2

Move <Plug>s to plugin

  • Participants
  • Parent commits 8274365

Comments (0)

Files changed (2)

File ftplugin/clojure.vim

 	echohl None
 endtry
 
-call vimclojure#MakePlug("n", "AddToLispWords", 'vimclojure#AddToLispWords(expand("<cword>"))')
 call vimclojure#MapPlug("n", "aw", "AddToLispWords")
 
 if exists("b:vimclojure_namespace")
-	call vimclojure#MakePlug("n", "DocLookupWord", 'vimclojure#DocLookup(expand("<cword>"))')
-	call vimclojure#MakePlug("n", "DocLookupInteractive", 'vimclojure#DocLookup(input("Symbol to look up: "))')
-	call vimclojure#MakePlug("n", "JavadocLookupWord", 'vimclojure#JavadocLookup(expand("<cword>"))')
-	call vimclojure#MakePlug("n", "JavadocLookupInteractive", 'vimclojure#JavadocLookup(input("Class to lookup: "))')
-	call vimclojure#MakePlug("n", "FindDoc", 'vimclojure#FindDoc())')
-
 	call vimclojure#MapPlug("n", "lw", "DocLookupWord")
 	call vimclojure#MapPlug("n", "li", "DocLookupInteractive")
 	call vimclojure#MapPlug("n", "jw", "JavadocLookupWord")
 	call vimclojure#MapPlug("n", "ji", "JavadocLookupInteractive")
 	call vimclojure#MapPlug("n", "fd", "FindDoc")
 
-	call vimclojure#MakePlug("n", "MetaLookupWord", 'vimclojure#MetaLookup(expand("<cword>"))')
-	call vimclojure#MakePlug("n", "MetaLookupInteractive", 'vimclojure#MetaLookup(input("Symbol to look up: "))')
-
 	call vimclojure#MapPlug("n", "mw", "MetaLookupWord")
 	call vimclojure#MapPlug("n", "mi", "MetaLookupInteractive")
 
-	call vimclojure#MakePlug("n", "SourceLookupWord", 'vimclojure#SourceLookup(expand("<cword>"))')
-	call vimclojure#MakePlug("n", "SourceLookupInteractive", 'vimclojure#SourceLookup(input("Symbol to look up: "))')
-
 	call vimclojure#MapPlug("n", "sw", "SourceLookupWord")
 	call vimclojure#MapPlug("n", "si", "SourceLookupInteractive")
 
-	call vimclojure#MakePlug("n", "GotoSourceWord", 'vimclojure#GotoSource(expand("<cword>"))')
-	call vimclojure#MakePlug("n", "GotoSourceInteractive", 'vimclojure#GotoSource(input("Symbol to go to: "))')
-
 	call vimclojure#MapPlug("n", "gw", "GotoSourceWord")
 	call vimclojure#MapPlug("n", "gi", "GotoSourceInteractive")
 
-	call vimclojure#MakePlug("n", "RequireFile", 'vimclojure#RequireFile(0)')
-	call vimclojure#MakePlug("n", "RequireFileAll", 'vimclojure#RequireFile(1)')
-
 	call vimclojure#MapPlug("n", "rf", "RequireFile")
 	call vimclojure#MapPlug("n", "rF", "RequireFileAll")
 
-	call vimclojure#MakePlug("n", "RunTests", 'vimclojure#RunTests(0)')
 	call vimclojure#MapPlug("n", "rt", "RunTests")
 
-	call vimclojure#MakePlug("n", "MacroExpand",  'vimclojure#MacroExpand(0)')
-	call vimclojure#MakePlug("n", "MacroExpand1", 'vimclojure#MacroExpand(1)')
-
 	call vimclojure#MapPlug("n", "me", "MacroExpand")
 	call vimclojure#MapPlug("n", "m1", "MacroExpand1")
 
-	call vimclojure#MakePlug("n", "EvalFile",      'vimclojure#EvalFile()')
-	call vimclojure#MakePlug("n", "EvalLine",      'vimclojure#EvalLine()')
-	call vimclojure#MakePlug("v", "EvalBlock",     'vimclojure#EvalBlock()')
-	call vimclojure#MakePlug("n", "EvalToplevel",  'vimclojure#EvalToplevel()')
-	call vimclojure#MakePlug("n", "EvalParagraph", 'vimclojure#EvalParagraph()')
-
 	call vimclojure#MapPlug("n", "ef", "EvalFile")
 	call vimclojure#MapPlug("n", "el", "EvalLine")
 	call vimclojure#MapPlug("v", "eb", "EvalBlock")
 	call vimclojure#MapPlug("n", "et", "EvalToplevel")
 	call vimclojure#MapPlug("n", "ep", "EvalParagraph")
 
-	call vimclojure#MakePlug("n", "StartRepl", 'vimclojure#Repl.New("user")')
-	call vimclojure#MakePlug("n", "StartLocalRepl", 'vimclojure#Repl.New(b:vimclojure_namespace)')
 	call vimclojure#MapPlug("n", "sr", "StartRepl")
 	call vimclojure#MapPlug("n", "sR", "StartLocalRepl")
 
-	inoremap <Plug>ClojureReplEnterHook <Esc>:call b:vimclojure_repl.enterHook()<CR>
-	inoremap <Plug>ClojureReplUpHistory <C-O>:call b:vimclojure_repl.upHistory()<CR>
-	inoremap <Plug>ClojureReplDownHistory <C-O>:call b:vimclojure_repl.downHistory()<CR>
-
-	nnoremap <Plug>ClojureCloseResultBuffer :call vimclojure#ResultBuffer.CloseBuffer()<CR>
 	call vimclojure#MapPlug("n", "p", "CloseResultBuffer")
 
 	setlocal omnifunc=vimclojure#OmniCompletion

File plugin/clojure.vim

 
 command -nargs=0 ClojureRepl call vimclojure#StartRepl()
 
+call vimclojure#MakePlug("n", "AddToLispWords", 'vimclojure#AddToLispWords(expand("<cword>"))')
+
+call vimclojure#MakePlug("n", "DocLookupWord", 'vimclojure#DocLookup(expand("<cword>"))')
+call vimclojure#MakePlug("n", "DocLookupInteractive", 'vimclojure#DocLookup(input("Symbol to look up: "))')
+call vimclojure#MakePlug("n", "JavadocLookupWord", 'vimclojure#JavadocLookup(expand("<cword>"))')
+call vimclojure#MakePlug("n", "JavadocLookupInteractive", 'vimclojure#JavadocLookup(input("Class to lookup: "))')
+call vimclojure#MakePlug("n", "FindDoc", 'vimclojure#FindDoc())')
+
+call vimclojure#MakePlug("n", "MetaLookupWord", 'vimclojure#MetaLookup(expand("<cword>"))')
+call vimclojure#MakePlug("n", "MetaLookupInteractive", 'vimclojure#MetaLookup(input("Symbol to look up: "))')
+
+call vimclojure#MakePlug("n", "SourceLookupWord", 'vimclojure#SourceLookup(expand("<cword>"))')
+call vimclojure#MakePlug("n", "SourceLookupInteractive", 'vimclojure#SourceLookup(input("Symbol to look up: "))')
+
+call vimclojure#MakePlug("n", "GotoSourceWord", 'vimclojure#GotoSource(expand("<cword>"))')
+call vimclojure#MakePlug("n", "GotoSourceInteractive", 'vimclojure#GotoSource(input("Symbol to go to: "))')
+
+call vimclojure#MakePlug("n", "RequireFile", 'vimclojure#RequireFile(0)')
+call vimclojure#MakePlug("n", "RequireFileAll", 'vimclojure#RequireFile(1)')
+
+call vimclojure#MakePlug("n", "RunTests", 'vimclojure#RunTests(0)')
+
+call vimclojure#MakePlug("n", "MacroExpand",  'vimclojure#MacroExpand(0)')
+call vimclojure#MakePlug("n", "MacroExpand1", 'vimclojure#MacroExpand(1)')
+
+call vimclojure#MakePlug("n", "EvalFile",      'vimclojure#EvalFile()')
+call vimclojure#MakePlug("n", "EvalLine",      'vimclojure#EvalLine()')
+call vimclojure#MakePlug("v", "EvalBlock",     'vimclojure#EvalBlock()')
+call vimclojure#MakePlug("n", "EvalToplevel",  'vimclojure#EvalToplevel()')
+call vimclojure#MakePlug("n", "EvalParagraph", 'vimclojure#EvalParagraph()')
+
+call vimclojure#MakePlug("n", "StartRepl", 'vimclojure#Repl.New("user")')
+call vimclojure#MakePlug("n", "StartLocalRepl", 'vimclojure#Repl.New(b:vimclojure_namespace)')
+
+inoremap <Plug>ClojureReplEnterHook <Esc>:call b:vimclojure_repl.enterHook()<CR>
+inoremap <Plug>ClojureReplUpHistory <C-O>:call b:vimclojure_repl.upHistory()<CR>
+inoremap <Plug>ClojureReplDownHistory <C-O>:call b:vimclojure_repl.downHistory()<CR>
+
+nnoremap <Plug>ClojureCloseResultBuffer :call vimclojure#ResultBuffer.CloseBuffer()<CR>
+
 let &cpo = s:cpo_save