diff --git a/introduction.md b/introduction.md index 08827b2..b84ca4e 100644 --- a/introduction.md +++ b/introduction.md @@ -34,7 +34,7 @@ Let's see some random examples to compare Vim with your current choice of editor | How to see colors for different parts of your code? | Run `:syntax on`. If it doesn't recognize the language properly, use `set ft=python` for example. | | | How to hide different parts of the file so that you can concentrate on only one part at a time? | Run `:set foldmethod=indent` assuming your file is properly indented. | | | How to open multiple files in tabs? | Use `:tabedit ` to open multiple files in "tabs" (just like browser tabs), and use `gt` to switch between tabs | | -| You use some words frequently in your document and wish there was a way that it could be quickly filled in the next time you use the same word? | Press `ctrl-n` to see the list of "completions" for the current word, based on all the words that you have used in the current document. Alternatively, use `:ab mas Maslow's hierarchy of needs` to expadn the abbreviation automatically when you type `m a s `. | | +| You use some words frequently in your document and wish there was a way that it could be quickly filled in the next time you use the same word? | Press `ctrl-n` to see the list of "completions" for the current word, based on all the words that you have used in the current document. Alternatively, use `:ab mas Maslow's hierarchy of needs` to expand the abbreviation automatically when you type `m a s `. | | | You have some data where only the first 10 characters in each line are useful and the rest is no longer useful for you. How do you get only that data? | Press `ctrl-v`, select the text and press `y` to copy the selected rows and columns of text. | | | What if you received a document from someone which is all in capitals, find it irritating and want to convert it to lower case? | (1) Run the following: :for i in range(0, line('$')) | call setline(i, tolower(getline(i))) | endfor.
(2) Don't worry, details will be explored in later chapters. A more succinct way would be to run `:%s#\\(.\\)#\\l\\1#g`, but the first way would be simpler. (3) Select all the text using `1GVG` and then using the `u` operator to convert the selection to lowercase. | |