mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins. Added vim-golang as a mode
This commit is contained in:
		| @ -1,20 +1,22 @@ | ||||
| priority -50 | ||||
|  | ||||
| snippet rs "raise" b | ||||
| raise (${1:Not_found}) | ||||
| endsnippet | ||||
|  | ||||
| snippet open "open" | ||||
| let open ${1:module} in | ||||
| ${2} | ||||
| ${2:e} | ||||
| endsnippet | ||||
|  | ||||
| snippet try "try" | ||||
| try ${1} | ||||
| try ${1:e} | ||||
| with ${2:Not_found} -> ${3:()} | ||||
| endsnippet | ||||
|  | ||||
| snippet ref "ref" | ||||
| let ${1} = ref ${2} in | ||||
| ${3} | ||||
| let ${1:name} = ref ${2:val} in | ||||
| ${3:e} | ||||
| endsnippet | ||||
|  | ||||
| snippet matchl "pattern match on a list" | ||||
| @ -24,83 +26,88 @@ match ${1:list} with | ||||
| endsnippet | ||||
|  | ||||
| snippet matcho "pattern match on an option type" | ||||
| match ${1} with | ||||
| | Some(${2}) -> ${3:()} | ||||
| match ${1:x} with | ||||
| | Some(${2:y}) -> ${3:()} | ||||
| | None -> ${4:()} | ||||
| endsnippet | ||||
|  | ||||
| snippet fun "anonymous function" | ||||
| (fun ${1} -> ${2}) | ||||
| (fun ${1:x} -> ${2:x}) | ||||
| endsnippet | ||||
|  | ||||
| snippet cc "commment" | ||||
| (* ${1} *) | ||||
| (* ${1:comment} *) | ||||
| endsnippet | ||||
|  | ||||
| snippet let "let .. in binding" | ||||
| let ${1} = ${2} in | ||||
| ${3} | ||||
| let ${1:x} = ${2:v} in | ||||
| ${3:e} | ||||
| endsnippet | ||||
|  | ||||
| snippet lr "let rec" | ||||
| let rec ${1} = | ||||
|   ${2} | ||||
| let rec ${1:f} = | ||||
| 	${2:expr} | ||||
| endsnippet | ||||
|  | ||||
| snippet ife "if" | ||||
| if ${1} then | ||||
|   ${2} | ||||
| snippet if "if" | ||||
| if ${1:(* condition *)} then | ||||
| 	${2:(* A *)} | ||||
| else | ||||
|   ${3} | ||||
| 	${3:(* B *)} | ||||
| endsnippet | ||||
|  | ||||
| snippet if "If" | ||||
| if ${1} then | ||||
|   ${2} | ||||
| snippet If "If" | ||||
| if ${1:(* condition *)} then | ||||
| 	${2:(* A *)} | ||||
| endsnippet | ||||
|  | ||||
| snippet wh "while" | ||||
| while ${1} do | ||||
|   ${2} | ||||
| snippet while "while" | ||||
| while ${1:(* condition *)} do | ||||
| 	${2:(* A *)} | ||||
| done | ||||
| endsnippet | ||||
|  | ||||
| snippet for "for" | ||||
| for ${1:i} = ${2:1} to ${3:10} do | ||||
|   ${4} | ||||
| 	${4:(* BODY *)} | ||||
| done | ||||
| endsnippet | ||||
|  | ||||
| snippet match "match" | ||||
| match ${1} with | ||||
| | ${2} -> ${3} | ||||
| match ${1:(* e1 *)} with | ||||
| | ${2:p} -> ${3:e2} | ||||
| endsnippet | ||||
|  | ||||
| snippet Match "match" | ||||
| match ${1:(* e1 *)} with | ||||
| | ${2:p} -> ${3:e2} | ||||
| endsnippet | ||||
|  | ||||
| snippet class "class" | ||||
| class ${1:name} = object | ||||
|   ${2} | ||||
| 	${2:methods} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet obj "obj" | ||||
| object | ||||
|   ${2} | ||||
| 	${2:methods} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet Obj "object" | ||||
| object (self) | ||||
|   ${2} | ||||
| 	${2:methods} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet {{ "object functional update" | ||||
| {< ${1} = ${2} >} | ||||
| {< ${1:x} = ${2:y} >} | ||||
| endsnippet | ||||
|  | ||||
| snippet beg "beg" | ||||
| begin | ||||
|   ${1}${VISUAL} | ||||
| 	${1:block} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| @ -110,19 +117,19 @@ endsnippet | ||||
|  | ||||
| snippet mod "module - no signature" | ||||
| module ${1:(* Name *)} = struct | ||||
|   ${2} | ||||
| 	${2:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet Mod "module with signature" | ||||
| module ${1:(* Name *)} : ${2:(* SIG *)} = struct | ||||
|   ${3} | ||||
| 	${3:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet sig "anonymous signature" | ||||
| sig | ||||
|   ${2} | ||||
| 	${2:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| @ -132,36 +139,36 @@ endsnippet | ||||
|  | ||||
| snippet func "define functor - no signature" | ||||
| module ${1:M} (${2:Arg} : ${3:ARG}) = struct | ||||
|   ${4} | ||||
| 	${4:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet Func "define functor - with signature" | ||||
| module ${1:M} (${2:Arg} : ${3:ARG}) : ${4:SIG} = struct | ||||
|   ${5} | ||||
| 	${5:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet mot "Declare module signature" | ||||
| module type ${1:(* Name *)} = sig | ||||
|   ${2} | ||||
| 	${2:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet module "Module with anonymous signature" | ||||
| module ${1:(* Name *)} : sig | ||||
|   ${2} | ||||
| 	${2:(* SIGNATURE *)} | ||||
| end = struct | ||||
|   ${3} | ||||
| 	${3:(* BODY *)} | ||||
| end | ||||
| endsnippet | ||||
|  | ||||
| snippet oo "odoc" | ||||
| (** ${1} *) | ||||
| (** ${1:odoc} *) | ||||
| endsnippet | ||||
|  | ||||
| snippet qt "inline qtest" | ||||
| (*$T ${1:name} | ||||
|    ${2:test} | ||||
| 	${2:test} | ||||
| *) | ||||
| endsnippet | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 amix
					amix