If you are interested in the method for commenting out the entire code segment in Python programming in VIM, you can browse the following articles to see how Python programming is implemented in actual operations, the following is the main description of the article. I hope you can learn more from it.
For example, You Need To comment out the following three lines of Python code:
- Def say_hello ():
- Print 'Hello world! '
- Return None
1. Press Ctrl + V to enter the block Operation Mode of VIM.
2. Use the j and k keys to move up and down. To select these three rows, make sure that the first column of each row is included in the selected block.
3. Type I (capital I), that is, insert at the beginning of the row. Enter the Python annotator '#'.
4. Press ESC.
Then you will find that '#' is inserted in the first column of each row '#'.
- # Def say_hello ():
- # Print 'Hello world! '
- # Return None
- Mission completed.
-
This is how Python programming operates in VIM, which is fast and accurate.