0% found this document useful (0 votes)
25 views3 pages

Gvim Assignment

Uploaded by

saurabhydv2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views3 pages

Gvim Assignment

Uploaded by

saurabhydv2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

GVIM Assignment

Part A: Basic Operations


1. Install GVIM
2. What is GVim? How is it different from Vim, Microsoft word, Notepad?
3. How do you open a file in GVim from the terminal and from within GVim itself?
4. Explain the difference between normal, insert, and visual modes in GVim.
5. What is the command to:
a. Save a file?
b. Quit GVim?
c. Save and quit at the same time?
6. Describe how to copy, cut, and paste text in GVim.
7. How can you perform undo and redo operations?
8. How do you search for a word in GVim? How do you go to the next and previous
occurrences?
Part B: Intermediate Usage
9. Write the steps to create a simple HTML file using GVim and save it with syntax
highlighting.
10. How do you enable line numbers in GVim?
11. Explain how to use GVim’s split window feature. How do you open two files side-by-
side?
12. Describe the use of the .vimrc file in customizing GVim behavior.
13. How do you record and run a macro in GVim? Give an example.
14. What is auto-indentation and how do you enable it in GVim?
15. How can you comment out multiple lines of code in GVim?
Part C: Practical Exercises
16. Open a new file in GVim and write a Python function to calculate the factorial of a
number. Save and close the file.
17. Use GVim to replace all instances of the word "color" with "colour" in a file.
18. Configure GVim to show matching brackets when the cursor is on a bracket.
19. Create a custom keyboard mapping in GVim to insert your email address using a
shortcut key.
20. Write a GVim command to sort a list of words in a file alphabetically.
21. Use GVim to count the number of lines, words, and characters in a file.
Part D: Basic Commands
22. Enter insert mode before the cursor.
23. Enter insert mode at the beginning of the line.
24. Enter insert mode after the cursor.
25. Enter insert mode at the end of the line.
26. Open a new line below the current line.
27. Open a new line above the current line.
28. Copy (yank) the current line.
29. Delete the current line.
30. Delete from the cursor position to the end of the line.
31. Delete the character under the cursor.
32. Paste the content after the cursor.
33. Paste the content before the cursor.
34. Undo the last change.
35. Redo the last undone change.
36. Quit Vim (close current file).
37. Quit Vim without saving changes.
38. Save and quit.
39. Open a new file.
40. Switch to the next buffer.
41. Switch to the previous buffer.
42. Close the current buffer.
43. Open a file in a vertical split.
44. Open a file in a horizontal split.
45. Move between split windows.
46. Move to the beginning of the file.
47. Move to the end of the file.
48. Show line numbers.
49. Hide line numbers.
50. Highlight search results.
51. Turn off search result highlighting.
52. Search forward for the specified pattern.
53. Search backward for the specified pattern.
54. Move to the next search result.
55. Move to the previous search result.
56. Replace all occurrences of a pattern.
57. Replace with confirmation.
58. Search for the word under the cursor.
59. Disable line wrapping.

You might also like