Added snippets for Emacs
This commit is contained in:
4
emacs/.emacs.d/snippets/js2-mode/a
Normal file
4
emacs/.emacs.d/snippets/js2-mode/a
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : new array
|
||||
# --
|
||||
var ${1:myArray} = new Array();
|
||||
$0
|
||||
6
emacs/.emacs.d/snippets/js2-mode/fn
Normal file
6
emacs/.emacs.d/snippets/js2-mode/fn
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : function
|
||||
# --
|
||||
function ${1:test}(${2:pValue}) {
|
||||
$0
|
||||
}
|
||||
|
||||
5
emacs/.emacs.d/snippets/js2-mode/for
Normal file
5
emacs/.emacs.d/snippets/js2-mode/for
Normal file
@@ -0,0 +1,5 @@
|
||||
#name : for (...; ...; ...) { ... }
|
||||
# --
|
||||
for (var ${1:i} = 0; $1 < ${2:args.length}; $1${3:++}) {
|
||||
$0
|
||||
}
|
||||
6
emacs/.emacs.d/snippets/js2-mode/if
Normal file
6
emacs/.emacs.d/snippets/js2-mode/if
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : if
|
||||
# --
|
||||
if (${1:s} == ${2:undefined}) {
|
||||
$0
|
||||
}
|
||||
|
||||
3
emacs/.emacs.d/snippets/js2-mode/log
Normal file
3
emacs/.emacs.d/snippets/js2-mode/log
Normal file
@@ -0,0 +1,3 @@
|
||||
#name : log
|
||||
# --
|
||||
console.log("$0");
|
||||
Reference in New Issue
Block a user