mirror of
https://github.com/amix/vimrc
synced 2025-07-12 22:24:59 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -14,7 +14,7 @@ endsnippet
|
||||
snippet do "do"
|
||||
do {
|
||||
${2:// code... }
|
||||
} while (${1:/* condition */});"
|
||||
} while (${1:/* condition */});
|
||||
endsnippet
|
||||
|
||||
snippet doc_f "doc_f"
|
||||
@ -67,6 +67,12 @@ if (${1:/* condition */}) {
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet elif "elseif"
|
||||
elseif (${1:/* condition */}) {
|
||||
${2:// code...}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet inc "inc"
|
||||
include '${1:file}';${2}
|
||||
endsnippet
|
||||
@ -120,19 +126,19 @@ endsnippet
|
||||
|
||||
snippet gs "PHP Class Getter Setter" b
|
||||
/*
|
||||
* Getter for ${1/(\w+)\s*;/$1/}
|
||||
* Getter for $1
|
||||
*/
|
||||
public function get${1/(\w+)\s*;/\u$1/}()
|
||||
public function get${1/\w+\s*/\u$0/}()
|
||||
{
|
||||
return $this->${1/(\w+)\s*;/$1/};$2
|
||||
return $this->$1;$2
|
||||
}
|
||||
|
||||
/*
|
||||
* Setter for ${1/(\w+)\s*;/$1/}
|
||||
* Setter for $1
|
||||
*/
|
||||
public function set${1/(\w+)\s*;/\u$1/}($${1/(\w+)\s*;/$1/})
|
||||
public function set${1/\w+\s*/\u$0/}($$1)
|
||||
{
|
||||
$this->${1/(\w+)\s*;/$1/} = $${1/(\w+)\s*;/$1/};$3
|
||||
$this->$1 = $$1;$3
|
||||
${4:return $this;}
|
||||
}
|
||||
$0
|
||||
@ -224,7 +230,7 @@ class $1
|
||||
{
|
||||
public function ${3:__construct}(${4:$options})
|
||||
{
|
||||
${4:// code}
|
||||
${5:// code}
|
||||
}
|
||||
}
|
||||
$0
|
||||
@ -240,8 +246,8 @@ public function __construct(${1:$dependencies})
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet pr "Dumb debug helper in HTML"
|
||||
echo '<pre>' . var_export($1, 1) . '</pre>';$0
|
||||
snippet ve "Dumb debug helper in HTML"
|
||||
echo '<pre>' . var_export($1, 1) . '</pre>';$0
|
||||
endsnippet
|
||||
|
||||
snippet pc "Dumb debug helper in cli"
|
||||
|
Reference in New Issue
Block a user