From 96c4166b524bc72315fdea9aca492e64d2fb1df7 Mon Sep 17 00:00:00 2001 From: Saravanan Elumalai Date: Sat, 17 Nov 2018 05:34:35 -0600 Subject: [PATCH] Added few more options and corrected the desc. for better understanding (#21713) --- guide/english/vim/basic-usage/index.md | 70 ++++++++++++++------------ 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/guide/english/vim/basic-usage/index.md b/guide/english/vim/basic-usage/index.md index fccb6a2850..496ddb3901 100644 --- a/guide/english/vim/basic-usage/index.md +++ b/guide/english/vim/basic-usage/index.md @@ -1,37 +1,43 @@ --- title: Basic Usage --- -## VIM Basic Usage - -### Open File -- Run vim or vi and open the given filename. - -### Insert Mode -- Once opening the page enter I and you will see the text "Insert Mode" at the bottom of your screen. From here you can make any changes you want to the text of your file. - -### Save File -- :w - -### Save and Exit -- :x -- SHIFT ZZ -- :wq - -### Exit file if no changes made -- :q - -### Exit file and undo any changes made -- :q! - -### Display line numbers -- :set nu - -### Don't display line numbers -- :set nonu - -### Add syntax color based on prog language used -- :syntax on - ## About Vim -Vim is a text editor intended to be used in a CLI (command line interface) environment. It is highly configurable and built with efficiency in mind, without the need of a mouse or a graphical interface. It was built to be an improved version of the UNIX editor 'VI', or VI improved. That being said, VIM also has a GUI (Graphical User Interface) version named GVIM that shares the same core functionality as VIM but allows users additional feature such as additional menu and tool bars. +Vim is a text editor intended to be used in a CLI (command line interface) environment. It is highly configurable and built with efficiency in mind, without the need of a mouse or a graphical interface. It was built to be an improved version of the UNIX editor 'VI', or VI improved. That being said, VIM also has a GUI (Graphical User Interface) version named GVIM that shares the same core functionality as VIM but allows users additional feature such as additional menu and toolbars. + +## VIM Basic Usage + +### Open file +- Run `vim` or `vi` from the command line and specify the filename to work with. + +### Insert mode +- Once the file is opened and displayed, press the key 'I' to go into INSERT mode to edit the file. This can be verified with the text "Insert Mode" at the bottom of your screen. From here you can make any changes you want to the text of your file. + +### Save file +- `:w` + +### Save and exit +- `:x` +- `ZZ` +- `:wq` + +### Exit file if no changes were made +- `:q` + +### Exit file and undo any changes made +- `:q!` + +### Display line numbers +- `:set nu` + +### Hide line numbers +- `:set nonu` + +### Display indentation +- `:set list` + +### Hide indentation +- `:set nolist` + +### Add syntax color based on the programming language used +- `:syntax on`