Build Your Text Editor With Rust!

八月 15, 2024 更新: 八月 18, 2024 [C/C++] #Rust #obsidian #编译链接

Build Your Text Editor With Rust!

If you are new to programming or Rust or you just want to learn how to build your text editor but are not sure how to, this tutorial is just right for you.

We will build our editor from scratch so you will get to learn a lot. I’ll explain each step along the way to make understanding a lot easier. It is less than1000 lines of code and it implements all the basic features you expect in a minimal editor, as well as syntax highlighting and a search feature.

It is in 7 parts: from setup (which is this part) to reading keypress and entering “raw mode” ,drawing on the screen and moving the cursor around,displaying text files (making our program a text view) ,editing text files, and saving changes,implementing a cool search feature and finally to**adding syntax highlighting** .

Our tutorial is largely based on this tutorial written in C so feel free to check it out.