lecture3-开发环境与工具
一、开发环境是什么?¶
a set of tools for developing software
一套用于开发软件的工具
terminal-based development environment 基于终端的开发环境
integrated development environment 集成开发环境
两种开发环境没有优劣之分,适用的场景不同
有时候GUI会比较方便,有时候CLI会比较方便
IDE可以基于终端,但一般意义的IDE都是图形化的(graphical)
二、vim¶
为什么会有vim?这是由人类与代码交互的本质决定的。
当人在写文章的时候,一般会使用word,很容易一气呵成写完一篇文章,或者之后再顺着往下写
而在写代码时,需要跟很多不同的文件交互,一次很可能只会写一个很小的片段
vim is a text editor and also a way of interacting with a buffer of text that is optimized for this use case.
vim是一种高效与文本交互的工具
vim的哲学:一直把手指放在键盘上
the core idea in vim is that the interface to vim itself can be thought of like a programming language
vim是model editor
vim的模式:
- normal
- insert
- replace
- visual
- command
一个原则:优秀的程序员往往很懒惰
1、normal mode¶
movement¶
selection¶
edits¶
counts¶
modifiers¶
2、insert mode¶
3、replace mode¶
4、replace mode¶
5、command mode¶
三、language servers¶
there's a protocol where an IDE can talk to something called a language server
有一种协议,让集成开发环境与所谓的”语言服务器“进行通信
LSP实现什么功能?
- 代码补全
四、AI-powered¶
- auto-complete
- inline chat
- coding agent
