Vi editor tips and tricks advanced |

Published: 19 September 2023
on channel: DBA Experiments
68
3

Vi editor tips and tricks advanced | VI EDITOR in Tamil | detailed explain Basics of VI editor | Vi editor Tutorial | Linux Tutorial for Beginners | #linux #administration Course | Linux administration | #linuxadministration | #vieditor #viralvideo #linux

Subscribe the channel :) http://bit.ly/42QGIlw

vi commands:

Insert Mode
o - Insert new line below currsor with insert mode.
shift+O - Insert new line before currsor with insert mode.
shift+A - Insert mode end of the line.
i - Commonly used for insert mode.
shift+S - Cut the current line and entering to insert mode.

Command mode:
Esc - Come to command mode from insert mode.
:1 - Jump to first line.
gg - Jump to first line.
shift+g - Jump to last line.
:$ - Jump to last line.
:10 - Jump to 10th line.
u - yy the changes.
ctrl+r - Redo the changes.
yy - Copy the current line.
3yy - 3 lines copied from the currsor (3 is your choise change how many line to copy Ex: 10yy means 10 line copied).
y$ - Copy everything from the cursor to the end of the line.
y^ - Copy everything from the cursor to the start of the line.
yw - Copy to the start of the next word.
3yw - Copy to the start of the cursor next three word.
y% - Copy to the character inside pairs are (), {}, and []. Useful to copy text between matching brackets.
p - Paste the copied line(s) below currsor.
shift+P - Paste the copied lines(s) above currsor.
gg d G - Delete all lines.
:%d - Delete all lines.
:set nu - Set the number for all lines.
:g/^\s*$/d - Remove all whitespace lines.
:g/^$/d - Remove empty lines.
:%s/find/replace/global
:%s/find/replace/

Like & Subscribe The Channel.

Exit mode:
:w - Save the file.
:wq - Save the file and quite.
:q - Quite the file without saving.
:wq! - Save the file and quite without asking any question.

Below Some new tips go and watch.

vi editor in linux
vi editor in linux pdf
vi editor in linux commands
vi editor in linux save command
vi editor in linux download
vi editor in linux tutorial
vi editor in linux with examples
Vi Editor Basics In Linux
Vi Editor Tricks
Vi Tips And Tricks
Vi Editor Tips And Tricks
vi cut copy paste

Additional Tips For You:

Entering Insert Mode:
i: Start inserting text before the cursor.
a: Start inserting text after the cursor.
I: Start inserting text at the beginning of the line.
A: Start inserting text at the end of the line.
o: Open a new line below the current line and start inserting text.
O: Open a new line above the current line and start inserting text.
Exiting Insert Mode:

Esc: Return to command mode.
Saving and Quitting:
:w: Save changes.
:q: Quit (close) the file.
:wq or ZZ: Save changes and quit.
:q!: Quit without saving (force quit).
:x or :wq: Save changes and quit.
Navigating:

Arrow keys or h, j, k, l: Navigate left, down, up, and right respectively.
gg: Go to the beginning of the file.
G: Go to the end of the file.
:n: Go to line number n (replace n with the desired line number).

Editing:
x: Delete the character under the cursor.
dd: Delete the entire line.
dw: Delete a word.
yy: Copy the entire line.
p: Paste after the cursor.
P: Paste before the cursor.

Undo and Redo:
u: Undo the last change.
Ctrl + r: Redo.
Search and Replace:

/pattern: Search for a pattern (type pattern and press Enter).
n: Move to the next occurrence of the pattern.
N: Move to the previous occurrence of the pattern.
:%s/old/new/g: Replace all occurrences of "old" with "new" in the entire file.

Cut, Copy, and Paste:
yy: Copy the current line.
p: Paste after the current line.
P: Paste before the current line.
dd: Cut the current line.
yw: Copy a word.
yw: Cut a word.

Saving and Quitting:
:w: Save changes.
:q: Quit (close) the file.
:wq or ZZ: Save changes and quit.
:q!: Quit without saving (force quit).
:x or :wq: Save changes and quit.

Other Useful Commands:
:help: Open help.
:q!: Quit without saving.
:set nu: Show line numbers.
:set nonu: Hide line numbers

| database administration | database administrator | Linux administration | database administrator |


Watch video Vi editor tips and tricks advanced | online without registration, duration hours minute second in high quality. This video was added by user DBA Experiments 19 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 6 once and liked it people.