To jump between words and start/end of lines in iTerm2 follow these steps:

  • iTerm2 -> Preferences (⌘ + ,)
  • Open the “Keys” tab
  • Add the following Global Shortcut Keys

Move cursor one word left

  • Keyboard Combination: ⌥ + ←
  • Action: Send Hex Code
  • Code: 0x1b 0x62

Move cursor one word right

  • Keyboard Combination: ⌥ + →
  • Action: Send Hex Code
  • Code: 0x1b 0x66

Move cursor to beginning of line

  • Keyboard Combination: ⌘ + ←
  • Action: Send Hex Code
  • Code: 0x01

Move cursor to end of line

  • Keyboard Combination: ⌘ + →
  • Action: Send Hex Code
  • Code: 0x05

Delete word

  • Keyboard Combination: ⌥ + ←Delete
  • Action: Send Hex Code
  • Code: 0x1b 0x08

Delete line

  • Keyboard Combination: ⌘ + ←Delete
  • Action: Send Hex Code
  • Code: 0x15

Undo

  • Keyboard Combination: ⌘ + z
  • Action: Send Hex Code
  • Code: 0x1f

Don't forget to remove the previous bindings:

  • Open the “Profiles” tab
  • Click the sub-tab ”Keys”
  • Remove the mappings for key combinations ⌥ + ← and ⌥ + →

参考文档: https://stackoverflow.com/questions/6205157/iterm-2-how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line

mac item2自定义光标移动快捷键,移动行首行尾,按单词跳转的更多相关文章

  1. mac shell终端编辑命令行快捷键——行首行尾

    mac shell终端编辑命令行快捷键——行首行尾 ctrl+a //移到行首ctrl+e //移到行尾===========linux系统用============alt+a //移到光标所在单词首 ...

  2. 【转】mac/linux终端光标的快捷键操作

    摘自网络:原标题是类似linux/unix命令行终端的光标及字符控制快捷键的东东. 常用的快捷键: Ctrl + d 删除一个字符,相当于通常的Delete键(命令行若无所有字符,则相当于exit:处 ...

  3. Mac Terminal终端光标的快捷键操作

    2016年08月18日 18:26:06 阅读数:4217 Mac Terminal终端和linux上终端光标的快捷键操作是一样的,都是来自Emacs这个神级的编辑器,由于我以前vim用的多,没怎么用 ...

  4. Mac 终端Terminal光标移动快捷键

    声明: 转载自: http://blog.csdn.net/lgm252008/article/details/8253519 在Mac系统中并没有Home.End等键,所以在使用时并不是特别的顺手, ...

  5. bash快捷键光标移动到行首行尾等

    ctrl键组合ctrl+a:光标移到行首.ctrl+b:光标左移一个字母ctrl+c:杀死当前进程.ctrl+d:退出当前 Shell.ctrl+e:光标移到行尾.ctrl+h:删除光标前一个字符,同 ...

  6. 苹果mac shell 终端 命令行快捷键——行首行尾

    ctrl+a //移到行首 ctrl+e //移到行尾 http://blog.csdn.net/hherima/article/details/47083739

  7. 【linux基础】vim快速移动光标至行首行尾、第一行和最后一行

    前言 使用vim的过程中想要快速移动光标至行首.行尾.第一行.最后一行或者某一行,本文对此简单介绍. 具体操作 1.快速至当前行的行首: 1) Home键:  2) 数字0:  3) 符号^; 2.快 ...

  8. 【Linux】Terminal中输入一行命令快速移动光标至行首行尾

    Linux: ①快速移动光标至行首 Home或Ctrl+A ②快速移动光标至行尾 End或Ctrl+E ③从光标处开始删除,直到行尾 Ctrl+K ④到下一行 Ctrl+N 或 方向键:↓ ⑤到上一行 ...

  9. EditPlus行首行尾批量添加字符 以及其它常用正则

    打开EditPlus,输入多行数据,快捷键ctrl+h 打开替换窗口,选择"正则表达式"替换 行首批量添加   查找"^" 替换为"我是行首aaa&q ...

随机推荐

  1. 解决d7在更高版本上运行乱码问题,或者是调用更高版本的dll

    将String类型改成WideString类型即可

  2. 六、Vue-Router:基础路由处理、路由提取成单独文件、路由嵌套、路由传参数、路由高亮、html5的history使用

    一.vue-router的安装 官网文档 [官网]:https://cn.vuejs.org/v2/guide/routing.html [router文档]:https://router.vuejs ...

  3. #pragma命令详解

    每种C和C++的实现支持对其宿主机或操作系统唯一的功能.例如,一些程序需要精确控制超出数据所在的储存空间,或着控制特定函数接受参数的方式.#pragma指示使每个编译程序在保留C和C++语言的整体兼容 ...

  4. Linux系统sda变sdb的解决

    起因 我的电脑有一个128G的固态以及一个500G的机械,我将系统安装在128G固态中,于是将500G的机械(/dev/sdb)挂在在/home目录下,安装完系统后执行lsblk命令 NAME MAJ ...

  5. python --- 日志模块 logging

    1.日志的使用 import logging class CommonLog(object): def _common_log(self,level,message): # 设定收集器,再设定收集的级 ...

  6. 51nod 1423:最大二“货”

    1423 最大二"货" 题目来源: CodeForces 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题  收藏  取消关注 白克喜欢找一个序列 ...

  7. 复选框全选、反选及根据值JS控制复选框默认选中事件

    HTML代码 <div class="col-sm-7"> <input type="checkbox" id="allAndNot ...

  8. Django中出现no such table: django_session

    这个错误跟Session的机制有关, 既然要从Web服务器端来记录用户信息, 那么一定要有存放用户session id对应信息的地方才行. 所以,我们需要创建django_session表. Djan ...

  9. Spring 框架介绍

    Spring 框架介绍 Spring 框架模块 Spring开发环境搭建(Eclipse) 创建一个简单的Spring应用 Spring 控制反转容器(Inversion of Control – I ...

  10. POJ 1028:Web Navigation

    Web Navigation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 30828   Accepted: 13821 ...