Improved sh, python, and clojure snip.
This commit is contained in:
		
							parent
							
								
									0c47bf82ed
								
							
						
					
					
						commit
						87a0450300
					
				| @ -26,3 +26,7 @@ options     head | ||||
| 	] | ||||
| 	 | ||||
| 
 | ||||
| snippet     warn | ||||
| options     head | ||||
|   (binding [*out* *err*] | ||||
|     (println ${0:TARGET})) | ||||
|  | ||||
| @ -77,6 +77,7 @@ options     head | ||||
| 
 | ||||
| snippet     ifmain | ||||
| abbr        if __name__ == '__main__': ... | ||||
| alias       main | ||||
| options     head | ||||
| 	if __name__ == '__main__': | ||||
| 		${0:TARGET} | ||||
| @ -113,3 +114,6 @@ snippet     filter | ||||
| abbr        [x for x in {list} if {condition}] | ||||
| 	[$1 for ${1:x} in ${2:#:list} if ${3:#:condition}] | ||||
| 
 | ||||
| snippet     print | ||||
| options     word | ||||
|   print(${0:TARGET}) | ||||
|  | ||||
| @ -32,13 +32,6 @@ snippet until | ||||
| 	done | ||||
| 
 | ||||
| 
 | ||||
| snippet case | ||||
|         case ${1:#:word} in | ||||
| 		${2:#:pattern} ) | ||||
| 			${0} | ||||
| 		;; | ||||
| 	esac | ||||
| 
 | ||||
| snippet here | ||||
| alias   h | ||||
| 	<<${1} | ||||
| @ -62,4 +55,35 @@ alias func | ||||
| 		${0:TARGET} | ||||
| 	} | ||||
| 
 | ||||
| snippet     match-regexp | ||||
| abbr        =~ | ||||
| options     head | ||||
| 	if [[ $${1:string} =~ ${2:^regexp.*} ]]; then | ||||
| 		${0} | ||||
| 	fi | ||||
| 
 | ||||
| snippet     assign | ||||
| abbr        var-assign | ||||
| options     head | ||||
| 	${1:name}="${2:something}" | ||||
| 
 | ||||
| snippet     case | ||||
| options     head | ||||
| 	case "$${1:{name}}" in | ||||
| 		${2:pattern*}) | ||||
| 			${0} | ||||
| 			;; | ||||
| 		*) | ||||
| 			${3:echo "$$1\} Didn't match anything"} | ||||
| 	esac | ||||
| 
 | ||||
| snippet     warn | ||||
| options     head | ||||
| 	echo "${0:TARGET}" 1>&2 | ||||
| 
 | ||||
| snippet     abort | ||||
| options     head | ||||
| 	echo "${0:TARGET}" 1>&2 | ||||
| 	exit 1 | ||||
| 
 | ||||
| # vim: set noexpandtab : | ||||
|  | ||||
| @ -722,6 +722,9 @@ A: You can use |:NeoSnippetSource| for it. | ||||
| ============================================================================== | ||||
| CHANGELOG			*neosnippet-changelog* | ||||
| 
 | ||||
| 2013-06-25 | ||||
| - Improved sh, python, and clojure snip. | ||||
| 
 | ||||
| 2013-06-18 | ||||
| - Improved ruby snip. | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 ujihisa
						ujihisa