跟着播客学英语-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&…...

测试微信模版消息推送
进入“开发接口管理”--“公众平台测试账号”,无需申请公众账号、可在测试账号中体验并测试微信公众平台所有高级接口。 获取access_token: 自定义模版消息: 关注测试号:扫二维码关注测试号。 发送模版消息: import requests da…...
React hook之useRef
React useRef 详解 useRef 是 React 提供的一个 Hook,用于在函数组件中创建可变的引用对象。它在 React 开发中有多种重要用途,下面我将全面详细地介绍它的特性和用法。 基本概念 1. 创建 ref const refContainer useRef(initialValue);initialValu…...
从零实现富文本编辑器#5-编辑器选区模型的状态结构表达
先前我们总结了浏览器选区模型的交互策略,并且实现了基本的选区操作,还调研了自绘选区的实现。那么相对的,我们还需要设计编辑器的选区表达,也可以称为模型选区。编辑器中应用变更时的操作范围,就是以模型选区为基准来…...

前端导出带有合并单元格的列表
// 导出async function exportExcel(fileName "共识调整.xlsx") {// 所有数据const exportData await getAllMainData();// 表头内容let fitstTitleList [];const secondTitleList [];allColumns.value.forEach(column > {if (!column.children) {fitstTitleL…...
Qwen3-Embedding-0.6B深度解析:多语言语义检索的轻量级利器
第一章 引言:语义表示的新时代挑战与Qwen3的破局之路 1.1 文本嵌入的核心价值与技术演进 在人工智能领域,文本嵌入技术如同连接自然语言与机器理解的“神经突触”——它将人类语言转化为计算机可计算的语义向量,支撑着搜索引擎、推荐系统、…...

自然语言处理——循环神经网络
自然语言处理——循环神经网络 循环神经网络应用到基于机器学习的自然语言处理任务序列到类别同步的序列到序列模式异步的序列到序列模式 参数学习和长程依赖问题基于门控的循环神经网络门控循环单元(GRU)长短期记忆神经网络(LSTM)…...
Device Mapper 机制
Device Mapper 机制详解 Device Mapper(简称 DM)是 Linux 内核中的一套通用块设备映射框架,为 LVM、加密磁盘、RAID 等提供底层支持。本文将详细介绍 Device Mapper 的原理、实现、内核配置、常用工具、操作测试流程,并配以详细的…...

力扣热题100 k个一组反转链表题解
题目: 代码: func reverseKGroup(head *ListNode, k int) *ListNode {cur : headfor i : 0; i < k; i {if cur nil {return head}cur cur.Next}newHead : reverse(head, cur)head.Next reverseKGroup(cur, k)return newHead }func reverse(start, end *ListNode) *ListN…...
站群服务器的应用场景都有哪些?
站群服务器主要是为了多个网站的托管和管理所设计的,可以通过集中管理和高效资源的分配,来支持多个独立的网站同时运行,让每一个网站都可以分配到独立的IP地址,避免出现IP关联的风险,用户还可以通过控制面板进行管理功…...

【 java 虚拟机知识 第一篇 】
目录 1.内存模型 1.1.JVM内存模型的介绍 1.2.堆和栈的区别 1.3.栈的存储细节 1.4.堆的部分 1.5.程序计数器的作用 1.6.方法区的内容 1.7.字符串池 1.8.引用类型 1.9.内存泄漏与内存溢出 1.10.会出现内存溢出的结构 1.内存模型 1.1.JVM内存模型的介绍 内存模型主要分…...