跟着播客学英语-Why I use vim ? part two
在上一期作者讲到了他使用 Vim 的主要原因是提高效率,不需要再去使用鼠标,今天我们继续上次未听完的内容:
if you type Vi, that's going to be alias to Vim anyway by default there's, not really a good reason for you to use vi that I can think of. The reason I first started using Vim is kind of a silly
one, and that is because my brother used it, uh, my brother, Nick, he climbs mountains for a living. Right now, he lives in Seattle and goes up and down rain near when it gets too cold to climb. Rainer? He goes to the other side of the world and leads, climbs up mountains over there, and then comes back again and starts climb a rain air over and over and over again.
Before he did that, though, he used to do quite a bit of programming, and I remember when I would watch him program because he started programming before me, he looked like a real hacker. He looked like the hackers you see on TV. He never touched the mouse. There was text flying out all over the screen files, opening, closing splits. It was awesome. It was like I wanted to be that person you. Know and He was using vim. I didn't know it was Vim, but that's what he was using. So I opened Vim. I tried to edit some files I was using Eclipse at the time and doing Java.
作者首次使用 Vim 的 原因有点傻,因为他的哥哥 Nick 做了很长时间的编程,一直使用的都是 Vim,看起来就行是电视里真正的黑客那样,他从不使用鼠标,文字也在屏幕里乱飞,看起来非常酷。而那个时候作者还在使用 eclipse 编写 Java
This is like my first year of college, I was taking an introductory to programming class. It's the first programming I've ever done, and I thought Eclipse was great. It compiled my code for me. It had buttons for everything, but I didn't feel like a real hacker when I looked at nick. I mean, granted, he was writing C, which already looks way cooler. He was using Vim as well, and it just impressed
me, so I try to start opening up some of my Java files, and I have no idea how to do it. No idea how to edit a file I have no idea how to save a file I have no idea how to type in the document for crying out loud.
If I press keys, it does nothing. Sometimes a delete words, sometimes at pacewords, it's a mess
, and this is probably the first experience that everybody has when they start using Vim, because Vim operates completely different than any other text editor I've ever used it's weird
them has modes, it has a language, it has objects, subjects, counts, verbs. All that stuff is, like, really weird when you first get started, but once you understand it, it's a lot of learning upfront everything, just kind of clicks and you're instantly faster than you've ever been before,
eclipse 很好用,但看起来没有 Nick 使用 Vim 那么酷,使得作者印象深刻。
因此他尝试使用 Vim 来打开 Java 文件,但却不知道如何编辑、删除、保存等基本操作,大部分初次使用 Vim 应该都会碰到这些问题,它和我们使用的其他编辑器完全不同,看起来比较奇怪。
不过一旦你掌握它,那么使用效率将会飞速提高。
for example, let's say, we wanted to copy a method from one ruby file and put it in another. If I was using sublime text, I would take my mouse. I would select that method I'd press command c to copy it, and then I'd click over to where I want the method to be, and I'd press command v to paste it. Not very bad that's pretty fast probably doesn't take very long, but in Vim, you can do it even faster and without touching your mouse, them has a verb for yanking text it's not called copying it's, called yanking.
It has a movement called inside, so you can yank inside something, and then it has subjects called text blocks, which, in Ruby, those are methods. Vim understands blocks of text if you're editing a markdown document like, say, a read me, them'll know where a paragraph starts and where a paragraph ends, if we're editing a ruby file it's going to know where a method begins and where a method ends, or where your class begins or where your class ends, so using the Verb Yank, which happens to be the key Y,
如果我们使用 sublime 这样的编辑器复制一个方法时会比较麻烦,首先要用鼠标选中文本,然后复制再粘贴。但使用 Vim 时不需要使用鼠标,而是被称为 Yanking,当编辑 Markdown 时 Vim 会知道段落的开始和结尾,编辑 Ruby 时可以方法的开始和结尾。
and then the movement inside, which happens to be the key I, and then the subject paragraph, which is vim's word for a block of text, you can yank a method. So if I put my cursor inside a ruby method and I type Y I P. For yank inside paragraph, it's going to copy that method to the clipboard. So by understanding the verb, yank the movement inside and the subject paragraph, we can perform actions really, really quickly, and then if we want to pace it somewhere else, we press the peaky for paste,
and it'll stick that text down, so everything in Vim is based on those concepts of verbs, movements and subjects. You also have one more thing you can play with, and that is counts, so if you want to perform something multiple times, in most cases, you can stick a number in front of it like one, two, three, five, and it's going to do it that many times, understanding those basic concepts, gets you a really long way, and then it's just a matter of understanding which keys correspond to which verbs and which movements and which subjects,
在 vim 中只需要将光标移动到方法中,然后使用 YIP 就可以复制整个方法。所以只要理解了这些基本概念就可以快速提高效率。
and that just comes with time, which is the third reason I like to use Vim. Is there so much stuff to learn whenever I get bored? All I got to do is pull up them help, and I could start learning stuff in every little thing, I learn, every little keyboard shortcut, every movement, every subject, gets me a little bit faster, and it doesn't seem like a lot like the example I gave earlier, of copying and pasting text and sublime with a mouse that doesn't take very long. But if you add up all those little bits,
you're saving a ton of time, a good analogy
I like to use is lifting
weights if I'm squatting
100 pounds, and I take a little, teeny, tiny two and a half pound plate, and I put it on each side of the barbell I probably won't, even notice it, I mean, I'll be squatting 105 pounds now, right, that's not really that big of a difference, but if I add those two and a half pound plates 60 more times, going in once a day, and doing that, I'm now squatting 400 pounds, which is a pretty big difference, so those little changes don't seem like a lot,
我喜欢使用 Vim 的一个原因是可以学到许多东西,每学一些都可以让自己的效率提高一点。就像是我们深蹲一样,慢慢的加重量,反复尝试最终就能得到巨大的提升。
but taken as a whole, you're editing text way faster than people who aren't using vim. The last reason I like to use Vim is because it runs in the terminal, and this may not seem like a big deal, but it really is cosmetically
, it's nice because you can just pop a terminal open, full screen and have no chrome I use mac os, so I've got that big menu bar on top, it's really nice to just full screen a terminal and not see anything at all, and have your command line tools and your text editor all running in the same window I happen to use tmucks to manage that stuff I won't talk about Tmux and now,
but I definitely will talk about it in another episode, but even out of the cosmetic
reasons, it's nice to have a text editor that runs in the terminal because you're not always using your own machine right as web developers, I'm a web developer, we're always connecting to remote machines to edit files. Now, why is it that we should be forced to use a different text editor? The nice thing about Vim is it runs in the terminal, so every machine you connect to will likely already have Vim installed, but even if it doesn't you can install it,
and you can put your config files over there and you can make it so that no matter where you're editing text you're always in the same environment, which is awesome. Before I started using Vim out, connect a remote machines, and, and be forced to use some textset or I'm not familiar with, and it drove me nuts, but now I sometimes forget I'm on a remote machine because it's exactly the same as the machine I use at home, so if you've never tried them, or maybe you tried it in the past, and it was super confusing or really turned you off.
最后一个使用 Vim 的 原因是它可以在终端中运行,不仅可以使用自己的设备,还可以连接到远程设备去编辑文件,还可以使用相同的配置文件,使得所有的环境配置都是相同的
Give it a second shot there's, a great stack overflow article that just kind of rehashs a lot of the things I said here, but it's just it's also just fun to read it talks about the core concepts of vi, the editor that Vim is based on, and I put a link to that in the shownotes there's, also, them casts by Drew Neil, which is a screencast series that's totally free, and he covers a lot of advanced concepts he's got a little bit of beginner stuff in there as well. You can also just open up a terminal and type vim tutor and Vim's going to give you a little lesson in how to use Vim,
give it a shot that's all I've got for this week, you can find the shownotes at healthy hacker Dot Com, slash one, if you have any questions or feedback, send me a voicemail healthy hacker, Dot Com Slash Voicemail.
在 stack overflow 中有着各种教程,大家可以尝试一下。
生词
The reason I first started using Vim is kind of a silly
one 我第一次使用 Vim 的原因有点傻。
it's a mess
搞砸了
a good analogy
I like to use is lifting
weights if I'm squatting
100 pounds, but it really is cosmetically
,
跟着播客学英语-Why I use vim ? part one.
五分钟k8s入门到实战-应用配置
Go 语言史诗级更新-循环Bug修复
Github的一个奇技淫巧
点个在看你最好看
相关文章:

跟着播客学英语-Why I use vim ? part two
在上一期作者讲到了他使用 Vim 的主要原因是提高效率,不需要再去使用鼠标,今天我们继续上次未听完的内容: if you type Vi, thats going to be alias to Vim anyway by default theres, not really a good reason for you to use vi that I c…...

【网络通信三要素】TCP与UDP快速入门
网络通信三要素 1.什么是网络编程? 可以让设备中的程序,与网络上其他设备中的程序进行数据交互,从而实现网络通信的手段,java.net.*包下提供了网络编程的解决方案 2.基本的通信架构 基本的通信架构有2种形式:CS架构…...
k8s集群的简单搭建
K8S简单集群搭建 前提条件 windos11电脑,内存16g以上安装vmware虚拟机软件安装三个centos7虚拟机,分配硬盘40g,内存4g,CPU4核心网络均采用NAT模式(新建虚拟机默认的模式) centos7镜像下载:https://mirrors.tuna.tsi…...

语义分割笔记(三):通过opencv对mask图片来画分割对象的外接椭圆
文章目录 mask图像介绍步骤代码 mask图像介绍 根据 mask 图像来画分割对象的外接椭圆是一种常见的图像分割任务。Mask 图像通常是一个二值图像,其中包含了感兴趣对象的像素。通常情况下,白色像素表示对象,黑色像素表示背景。 步骤 以下是一…...

Nosql redis高可用和持久化
Nosql redis高可用和持久化 1、redis高可用2、redis持久化2.1redis持久化2.2Redis 持久化方法2.3RDB 持久化2.3.1RDB持久化工作原理2.3.2触发条件2.3.3其他自动触发机制2.3.4执行流程2.3.5启动时加载 2.4AOF 持久化2.4.1AOF持久化原理2.4.2开启AOF2.4.3执行流程2.4.4文件重写的…...
软件工程(1、2;5~7小测参考答案)
目录 软件工程第1、2章小测 需求工程第5-7章小测 软件工程第1、2章小测 一 单项选择题(12分) 1、下列关于软件开发的描述不正确的是()。(1分) 软件是独立于计算机硬件的一部分,但它又依赖于计算机硬件。 软件既是一种复杂的逻辑实体,又是一种工具。 软件的核心是程序,…...
服务器存储面临的两大难题
服务器存储面临的两大难题 服务器存储为核心的IT系统承受着业务发展带来的巨大压力: 随着业务发展,IT应用数量不断增多,当前数据中心的IT基础设施愈加复杂,服务器、存储等设备的数量不断增加。服务器与存储管理更加复杂:随着业务应用对IT基础…...
Blind Signature盲签名与fabric区块链结合的应用
盲签名的概念 首先由 David Chaum 于1982年提出,盲签名实现了签名者对发送者的消息进行签名,却不能知道签名者消息的具体内容。 相当于将文件放入信封,签名者在信封上对文件进行签名,而不知道具体的文件内容。 盲签名的实现方式…...

ueditor
下载文件 文档 UEditor入门部署 入门部署和体验 1.1 下载编辑器 到官网下载 UEditor 最新版:http://ueditor.baidu.com/website/download.html#ueditor 1.2 创建demo文件 解压下载的包,在解压后的目录创建 demo.html 文件,填入下面的…...

2023年台州市第三届网络安全技能大赛(MISC)—Black Mamba
前言:当时比赛没有做出来现在来复现一下 就当记录一下(这个思路没想到) Black Mamba: 一张图片 常规得分离,属性,LSB,盲水印等都尝试过 无果! 考点:异或解密࿰…...

这道面试题工作中经常碰到,但 99% 的程序员都答不上来
小时候都被问过一个脑筋急转弯,把大象放进冰箱有几个步骤?我们一开始都会抓耳挠腮,去想着该如何把大象塞进冰箱。最终揭晓的答案却根本不关心具体的操作方法,只是提供了 3 个步骤组成的流程,「把冰箱打开,把…...
Linux安装单机PostgreSQL15.4
1. 联网rpm安装 1.1.关闭服务 ## 关闭防火墙 systemctl stop firewalld.service systemctl disable firewalld.service ## 关闭 selinux cat /etc/selinux/config SELINUXdisabled1.2.安装yum源 yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-…...

最新 SpringCloud微服务技术栈实战教程 微服务保护 分布式事务 课后练习等
SpringCloud微服务技术栈实战教程,涵盖springcloud微服务架构Nacos配置中心分布式服务等 SpringCloud及SpringCloudAlibaba是目前最流行的微服务技术栈。但大家学习起来的感受就是组件很多,不知道该如何应用。这套《微服务实战课》从一个单体项目入手&am…...

Docker搭建MySQL8.0主从复制(一主一从)
0. 配置说明 宿主机使用的版本为19045的win10专业版,MySQL使用的是8.0,Docker容器使用Linux。 1. 安装Docker Desktop 略 修改Docker默认安装路径 安装包自己就提供了修改安装路径的功能,CMD中运行: “Docker Desktop Installe…...

40V汽车级P沟道MOSFET SQ4401EY-T1_GE3 工作原理、特性参数、封装形式—节省PCB空间,更可靠
AEC-Q101车规认证是一种基于失效机制的分立半导体应用测试认证规范。它是为了确保在汽车领域使用的分立半导体器件能够在严苛的环境条件下正常运行和长期可靠性而制定的。AEC-Q101认证包括一系列的失效机制和应力测试,以验证器件在高温、湿度、振动等恶劣条件下的可…...

记录在搭建Jenkins时,所遇到的坑,以及解决方案
项目场景: 记录在搭建Jenkins时,所遇到的坑,以及解决方案.问题描述1 在使用Jenkins构建时,报错如下: cp: cannot stat /project/xx/xxxx/dist/: No such file or directory Build step Execute shell marked build as failure Finished: FAILURE解决方…...

二极管“天马行空”的作用,你知道吗?
网友:二极管怎么有这么多种类呀? 工程师:二极管可以说除了电阻电容外用的比较多的一种元器件,起到的作用多着呢 那么二极管都可以起到哪些作用呢: 一、防反作用,主回路中串联一个二极管,是利用…...
鼎盛合:adc芯片的五种结构
随着国内消费电子产品、通信、工业自动化、汽车电子等行业的快速发展,对ADC芯片的需求不断增加,国内ADC芯片近年也在持续稳定地发展着。ADC种类多样,可分为单通道ADC、多通道ADC、高速ADC、精密ADC和集成ADC等,主要应用于医疗仪器…...

CTF 全讲解:[SWPUCTF 2021 新生赛]Do_you_know_http
文章目录 参考环境题目hello.php雾现User-Agent伪造 User-AgentHackBarHackBar 插件的获取修改请求头信息 雾散 a.php雾现本地回环地址与客户端 IP 相关的 HTTP 请求头X-Forwarded-For 雾散 参考 项目描述搜索引擎Bing、GoogleAI 大模型文心一言、通义千问、讯飞星火认知大模型…...

物联网AI MicroPython传感器学习 之 4路电容式触摸开关
学物联网,来万物简单IoT物联网!! 一、产品简介 板载TTP224电容式4键触摸感应IC,开发者通过触摸该电容模块获取对应的高低电平状态,可以广泛应用于灯光控制、玩具、家用电器等产品中。 引脚定义: VCC&…...

IDEA运行Tomcat出现乱码问题解决汇总
最近正值期末周,有很多同学在写期末Java web作业时,运行tomcat出现乱码问题,经过多次解决与研究,我做了如下整理: 原因: IDEA本身编码与tomcat的编码与Windows编码不同导致,Windows 系统控制台…...

Chapter03-Authentication vulnerabilities
文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...
Golang 面试经典题:map 的 key 可以是什么类型?哪些不可以?
Golang 面试经典题:map 的 key 可以是什么类型?哪些不可以? 在 Golang 的面试中,map 类型的使用是一个常见的考点,其中对 key 类型的合法性 是一道常被提及的基础却很容易被忽视的问题。本文将带你深入理解 Golang 中…...
论文解读:交大港大上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化学习框架(一)
宇树机器人多姿态起立控制强化学习框架论文解析 论文解读:交大&港大&上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化学习框架(一) 论文解读:交大&港大&上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化…...
GitHub 趋势日报 (2025年06月08日)
📊 由 TrendForge 系统生成 | 🌐 https://trendforge.devlive.org/ 🌐 本日报中的项目描述已自动翻译为中文 📈 今日获星趋势图 今日获星趋势图 884 cognee 566 dify 414 HumanSystemOptimization 414 omni-tools 321 note-gen …...

JUC笔记(上)-复习 涉及死锁 volatile synchronized CAS 原子操作
一、上下文切换 即使单核CPU也可以进行多线程执行代码,CPU会给每个线程分配CPU时间片来实现这个机制。时间片非常短,所以CPU会不断地切换线程执行,从而让我们感觉多个线程是同时执行的。时间片一般是十几毫秒(ms)。通过时间片分配算法执行。…...
Modbus RTU与Modbus TCP详解指南
目录 1. Modbus协议基础 1.1 什么是Modbus? 1.2 Modbus协议历史 1.3 Modbus协议族 1.4 Modbus通信模型 🎭 主从架构 🔄 请求响应模式 2. Modbus RTU详解 2.1 RTU是什么? 2.2 RTU物理层 🔌 连接方式 ⚡ 通信参数 2.3 RTU数据帧格式 📦 帧结构详解 🔍…...

FFmpeg avformat_open_input函数分析
函数内部的总体流程如下: avformat_open_input 精简后的代码如下: int avformat_open_input(AVFormatContext **ps, const char *filename,ff_const59 AVInputFormat *fmt, AVDictionary **options) {AVFormatContext *s *ps;int i, ret 0;AVDictio…...
前端高频面试题2:浏览器/计算机网络
本专栏相关链接 前端高频面试题1:HTML/CSS 前端高频面试题2:浏览器/计算机网络 前端高频面试题3:JavaScript 1.什么是强缓存、协商缓存? 强缓存: 当浏览器请求资源时,首先检查本地缓存是否命中。如果命…...
Java 与 MySQL 性能优化:MySQL 慢 SQL 诊断与分析方法详解
文章目录 一、开启慢查询日志,定位耗时SQL1.1 查看慢查询日志是否开启1.2 临时开启慢查询日志1.3 永久开启慢查询日志1.4 分析慢查询日志 二、使用EXPLAIN分析SQL执行计划2.1 EXPLAIN的基本使用2.2 EXPLAIN分析案例2.3 根据EXPLAIN结果优化SQL 三、使用SHOW PROFILE…...