You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
4.6 KiB
Markdown

# Learn Vim (the Smart Way)
## What is this about?
3 years ago
*Learn Vim (the Smart Way)* is a guide to learn the good parts of Vim.
There are many places to learn Vim: the `vimtutor` is a great place to start and the `help` manual has all the references you will ever need.
However, the average user needs something more than `vimtutor` and less than the `help` manual. This guide attempts to bridge that gap by highlighting only the key features to learn the most useful parts of Vim in the least time possible.
Chances are you won't need all 100% of Vim features. You probably only need to know about 20% to become a powerful Vimmer. This guide will show you which Vim features you will find most useful.
This is an opinionated guide. It covers techniques that I often use when using Vim. The chapters are sequenced based on what I think would make the most logical sense for a beginner to learn Vim.
This guide is examples-heavy. When learning a new skill, examples are indispensable, *having numerous examples will solidify the concepts more effectively.*
Some of you may wonder why do you need to learn Vimscript? Won't learning just to use Vim enough? In my first year of using Vim, I was content with just knowing how to use Vim. Time passed and I started needing Vimscript more and more to write custom commands for my specific editing needs. As you are mastering Vim, you will sooner or later need to learn Vimscript. So why not sooner? Vimscript is a small language. You can learn its fundamentals in just four chapters of this guide.
You can go far using Vim without knowing any Vimscript, but knowing it will help you excel even farther.
This guide is written for both beginner and advanced Vimmers. It starts out with broad and simple concepts and ends with specific and advanced concepts. If you're an advanced user already, I would encourage you to read this guide from start to finish anyway, because you will learn something new!
## I Want More Vim Tips!
Follow [@learnvim](https://twitter.com/learnvim) for updates, Vim tips, etc.
## Support This Project
3 years ago
This guide is and will always be free.
If you want to financially support this project, you can [purchase this guide on gumroad](https://gum.co/DADpa).
<a href="https://gum.co/DADpa"><img src="images/learn-vim-cover.png" width="100"></a>
3 years ago
## Table Of Contents
4 years ago
3 years ago
### Prologue
- [Ch 0 - New to Vim? Read This First](./ch00_new_to_vim_read_this_first.md)
3 years ago
### Part 1: Learn Vim the Smart Way
4 years ago
- [Ch 1 - Starting Vim](./ch01_starting_vim.md)
- [Ch 2 - Buffers, Windows, and Tabs](./ch02_buffers_windows_tabs.md)
- [Ch 3 - Opening and Searching Files](./ch03_searching_files.md)
- [Ch 4 - Vim Grammar](./ch04_vim_grammar.md)
- [Ch 5 - Moving in a File](./ch05_moving_in_file.md)
- [Ch 6 - Insert Mode](./ch06_insert_mode.md)
- [Ch 7 - The Dot command](./ch07_the_dot_command.md)
- [Ch 8 - Registers](./ch08_registers.md)
- [Ch 9 - Macros](./ch09_macros.md)
4 years ago
- [Ch 10 - Undo](./ch10_undo.md)
- [Ch 11 - Visual Mode](./ch11_visual_mode.md)
- [Ch 12 - Search and Substitute](./ch12_search_and_substitute.md)
- [Ch 13 - The Global Command](./ch13_the_global_command.md)
- [Ch 14 - External Commands](./ch14_external_commands.md)
- [Ch 15 - Command-line Mode](./ch15_command-line_mode.md)
4 years ago
- [Ch 16 - Tags](./ch16_tags.md)
4 years ago
- [Ch 17 - Fold](./ch17_fold.md)
4 years ago
- [Ch 18 - Git](./ch18_git.md)
- [Ch 19 - Compile](./ch19_compile.md)
- [Ch 20 - Views, Sessions, and Viminfo](./ch20_views_sessions_viminfo.md)
4 years ago
3 years ago
### Part 2: Customize Vim the Smart Way
4 years ago
4 years ago
- [Ch 21 - Vimrc](./ch21_vimrc.md)
- [Ch 22 - Vim Packages](./ch22_vim_packages.md)
- [Ch 23 - Vim Runtime](./ch23_vim_runtime.md)
4 years ago
3 years ago
### Part 3: Learn Vimscript the Smart Way
4 years ago
- [Ch 24 - Vimscript Basic Data Types](./ch24_vimscript_basic_data_types.md)
- [Ch 25 - Vimscript Conditionals And Loops](./ch25_vimscript_conditionals_and_loops.md)
4 years ago
- [Ch 26 - Vimscript Variable Scopes](./ch26_vimscript_variables_scopes.md)
3 years ago
- [Ch 27 - Vimscript Functions](./ch27_vimscript_functions.md)
3 years ago
## Translations
- [Learn-Vim 中文翻译](https://github.com/wsdjeg/Learn-Vim_zh_cn)(`zh-CN`)
3 years ago
- [Learn-Vim Spanish](https://github.com/victorhck/learn-Vim-es)(`es`)
3 years ago
## License & Copyright
The materials here are all © 2020-2021 Igor Irianto.
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png" /></a><br />
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</a>.