Quizzes/Vimrc Configuration Best Practices Quiz
·
•••Report content
Vimrc Configuration Best Practices Quiz

Vimrc Configuration Best Practices Quiz

Test your knowledge of .vimrc configuration best practices with this quiz! See how many correct answers you can get out of 12.

0 plays 12 questions @Reuben
All 12 questions
  1. Why should you avoid using 'set nocompatible' in your vimrc?It triggers other options to be set/reset unintentionally. · It makes your config incompatible with gVim. · It disables all custom plugins. · It's an outdated command.
  2. Why should you prefer using full option names instead of short names in your vimrc?Full names are required for compatibility with newer versions of Vim. · Short names are no longer supported in Vim. · Full names are easier to understand and maintain. · Full names have better performance.
  3. What is the recommended way to manage auto-commands in your vimrc?Directly write them without any grouping. · Wrap them in proper augroups. · Run them as shell commands. · Put them at the beginning of the vimrc.
  4. Why is 'noremap' generally recommended over 'map' for setting key mappings?It allows key mappings to be recursive. · It ensures mappings do not unintentionally override each other. · It is faster to process. · Vim only supports 'noremap'.
  5. What should you consider before changing the 'tabstop' setting in your vimrc?Whether it increases coding speed. · Its impact on indentation in various file formats. · If it will enable syntax highlighting. · If it allows auto-completion.
  6. Where should you put your highlight commands in your vimrc?At the beginning of the file. · In a separate plugins file. · Within an autocmd. · At the end of the file.
  7. Why should you never put anything you don't understand in your vimrc?It might slow down Vim. · It could cause behavior you did not intend. · It will not be saved. · Vim does not allow unknown commands.
  8. What is a risk of using 'smartindent' in your vimrc?It is not recognized by newer versions of Vim. · It might conflict with other indentation methods. · It disables other auto-completion features. · It only works for C-based languages.
  9. Why should you put your vimrc under version control?To enable syntax highlighting. · To make it easier to share with others. · To recover from accidental changes or deletions. · To enable auto-completion of commands.
  10. What command should you avoid using to load external files in your vimrc?:runtime · :source · map · augroup
  11. What benefit does adding 'abort' to custom functions provide?Improves performance of the function. · Allows the function to stop upon encountering an error. · Enables syntax checking within the function. · Makes the function run in the background.
  12. What is a proper way to enable comments in your vimrc?Using the 'comment' command. · Starting the line with a '#'. · Starting the line with a double slash '//'. · Starting the line with a double quote '"'.

More quizzes

All quizzes
YOUR CREATION. YOUR CHOICE.

Made by you.
Seen by who?

Before you create, choose who gets to see it.

Generation visibility
18+ only

Show mature content?

Mature mode shows adults who turn it on tasteful 18+ creations.