2025-02-19 04:38:34 +02:00
|
|
|
#+title: Lesson 03 | text editors (vim)
|
2024-11-29 09:02:47 +02:00
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../_share/media/css/missing-semester.css" />
|
2024-12-01 00:48:05 +02:00
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../_share/media/css/org-media-sass/collapsible.css" />
|
2024-11-29 10:36:09 +02:00
|
|
|
#+HTML_HEAD: <script src="../_share/media/js/collapsible.js"></script>
|
2025-02-19 04:38:34 +02:00
|
|
|
#+OPTIONS: H:6
|
2024-11-29 09:02:47 +02:00
|
|
|
|
|
|
|
|
* Links
|
|
|
|
|
#+attr_html: :class links
|
|
|
|
|
- [[../toc.org][TOC | Missing Semester]]
|
|
|
|
|
- [[https://www.youtube.com/playlist?list=PLyzOVJj3bHQuloKGG59rS43e29ro7I57J][Playlist: Missing Semester]]
|
2025-02-19 04:38:34 +02:00
|
|
|
- [[https://missing.csail.mit.edu/2020/editors/][class notes]]
|
2024-11-29 09:02:47 +02:00
|
|
|
|
2025-02-27 03:23:17 +02:00
|
|
|
- Curr: https://youtu.be/a6Q8Na575qc?si=B-yLC3sGZxqQhOTb&t=2258
|
2024-11-29 09:02:47 +02:00
|
|
|
|
|
|
|
|
|
2025-02-19 04:38:34 +02:00
|
|
|
*** timestamps
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:CUSTOM_ID: timestamp
|
|
|
|
|
:END:
|
2024-11-29 09:02:47 +02:00
|
|
|
|
|
|
|
|
#+attr_html: :class playlist
|
2025-02-19 04:38:34 +02:00
|
|
|
+ [[https://www.youtube.com/watch?v=a6Q8Na575qc][00:00 - introduction]]
|
|
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=qzD5HiycrEhplKeQ&t=285][04:45 - modal editor]]
|
|
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=ra-MbPQpbKzAcJnP&t=571][09:30 - opening vim]]
|
|
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=OyhOfX2ft9w7O9kM&t=1020][17:00 - buffers vs windows]]
|
2025-02-23 21:05:52 +02:00
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=gyYNZk4_XiXVk_4a&t=1217][20:17 - movement keys]]
|
2025-02-27 03:23:17 +02:00
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=QysgH5bMEG0bigKq&t=1530][25:30 - editing commands]]
|
2025-02-19 04:38:34 +02:00
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=_gbAQlOZ_irCdHt6&t=1797][29:54 - questions]]
|
2025-02-27 03:23:17 +02:00
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=4VwNEC040Jna5znz&t=2254][37:33 - demo]] *current*
|
2025-02-19 04:38:34 +02:00
|
|
|
+ [[https://youtu.be/a6Q8Na575qc?si=0qDOcyT0WX1U4RXB&t=2682][44:42 - vim configuration]]
|
|
|
|
|
|
|
|
|
|
* notes
|
2025-02-23 05:03:40 +02:00
|
|
|
|
|
|
|
|
** modes
|
|
|
|
|
*** normal mode
|
|
|
|
|
- not editing directly
|
|
|
|
|
- default
|
|
|
|
|
- get to it via ESC
|
|
|
|
|
*** insert mode
|
|
|
|
|
- i
|
|
|
|
|
- pushes text aside
|
|
|
|
|
*** replace mode
|
|
|
|
|
- R (capital 'r')
|
|
|
|
|
- overwrites text
|
|
|
|
|
*** visual mode
|
|
|
|
|
- line visual: Shift+V
|
|
|
|
|
- goes by line
|
|
|
|
|
- block visual: Ctrl+V
|
|
|
|
|
- allows you to select vertical and horizontal
|
|
|
|
|
*** command line
|
|
|
|
|
|
|
|
|
|
** opening vim
|
|
|
|
|
|
|
|
|
|
- entered via ':'
|
|
|
|
|
|
|
|
|
|
** buffers vs windows
|
2025-02-23 21:05:52 +02:00
|
|
|
- vim maintains a set of open buffers
|
|
|
|
|
- any buffer can be open in 0 or more windows at any time
|
|
|
|
|
- you can have tabs, and tabs can contain windows
|
|
|
|
|
|
|
|
|
|
*** quiting
|
|
|
|
|
- :q only closes the current WINDOW, not buffer
|
|
|
|
|
- :q exits when there are no more windows open
|
|
|
|
|
- :qa is "quit all" and closes all windows
|
|
|
|
|
|
|
|
|
|
** movement
|
|
|
|
|
- hjkl
|
|
|
|
|
- w/b forward and backward by one word
|
|
|
|
|
- e end of word
|
|
|
|
|
- 0/$ beginning and end of line
|
|
|
|
|
- ^ first non empty character on a line
|
|
|
|
|
|
|
|
|
|
*** scrolling up and down
|
|
|
|
|
- C+U move up
|
|
|
|
|
- C+D move down
|
|
|
|
|
|
|
|
|
|
*** move by buffer
|
|
|
|
|
- G moves to end of buffer
|
|
|
|
|
- gg move to top of buffer
|
|
|
|
|
|
|
|
|
|
*** move by screen
|
|
|
|
|
- L moves to lowest line on screen
|
|
|
|
|
- M moves to middle line on screen
|
|
|
|
|
- H moves to the highest on screen
|
|
|
|
|
|
|
|
|
|
*** move by find
|
|
|
|
|
- f <letter> will move to the first letter forward
|
|
|
|
|
- F <letter> backwards
|
|
|
|
|
- t <letter> moves to just before the letter
|
|
|
|
|
- T <letter> moves backwards to in front of the letter
|
|
|
|
|
|
|
|
|
|
** editing commands
|