简体   繁体   English

Atom 编辑器中的“缓冲区”是什么?

[英]What is the “buffer” in the Atom editor?

In describing how find (& find and replace) work, the Atom Flight Manual refers to the buffer as one scope of search, with the entire project being another scope.在描述查找(以及查找和替换)如何工作时, Atom 飞行手册缓冲区称为一个 scope 的搜索,整个项目是另一个 scope。 What is the buffer?什么是缓冲区? It seems like it would be the current file, but I expect it is more than that.它似乎是当前文件,但我希望它不止于此。

From the Atom Flight Manual :来自原子飞行手册

A buffer is the text content of a file in Atom.缓冲区是 Atom 中文件的文本内容。 It's basically the same as a file for most descriptions, but it's the version Atom has in memory.它与大多数描述的文件基本相同,但它是 Atom 在 memory 中的版本。 For instance, you can change the text of a buffer and it isn't written to its associated file until you save it.例如,您可以更改缓冲区的文本,并且在保存之前不会将其写入其关联文件。

Also came across this from The Craft of Text Editing by Craig Finseth, Chapter 6 :也从Craig Finseth的《文本编辑技巧》第 6 章中发现了这一点:

A buffer is the basic unit of text being edited.缓冲区是正在编辑的文本的基本单位。 It can be any size, from zero characters to the largest item that can be manipulated on the computer system.它可以是任何大小,从零个字符到可以在计算机系统上操作的最大项目。 This limit on size is usually set by such factors as address space, amount of real and/or virtual memory, and mass storage capacity.此大小限制通常由地址空间、实际和/或虚拟 memory 数量和大容量存储容量等因素设置。 A buffer can exist by itself, or it can be associated with at most one file.缓冲区可以单独存在,也可以最多与一个文件相关联。 When associated with a file, the buffer is a copy of the contents of the file at a specific time.当与文件关联时,缓冲区是特定时间文件内容的副本。 A file, on the other hand, can be associated with any number of buffers, each one being a copy of that file's contents at the same or at different times.另一方面,一个文件可以与任意数量的缓冲区相关联,每个缓冲区都是该文件内容在同一时间或不同时间的副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM