From 59cd3f3fec64be9d45e005de371e2959804654a2 Mon Sep 17 00:00:00 2001 From: Michal Date: Wed, 15 Apr 2020 18:16:27 +0200 Subject: [PATCH] create vim.md initial --- pages.pl/common/vim.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pages.pl/common/vim.md diff --git a/pages.pl/common/vim.md b/pages.pl/common/vim.md new file mode 100644 index 0000000000..adb73f44af --- /dev/null +++ b/pages.pl/common/vim.md @@ -0,0 +1,37 @@ +# vim + +> Vim (Vi IMproved), a command-line text editor, provides several modes for different kinds of text manipulation. +> Pressing `i` enters edit mode. `` goes back to normal mode, which doesn't allow regular text insertion. +> More information: . + +- Open a file: + +`vim {{path/to/file}}` + +- View Vim's help manual: + +`:help` + +- Save a file: + +`:write` + +- Quit without saving: + +`:quit!` + +- Open a file at a specified line number: + +`vim +{{line_number}} {{path/to/file}}` + +- Undo the last operation: + +`u` + +- Search for a pattern in the file (press `n`/`N` to go to next/previous match): + +`/{{search_pattern}}` + +- Perform a regex substitution in the whole file: + +`:%s/{{pattern}}/{{replacement}}/g`