From e4d82ef50e9758d348f82998df20ee0e84e4f669 Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 29 Apr 2020 14:55:15 +0100 Subject: [PATCH 1/2] add jsx definitions --- colors/monotonous-dark.erb | 4 ++++ colors/monotonous-dark.vim | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/colors/monotonous-dark.erb b/colors/monotonous-dark.erb index 240cdb9..236a1ad 100644 --- a/colors/monotonous-dark.erb +++ b/colors/monotonous-dark.erb @@ -488,6 +488,10 @@ [ "jsThis", "jsGlobalObjects" ], [ "jsArrowFunction", "Function" ], + # jsx + [ "jsxTagName", "htmlTagName" ], + [ "jsxComponentName", "htmlSpecialTagName" ], + [ "jsxAttrib", "htmlArg" ], # python [ "pythonBuiltin", "Type" ], diff --git a/colors/monotonous-dark.vim b/colors/monotonous-dark.vim index 615f20f..a5aab75 100644 --- a/colors/monotonous-dark.vim +++ b/colors/monotonous-dark.vim @@ -243,6 +243,9 @@ if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") hi link jsOperatorKeyword Label hi link jsThis jsGlobalObjects hi link jsArrowFunction Function + hi link jsxTagName htmlTagName + hi link jsxComponentName htmlSpecialTagName + hi link jsxAttrib htmlArg hi link pythonBuiltin Type hi link pythonBuiltinObj Special hi link pythonDottedName Identifier @@ -608,6 +611,9 @@ elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 hi link jsOperatorKeyword Label hi link jsThis jsGlobalObjects hi link jsArrowFunction Function + hi link jsxTagName htmlTagName + hi link jsxComponentName htmlSpecialTagName + hi link jsxAttrib htmlArg hi link pythonBuiltin Type hi link pythonBuiltinObj Special hi link pythonDottedName Identifier From d0192ef83ba879aba58fdf0ac23f18eb3a5b24f2 Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 29 Apr 2020 14:55:37 +0100 Subject: [PATCH 2/2] update --- UltiSnips/javascript.snippets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index 8bb3968..a725c45 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -112,3 +112,7 @@ endsnippet snippet th "this.handle..." this.handle${1:Click} = this.handle$1.bind(this); endsnippet + +snippet tb "this ... = ... .bind(this);" +this.$1 = this.$1.bind(this); +endsnippet