7. Set options
With this type of vi editor commands we can set different options in vi editor.
- :set all ===> show all set options
- :set nu ===> show line numbers before every line
- :set nonu ===> do not show line numbers
- :set ruler ===> show position of cursor at bottom right of the screen
- :set noruler ===> do not show the above
- :set ic ===> set ignore case in search on
- :set noic ===> set ignore case in search off
- :set hls ===> highlight the word given for searching
- :set nohls ===> do not highlight the word
- :set showmode ===> set the indicator mode
- :set noai ===> set autoindenting
- :set lm=@ ===> set the left margin
- :set tw=@ ===> set the text width from left to right
- :set wm=@ ===> set the wrap margin
- :set ts=@ ===> set the tab stop
- :set incsearch ===> set up an incremental search
8. Insert
With this type of vi editor commands we can insert lines in the file as per requirement.
- O ===> insert a blank line above the cursor and change to insert mode
- o ===> insert a blank line below the cursor and change to insert mode
- :r <file> ===> insert the file’s content in current file after the cursor
Leave a Reply