跟着播客学英语-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&…...
头戴式耳机什么牌子最好?头戴式耳机推荐性价比高
脖子上挎个头戴式作为随身装备,不仅给服装配饰添加了潮流感,还可以可以随时聆听音乐,随着广大消费者的生活水平不断提高,市面上的头戴式耳机越来越多。 选择头戴式耳机时无非就是听音质、看外观、舒适度等等,那么头戴…...
第 366 场周赛 LeetCode 周赛题解
A 分类求和并作差 模拟 class Solution { public:int differenceOfSums(int n, int m) {int res 0;for (int i 1; i < n; i)res i % m ! 0 ? i : -i;return res;} };B 最小处理时间 排序:设四个 p r o c e s s o r T i m e processorTime processorTime 的元…...
Linux: tcpdump抓包示例
文章目录 1. 前言2. TCP 状态机3. tcpdump 抓包示例3.1 抓连接握手包:三次握手3.2 抓数据包示例3.3 抓终结连接:四次挥手 4. 参考资料 1. 前言 限于作者能力水平,本文可能存在谬误,因此而给读者带来的损失,作者不做任…...
seafile server10.0.1 onlyoffice
目标:解决seafile server无法查看office相关文档问题 seafile server 已安装完成 安装onlyoffice 一、Install Docker Engine on Ubuntu 20.04 验证是否安装成功 sudo docker run hello-world 二、拉取onlyoffice/documentserver 镜像及安装 docker network cre…...
商城系统选型:Java商城系统还是PHP商城系统好?
电子商务的不断发展,商城系统成为了企业建设在线销售平台的重要组成部分。 可是在选择合适的商城系统时,许多企业面临着一个重要的决策:是选择Java商城系统还是PHP商城系统呢?下面就对这两种常见的商城系统进行比较,并…...
【多线程进阶】线程安全的集合类
文章目录 前言1. 多线程环境使用 ArrayList2. 多线程环境使用队列3. 多线程环境使用哈希表3.1 HashTable3.2 ConcurrentHashMap 总结 前言 本文主要讲解 Java 线程安全的集合类, 在之前学习过的集合类中, 只有 Vector, Stack, HashTable, 是线程安全的, 因为在他们的关键方法中…...
016 Spring Boot + Vue 图书管理系统
Spring Boot Vue 图书馆管理系统(library-system) 本地快捷预览项目 第一步:运行 db 文件夹下的springboot-vue.sql(询问作者获取),创建springboot-vue数据库 第二步:修改后端数据库配置文件,启动后端 …...
C语言中volatile/register/const/static/extern/auto关键字的作用
目录 一、volatile 二、register详解 三、const详解 四、static详解 五、extern详解 语法 作用 六、auto详解 突然想总结一下这些关键字的作用,灵活使用这些对程序的可靠性和速率都有提高 一、volatile volatile是防止编译器优化,如果是高频繁…...
docker compose的安装和使用
docker-copose 介绍 docker-compose 是一个容器编排工具(自动化部署、管理); 它用来在单台 Linux 服务器上运行多个 Docker 容器; docker-compose 使用YAML文件来配置所有需要运行的 Docker 容器,该 YAML 文件的默认名称为 docker-compose.…...
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21‘ not found (required by
在某项目中遇到下面的错误, ./model2trt_v2: /lib64/libstdc.so.6: version GLIBCXX_3.4.21 not found (required by ./model2trt_v2) ./model2trt_v2: /lib64/libstdc.so.6: version GLIBCXX_3.4.21 not found (required by ../../../lib/linux_lib/libcuda_utils…...
建设项目环保验收平台网站/百度图片搜索引擎
<% 先下载远程图片 url"http://www.webjx.com/images/logo.gif" 远程图片地址 savepath"D:\photo\" 保存路径 为文件重命名 randomize ranNumint(999*rnd) filenameyear(now)&month(now)&day (now)&hour(now)&minute(now)&s…...
蓝衫网站建设/网站seo优化报告
1. 用命令查看一下IP配置:ifconfig, 修改网络配置文件 vi /etc/sysconfig/network-scripts/ifcfg-eht0 2.但是,很多时候,较难记住里面文件的内容,且在输入时容易输错,所以,在此,我…...
知名的教育行业网站开发/南宁网站建设公司排行
表面上解决run运行 在pycharm中点击run运行程序,发现没有打开run窗口,而是打开的Python console窗口。 打开菜单栏run->edit configurations,把下图中的复选框取消就可以了。这样做是解决当前py文件可以不用Python console,但…...
营销培训体系/海外网站seo优化
2019独角兽企业重金招聘Python工程师标准>>> 1、tomcat 启动报 processEngine NullPointerException, Service 层用到的activiti 的几个工具类都包无法注入的问题,Error creating bean with name processEngine 解决: 中午的时候将…...
点击运行显示网站正在建设/优质外链
java nio 通道上一篇文章里就讲述过,channel总是写数据的时候,要先把数据写入到bytebuffer,读数据的时候总是要先从channel中读入到bytebuffer。如下图,这个图是好多知名博客常用的图,很好理解这个channel。channel分为…...
一个专门做试题的网站/品牌策划公司介绍
2019独角兽企业重金招聘Python工程师标准>>> Python 3.5 终于将 Type Hint(类型提示)官方化 很久以前,我刚接触 Python 的时候,是很喜欢的,程序库很全,语法也很简单,一些在其他语言里…...