Created
July 22, 2013 14:03
-
-
Save cohama/6054064 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r c8559a2d8e5f runtime/ftplugin/ocaml.vim | |
--- a/runtime/ftplugin/ocaml.vim Sun Jul 21 17:06:00 2013 +0200 | |
+++ b/runtime/ftplugin/ocaml.vim Mon Jul 22 00:34:09 2013 +0900 | |
@@ -44,19 +44,21 @@ | |
" (un)commenting | |
if !hasmapto('<Plug>Comment') | |
nmap <buffer> <LocalLeader>c <Plug>LUncomOn | |
- vmap <buffer> <LocalLeader>c <Plug>BUncomOn | |
+ xmap <buffer> <LocalLeader>c <Plug>BUncomOn | |
nmap <buffer> <LocalLeader>C <Plug>LUncomOff | |
- vmap <buffer> <LocalLeader>C <Plug>BUncomOff | |
+ xmap <buffer> <LocalLeader>C <Plug>BUncomOff | |
endif | |
- nnoremap <buffer> <Plug>LUncomOn mz0i(* <ESC>$A *)<ESC>`z | |
+ nnoremap <buffer> <Plug>LUncomOn gI(* <End> *)<ESC> | |
nnoremap <buffer> <Plug>LUncomOff :s/^(\* \(.*\) \*)/\1/<CR>:noh<CR> | |
- vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`< | |
- vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< | |
+ xnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`< | |
+ xnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< | |
- if !hasmapto('<Plug>Abbrev') | |
- iabbrev <buffer> ASS (assert (0=1) (* XXX *)) | |
- endif | |
+ nmap <buffer> <LocalLeader>s <Plug>OCamlSwitch | |
+ nmap <buffer> <LocalLeader>S <Plug>OCamlSwitchNewWin | |
+ | |
+ nmap <buffer> <LocalLeader>t <Plug>OCamlPrintType | |
+ xmap <buffer> <LocalLeader>t <Plug>OCamlPrintType | |
endif | |
" Let % jump between structure elements (due to Issac Trotts) | |
@@ -73,8 +75,8 @@ | |
" switching between interfaces (.mli) and implementations (.ml) | |
if !exists("g:did_ocaml_switch") | |
let g:did_ocaml_switch = 1 | |
- map <LocalLeader>s :call OCaml_switch(0)<CR> | |
- map <LocalLeader>S :call OCaml_switch(1)<CR> | |
+ nnoremap <Plug>OCamlSwitch :<C-u>call OCaml_switch(0)<CR> | |
+ nnoremap <Plug>OCamlSwitchNewWin :<C-u>call OCaml_switch(1)<CR> | |
fun OCaml_switch(newwin) | |
if (match(bufname(""), "\\.mli$") >= 0) | |
let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", "")) | |
@@ -590,8 +592,8 @@ | |
endif | |
" Maps | |
- map <silent> <LocalLeader>t :call Ocaml_print_type("normal")<CR> | |
- vmap <silent> <LocalLeader>t :<C-U>call Ocaml_print_type("visual")<CR>`< | |
+ nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR> | |
+ xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`< | |
let &cpoptions=s:cposet | |
unlet s:cposet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment