重要
最重要的事:
1.简介
1.2 本地模式
WindTerm有两种模式:
远程模式
WindTerm的远程模式是默认的模式。 在远程模式下,每个键按下发送到服务器就像其他终端。本地模式
本地模式主要用于浏览文本。 在本地模式下,每个键按下将解析本地,而不是发送到服务器。支持大多数本地模式 导航 , 滚动 , 搜索 , 复制和粘贴 , 选择 和 折叠 Vim的捷径。
当WindTerm在本地模式下,它就像一个只读的文本编辑器,这是非常方便的文本浏览。 特别是,快速滚动,不断输出时,切换到本地模式可以输出的立即停止滚动,方便阅读。
快捷方式 | 行动 |
---|---|
Alt + Enter | 远程和本地模式切换(Toggle the remote and local mode) |
i | 切换回远程模式(Switch back to remote mode from local mode) |
p | 粘贴、切换回远程模式(Paste and switch back to remote mode from local mode) |
Ctrl + v | 粘贴、切换回远程模式(Paste and switch back to remote mode from local mode) |
本地模式Vim导航键说明
Shortcut | Action |
---|---|
h | 左移(Move left) |
j | 下移(Move down) |
k | 上移(Move up) |
l | 右移(Move right) |
0 | 行首(Move to the begining of the line) |
$ | 行尾(Move to the end of the line) |
^ | 行首非空字符(Move to the first non-blank character of the line) |
w | 下一个单词(Move to next word) |
W | 下一个空白分隔词(Move to next blank delimited word) |
b | 词首(Move to the beginning of the word) |
B | 空白分隔词首(Move to the beginning of the blank delimted word) |
e | 词尾(Move to the end of the word) |
E | 空白分隔词尾(Move to the end of the blank delimited word) |
1G | 首行(Move to the first line of the session) |
nG | N行(Move to nth line of the session) |
G | 尾行(Move to the last line of the session) |
gg | 开头(move to the beginning of the session) |
ge | 行尾单词,词首(Move to the end of the previous word) |
gE | Move to the end of the previous Blank delimited word |
- | 非空句首(Move to the previous non-blank sentence) |
+ | 非空句尾(Move to the next non-blank sentence) |
( | 句首(Move to the previous sentence) |
) | 句尾(Move to the next sentence) |
{ | 段首(Move to the previous paragraph) |
} | 段尾(Move to the next paragraph) |
本地模式Vim文本复制说明
在本地模式下,可以使用
y{motion}
复制,其中{motion}
是上面导航快捷键或搜索快捷键。例如,yw
复制下一个单词的开头。其他有用的副本命令包括:
快捷键 | 动作 |
---|---|
yy | 复制当前行,包括换行符、新行起始字符(如hex@hex-ThinkPad:~$ );复制选中内容 |
y$ | 复制当前行,不包括换行符、新行起始字符 |
yw | 复制到下一个单词开头 |
ytx | 当前光标位置向后 复制至字符x ,不包括x |
yfx | 当前光标位置向后 复制至字符x , 包括x |
p | 粘贴、并返回Remote模式 |
P | 粘贴、并保留Local模式(Vim文本) |
“xy{motion} | 复制内容、并注册给变量x |
“xp | 黏贴变量x中的内容、并返回Remote模式 |
“xP | 黏贴变量x中的内容、并保留Local模式(Vim文本) |
“+y{motion} | 复制内容、至系统粘贴板 |
“+p | 从系统粘贴板粘贴、并返回Remote模式 |
“+P | 从系统粘贴板粘贴、并保留Local模式(Vim文本) |
1.2 快捷键记录
快捷键 | 动作 |
---|---|
Ctrl+Shift+W | 关闭页签(Close tab) |
Ctrl+Shift+T | 回复页签(Restore tab) |
Ctrl+Shift+Left | 转至前提示行(Goto the previous prompt line) |
Ctrl+Shift+Right | 转至后提示行(Goto the next prompt line) |
Ctrl+Alt+L | 锁屏 |
Alt+1 | 选择1页签 |
Alt+O | 打开页签 |
Alt+S | 搜索页签 |
- 批量发送(Sender Pane)快捷键
快捷键 | 动作 |
---|---|
Alt+Enter | 发送(Send) |
Alt+Q | 停止(Stop) |
Alt+= | 增加新的发送记录(Add Sender) |
Alt+- | 删除发送(Remove Sender) |
Alt+X | 清空(Clear Sender) |
- 文件传输(Sftp)快捷键
快捷键 | 动作 |
---|---|
Alt+Enter | 发送(Send) |
Alt+Q | 停止(Stop) |
Alt+= | 增加新的发送记录(Add Sender) |
Alt+- | 删除发送(Remove Sender) |
Alt+X | 清空(Clear Sender) |
快捷键 | 动作 |
---|---|
F2 | 文件重命名(Rename) |
F3 | 文件下载 (Download) |
F4 | 文件上传 (Upload) |
F5 | 目录刷新 (Refresh) |
F6 | 移动至 (Move to) |
Del | 删除 (Remove) |
Return | 打开 (Open) |
Backspace | 返回上一层(Cdup) |
Alt+D | 选中地址栏(Select the address bar) |
Alt+Left | 向前回滚 (Go backward) |
Alt+Right | 向后回滚 (Go forward) |
Alt+Return | 属性 (Show property) |
Ctrl+A | 全选 (Select all items) |
Ctrl+Shift+N | 新建文件夹(Create a folder) |
Ctrl+N | 新建文件 (Create a file) |
Ctrl+L | 新建软链 (Create a link) |
Ctrl+C | 复制名称 (Copy names) |
Ctrl+Shift+C | 复制路径 (Copy paths) |
Ctrl+P | 复制名称至终端(Copy names to terminal) |
Ctrl+Shift+P | 复制名称至终端(Copy paths to terminal) |
自动补全
自动补全会提示当前可用的命令、子命令、命令选项、命令参数、历史命令、快捷命令。
自动补全-快捷命令
自动补全支持快捷栏(Alt+w
->Alt+Q
在底部启用)中快速命令的补全。需要先在快捷命令中创建命令,自动补全索引的是快捷命令的名字。
自动补全-历史命令
历史命令包含同一系统(如 Linux 系统)所有会话的命令历史记录,默认最大数量为 10000 条(30天)。
在Session窗口,可以通过下面两种方式实现历史命令的自动补全:
- 在行首输入
!
- 或者,通过快捷键
Ctrl+R
自由键入模式
自由键入模式:键入shell
命令、使用VIM应用程序时,可以使用鼠标移动光标、选择文本、拖放文本。
- 按住
Alt
后,在需要的位置点击左键鼠标,即可将游标移动至任意位置(当会话-终端为xterm
、xterm-256color
时,只需要点击鼠标即可);
修改默认快捷键
目前没有自定义快捷键的功能,可以通过手动修改配置文件{应用程序目录}\global\wind.keymaps
的方式设置issue-403
修改复制快捷键(注意设置action,防止全局生效导致无法发送取消信号)参考此issue
原配置内容为
|
|
修改为
|
|
修改粘贴快捷键
原配置为:
|
|
修改为:
|
|
上面的json对象都是平级,功能取并集。而页面显示的靠后设置的json,可以将需要显示的配置放到文件末尾,让其在页面显示。只影响显示,不影响功能。
本地操作kubectl最佳实践
目前wsl会出现乱码问题,因此不推荐在windows下使用。如果在linux下,通过以下配置
通过不同环境创建不同目录,并在不同目录下保存相应的kubeconfig文件,在shell设置中,将工作目录与环境变量进行设置
shell设置如下图
目录结构仅供参考
|
|
待解决问题:
修改稿默认粘贴快捷键为ctrl+c后,导致无法发送取消信号,目前改回默认配置,参考此issue后修改
打开wsl窗口后,使用vim会出现乱码
ESC[0%m
。目前通过ssh 127.0.0.1的方式操作wsl.此issue-232、issue-1544出现的乱码不同,且也为解决。暂时记录等后续再跟进