From edd706e4cbcd6ce3aaa6d4481246017a6194c14e Mon Sep 17 00:00:00 2001 From: Hizenberg Date: Fri, 18 Apr 2025 08:28:51 +0530 Subject: [PATCH] update --- deletinglesson.txt | 19 +----- exercise/exercise_01 | 10 +-- vim-commands | 152 +++++++++++++++++++++++-------------------- 3 files changed, 90 insertions(+), 91 deletions(-) diff --git a/deletinglesson.txt b/deletinglesson.txt index ab47690..6f1b94f 100644 --- a/deletinglesson.txt +++ b/deletinglesson.txt @@ -1,26 +1,11 @@ You can use this file to practice editing. -First, fix this spelling mistake. -Fix these also. -Delete this text with the X command. -This this training training is is provided provided by LinuxTrainingAcademy.com. -This training is provided by LinuxTrainingAcademy.com. -Here is another line of text. -Guess what? Here is even more text! -Will you delete this line or not? We'll see... - -one two three four five six seven eight nine ten eleven twelve thirteen -two three four five six seven eight nine ten eleven twelve thirteen -three four five six seven eight nine ten eleven twelve thirteen four five six seven eight nine ten eleven twelve thirteen -one two three four five six seven eight nine ten eleven twelve thirteen -one two three four five six seven eight nine ten eleven twelve thirteen one two three four five six seven eight nine ten eleven twelve thirteen -one two three four five six seven eight nine ten eleven twelve thirteen -one two three four five six seven eight nine ten eleven twelve thirteen -one two three four five six seven eight nine ten eleven twelve thirteen + + one two three four five six seven eight nine ten eleven twelve thirteen one two three four five six seven eight nine ten eleven twelve thirteen diff --git a/exercise/exercise_01 b/exercise/exercise_01 index 513a6cf..0efe08d 100644 --- a/exercise/exercise_01 +++ b/exercise/exercise_01 @@ -1,5 +1,5 @@ -Hello there, - -I have started my day not much to do. Just want to learn about vim and be expert at it. I'm thinking of using it as text editor. - -Have a nice day. +Hello there, + +I have started my day not much to do. Just want to learn about vim and be expert at it. I'm thinking of using it as text editor. + +Have a nice day. diff --git a/vim-commands b/vim-commands index a449342..61c2d68 100644 --- a/vim-commands +++ b/vim-commands @@ -1,69 +1,83 @@ -Normal mode commands: - --> for navigating the file opened in vim: - - h: to go left. - l: to go right. - j: to go down. - k: to go up. - - ctrl + f: To do page down. Similar to page down button. - ctrl + b: To do page up. Similar to page up button. - z + : To bring the focus of vision to the centre - where the cursor is currently present. - w: To move the cursor by one word on the file. It include the - punctuation as a word.(move one word forward) - W: To move the cursor by one word on file. It don't include the - punctuation as a word.(move one word forward) - b: To move the cursor by one word on file. It include the - punctuation as a word.(move on word backward) - B: To move the cursor by one word on file. It include the - punctuation as a word.(move on word backward) - - 0: To move the first column of the current line the cursor - is present. - ^: To move the first letter of the first word of the current - line the cursor is present. - $: To move the last letter of the last word of the current - line the cursor is present. - gg: To move the first column of the first line of the file. - G: To move to the last line of the file. - gg or G: To move the particular - as mentioned. - ctrl + g: To know the current line we are on, the file name, - the percentage of we have covered according to - current cursor position. - - g + (ctrl+g): To get more detailed information of whatever - the previous was showing. - --> Deleting text from file in normal mode: - - x: To delete the right side byte of the current cursor position. - X: To delete the left side byte of the current cursor position. - - Using d to delete words with motion operation: - - {motion} - for ex: - dw (this delete the what the w command would move - the cursor by) - - dw: To delete a word in front of the current cursor position. - - dl: To delete next byte towards right from current cursor position on - current line. - dh: To delete next byte towards left from current cursor position on - current line. - dj: To delete whole current line and the line below. - dk: To delete whole current line and the line above. - d$: To delete from current position of cursor to the end of - the line. - - -Line mode: - --> for navigating using line mode: - - : : To go to the particular . - :$ : To move to the last line in the file. +Normal mode commands: + +-> for navigating the file opened in vim: + + h: to go left. + l: to go right. + j: to go down. + k: to go up. + + ctrl + f: To do page down. Similar to page down button. + ctrl + b: To do page up. Similar to page up button. + z + : To bring the focus of vision to the centre + where the cursor is currently present. + w: To move the cursor by one word on the file. It include the + punctuation as a word.(move one word forward) + W: To move the cursor by one word on file. It don't include the + punctuation as a word.(move one word forward) + b: To move the cursor by one word on file. It include the + punctuation as a word.(move on word backward) + B: To move the cursor by one word on file. It include the + punctuation as a word.(move on word backward) + + 0: To move the first column of the current line the cursor + is present. + ^: To move the first letter of the first word of the current + line the cursor is present. + $: To move the last letter of the last word of the current + line the cursor is present. + gg: To move the first column of the first line of the file. + G: To move to the last line of the file. + gg or G: To move the particular + as mentioned. + ctrl + g: To know the current line we are on, the file name, + the percentage of we have covered according to + current cursor position. + + g + (ctrl+g): To get more detailed information of whatever + the previous was showing. + +-> Deleting text from file in normal mode: + + x: To delete the right side byte of the current cursor position. + X: To delete the left side byte of the current cursor position. + + Using d to delete words with motion operation: + + {motion} + for ex: + dw (this delete the what the w command would move + the cursor by) + + dw: To delete a word in front of the current cursor position. + + dl: To delete next byte towards right from current cursor position on + current line. + dh: To delete next byte towards left from current cursor position on + current line. + dj: To delete whole current line and the line below. + dk: To delete whole current line and the line above. + d$: To delete from current position of cursor to the end of + the line. + d0: To delete from current position to the first letter of the + current line the cursor is present. + D: Equivalent of of what d$ + dd: To delete the current line entirely no matter where the cursor + is present currently on that same line. + + dd: To delete the 3 lines below from current line where + the cursor is present. + + + Note: is telling in short hand on how many + times the delete-command given should be executed. Same as the + command shown above (dd). + + dw: delete-word command to be executed numbers of times. + +Line mode: + +-> for navigating using line mode: + + : : To go to the particular . + :$ : To move to the last line in the file.