如何在 VSCode 集成终端上启用Ctrl+ Shift+ \xe2\x86\x90/选择(突出显示)上一个或下一个单词?\xe2\x86\x92
\nCtrl+ \xe2\x86\x90/\xe2\x86\x92可以将光标移动一个单词,但Ctrl+ Shift+ \xe2\x86\x90/\xe2\x86\x92会输出 D 和 C 。
\n我在 keybindings.json 中尝试了这些(右侧相同):
\n {\n "key": "ctrl+shift+left",\n "command": "-cursorWordStartLeftSelect",\n "when": "textInputFocus"\n },\n {\n "key": "ctrl+shift+left",\n "command": "-workbench.action.terminal.resizePaneLeft",\n "when": "terminalFocus"\n },\n {\n "key": "ctrl+shift+left",\n "command": "cursorWordStartLeftSelect",\n "when": "textInputFocus || terminalFocus"\n },\nRun Code Online (Sandbox Code Playgroud)\n和
\n {\n "key": "ctrl+shift+left",\n "command": "-workbench.action.terminal.resizePaneLeft",\n "when": "terminalFocus"\n },\n {\n "key": "ctrl+shift+left",\n "command": "cursorWordStartLeftSelect",\n "when": "terminalFocus"\n },\nRun Code Online (Sandbox Code Playgroud)\n … 这是我的代码:
SELECT
CASE your_text
WHEN contains('hate') THEN 'hater'
WHEN contains('love') THEN 'lover'
ELSE 'other'
END haterOrLover,
count(*) AS total_count
FROM a_table
GROUP BY haterOrLover
Run Code Online (Sandbox Code Playgroud)
如果只有 contains() 存在就好了!
我想计算有多少个仇恨者、爱好者,结果是这样的:
+--------------+-------------+
| haterOrLover | total_count |
+--------------+-------------+
| hater | 1 |
+--------------+-------------+
| lover | 2 |
+--------------+-------------+
| other | 1 |
+--------------+-------------+
Run Code Online (Sandbox Code Playgroud)
尝试过:
+--------------+-------------+
| haterOrLover | total_count |
+--------------+-------------+
| hater | 1 |
+--------------+-------------+
| lover | 2 |
+--------------+-------------+
| other | 1 |
+--------------+-------------+
Run Code Online (Sandbox Code Playgroud)
WHEN …Run Code Online (Sandbox Code Playgroud)