From a0de85af8d2cd859423778679cfc14b53ea1c334 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 29 Dec 2017 23:49:31 -0500 Subject: [PATCH] Add a variety of commands to vim.md --- help/vim.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/help/vim.md b/help/vim.md index 90c4e3c..c4af46d 100644 --- a/help/vim.md +++ b/help/vim.md @@ -1,4 +1,4 @@ -# vim / neovim +[Vim is a language](https://github.com/mhinz/vim-galore). Use it often enough and you'll be [fluent](https://medium.com/@mkozlows/why-atom-cant-replace-vim-433852f4b4d1) in no time. Note that the commands I mention in this file are the ones I use the most often and are by no means exhaustive. @@ -118,6 +118,8 @@ Note that text deleted is also copied into vim's hidden buffer. There is no need Repeat the last operation with `.`. This is really powerful when you want to perform the same action multiple times. +If you want to repeat the last operation on multiple lines, simply press `` to enter visual block mode, select the lines you want to operate on, then execute `.` on them. + ## Basic Commands - Undo the last action: `u` @@ -307,6 +309,19 @@ Note that there are more spell check commands out there, although you really sho - Press `x` to delete the first character, repeatedly if necessary - Exit the mode as usual +## Other Commands + +These commands may get used from time to time, but aren't used enough to warrant keybindings. + +- Switch between soft and hard tabs: `:set expandtab!` + - Note that you should never have to use this since the repository should have an `.editorconfig` +- Toggle wrap: `:set wrap!` + - Most of the time you don't want to hide text in a text editor, especially vim +- Resize windows placed on top of each other (as opposed to side by side): `:winc <+/-/=>` + - `N` is the number of units to increment / decrement the window size by. + - Do not use `N` when using `=`. + - Most of the time you shouldn't have to deal with these kinds of window sizes. Instead, prefer vertical splits and ` + >` / ` + <` / ` + =` + ## Plugin Specific ### fzf.vim