From 5e108cc287188995fd16f93df1327de5d8368bb9 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Thu, 27 Aug 2020 23:04:09 +0900 Subject: [PATCH] Correct words --- ch12_search_and_substitute.md | 6 +++--- ch2_buffers_windows_tabs.md | 6 +++--- ch3_opening_and_searching_files.md | 2 +- ch4_vim_grammar.md | 2 +- ch5_moving_in_file.md | 2 +- ch7_the_dot_command.md | 2 +- ch9_macros.md | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ch12_search_and_substitute.md b/ch12_search_and_substitute.md index 4a9e7f7..eed3a25 100644 --- a/ch12_search_and_substitute.md +++ b/ch12_search_and_substitute.md @@ -1,7 +1,7 @@ # Search and Substitute This chapter covers two separate but related concepts: search and substitute. Many times, the texts that you are searching for are not straightforward and you must search for a common pattern. By learning how to use meaningful patterns in search and substitute instead of literal strings, you will be able to target any text quickly. -As a side note, in this chapter, I will mainly use `/` when talking about search. Eveything you can do with `/` can also be done with `?`. +As a side note, in this chapter, I will mainly use `/` when talking about search. Everything you can do with `/` can also be done with `?`. # Smart Case Sensitivity @@ -274,7 +274,7 @@ three let = "3"; four let = "4"; five let = "5"; ``` -You neeed to swap all the "let" with the variable names. To do that, run: +You need to swap all the "let" with the variable names. To do that, run: ``` :%s/\(\w\+\) \(\w\+\)/\2 \1/ @@ -389,7 +389,7 @@ If you need to replace a URL with a long path: https://mysite.com/a/b/c/d/e ``` -To suibstitute it with the word "hello", run: +To substitute it with the word "hello", run: ``` :s/https:\/\/mysite.com\/a\/b\/c\/d\/e/hello/ ``` diff --git a/ch2_buffers_windows_tabs.md b/ch2_buffers_windows_tabs.md index 6c79d92..6cce22e 100644 --- a/ch2_buffers_windows_tabs.md +++ b/ch2_buffers_windows_tabs.md @@ -111,7 +111,7 @@ Ctrl-W o Makes the current window the only one on screen and closes other win And here is a list of useful window Ex commands: ``` :vsplit filename Split window vertically -:split filename Split window horiontally +:split filename Split window horizontally :new filename Create new window ``` @@ -163,11 +163,11 @@ Moving between windows is like traveling two-dimensionally along X-Y axis in a C ![cartesian movement in x and y axis](./img/cartesian-xy.png) -Moving between buffers is like travelling across the Z axis in a Cartesian coordinate. Imagine your buffer files are lined up across the Z axis. You can traverse the Z axis one buffer at a time with `:bnext` and `:bprevious`. You can jump to any coordinate in Z axis with `:buffer filename/buffernumber`. +Moving between buffers is like traveling across the Z axis in a Cartesian coordinate. Imagine your buffer files are lined up across the Z axis. You can traverse the Z axis one buffer at a time with `:bnext` and `:bprevious`. You can jump to any coordinate in Z axis with `:buffer filename/buffernumber`. ![cartesian movement in z axis](./img/cartesian-z.png) -You can move in *three-dimensional space* by combining window and buffer movements. You can move to the top, right, bottom, or left window (X-Y navigations) with window navigations. Since each window contains buffers, you can move foward and backward (Z navigations) with buffer movements. +You can move in *three-dimensional space* by combining window and buffer movements. You can move to the top, right, bottom, or left window (X-Y navigations) with window navigations. Since each window contains buffers, you can move forward and backward (Z navigations) with buffer movements. ![cartesian movement in x, y, and z axis](./img/cartesian-xyz.png) diff --git a/ch3_opening_and_searching_files.md b/ch3_opening_and_searching_files.md index c07d17e..f34b18a 100644 --- a/ch3_opening_and_searching_files.md +++ b/ch3_opening_and_searching_files.md @@ -127,7 +127,7 @@ For example, to look for all occurrences of "foo" string inside all ruby files ( :vim /foo/ app/controllers/**/*.rb ``` -After running that command, you will be redirected to the first result. Vim's `vim` search command uses `quickfix` operation. To see all search results, run `:copen`. This opens a `quickfix` window. Here are some useful quickfix commands to get you productive immmediately: +After running that command, you will be redirected to the first result. Vim's `vim` search command uses `quickfix` operation. To see all search results, run `:copen`. This opens a `quickfix` window. Here are some useful quickfix commands to get you productive immediately: ``` :copen Open the quickfix window diff --git a/ch4_vim_grammar.md b/ch4_vim_grammar.md index 6e4ca88..3542734 100644 --- a/ch4_vim_grammar.md +++ b/ch4_vim_grammar.md @@ -6,7 +6,7 @@ This is the most important chapter in the entire book. Once you understand Vim c # How to learn a language -I am not a native English speaker. I learned English when I was 13 when I moved to the US. I had to do three things to build up linguistic profiency: +I am not a native English speaker. I learned English when I was 13 when I moved to the US. I had to do three things to build up linguistic proficiency: 1. Learn grammar rules 2. Increase my vocabulary diff --git a/ch5_moving_in_file.md b/ch5_moving_in_file.md index 7d849ce..c22f5b8 100644 --- a/ch5_moving_in_file.md +++ b/ch5_moving_in_file.md @@ -32,7 +32,7 @@ To my surprise, it only took a few days to get used to using `hjkl`. *By the way, if you wonder why Vim uses `hjkl` to move, this is because Lear-Siegler ADM-3A terminal where Bill Joy wrote Vi, didn't have arrow keys and used `hjkl` as left/down/up/right.* -If I want to go somewhere close by, like moving from one part of a word to another part of the same word, I would use `h` or `l`. If I want to go up or down a few lines within displayed window, I would use `j` or `k`. If I want to go somewhere farther, I would use a diffferent motion. +If I want to go somewhere close by, like moving from one part of a word to another part of the same word, I would use `h` or `l`. If I want to go up or down a few lines within displayed window, I would use `j` or `k`. If I want to go somewhere farther, I would use a different motion. # Relative Numbering diff --git a/ch7_the_dot_command.md b/ch7_the_dot_command.md index d294d97..cb662c4 100644 --- a/ch7_the_dot_command.md +++ b/ch7_the_dot_command.md @@ -101,7 +101,7 @@ When you are editing, always be on the lookout for a motion that can do several # Learn the Dot Command the Smart Way -The dot command's power comes from exchanging several keystrokes for one. It is probably not a profitable exchangeto use the dot command for one-keyed-operations like `x`. If your last change requires a complex operation like `cgnconst`, the dot command reduces nine keypresses into one, a very good trade-off. +The dot command's power comes from exchanging several keystrokes for one. It is probably not a profitable exchange to use the dot command for one-keyed-operations like `x`. If your last change requires a complex operation like `cgnconst`, the dot command reduces nine keypresses into one, a very good trade-off. When editing, ask if the action you are about to do is repeatable. For example, if I need to remove the next three words, is it more economical to use `d3w` or to do `dw` then `.` two times? Will you be deleting a word again? If so, then it makes sense to use `dw` and repeat it several times instead of `d3w` because `dw` is more reusable than `d3w`. Keep a "change-driven" mindset while editing. diff --git a/ch9_macros.md b/ch9_macros.md index e6efeaf..bedd60f 100644 --- a/ch9_macros.md +++ b/ch9_macros.md @@ -253,7 +253,7 @@ Running `99@a`, only executes the macro three times. It does not execute the mac Recall from earlier section that macros can be executed using the command line command `:normal` (ex: `:3,5 normal @a` to execute macro "a" on lines 3-5). If you run `:1,$ normal @a`, you will see that the macro is being executed on all lines except the "foo" line. It works! -Although internally Vim does not actually run the macros in parallel, outwardly, it behaves like such. Vim executes `@a` *independently* on each line from the first line to the last line (`1,$`). Since Vim executes these macros indpendently, each line does not know that one of the macro executions had failed on the "foo" line. +Although internally Vim does not actually run the macros in parallel, outwardly, it behaves like such. Vim executes `@a` *independently* on each line from the first line to the last line (`1,$`). Since Vim executes these macros independently, each line does not know that one of the macro executions had failed on the "foo" line. # Learn Macros the Smart Way