Saturday, March 16, 2013

The Path of a Master VimLer


An apprentice approached a Master and said,
“Show me your best Vim.”
to which the Master responded,
“Everything in my Vim is best.
You cannot find here any piece of Vim that is not the best.”
At these words, the apprentice became enlightened.

What might the path to VimL mastery look like?
Here's what Raimondi & I think at the moment:

Trainee → Novice → Worker → Professional → Expert
  1. Trainee
    • Read the following parts of :help cmdline.txt
      • 3. Ex command-lines :help cmdline-lines
      • 4. Ex command-line ranges :help cmdline-ranges
      • 6. Ex special characters :help cmdline-special
    • Read the following parts of :help options.txt
      • 1. Setting options :help set-option
      • The following specific options:
        • :help 'debug'
        • :help 'eventignore'
        • :help 'ignorecase'
        • :help 'magic'
        • :help 'maxfuncdepth'
        • :help 'runtimepath'
        • :help 'verbose'
    • Read all of :help pattern.txt
    • Read the following parts of :help eval.txt
      • 1. Variables :help variables
      • 2. Expression syntax (skim) :help expression-syntax
      • 3. Internal variable :help internal-variables
      • 5. Defining functions :help user-functions
      • 7. Commands :help expression-commands
      • 9. Examples :help eval-examples
    • Read sections 41.1 - 41.8 in :help usr_41.txt
    • Read :help function-list (Vim’s built-in VimL library)
    • Read http://www.ibm.com/developerworks/linux/library/l-vim-script-1/index.html
    • Read http://learnvimscriptthehardway.stevelosh.com/
    • Pass the Trainee assessments
  2. Novice
    • Contribute bug fixes and small enhancements to existing plugins.
    • Read :help map.txt
      • Read :help 'timeout' option
      • Read :help 'maxmapdepth' option
    • Read :help usr_40.txt
    • Read :help autocmd.txt
    • Read :help filetype.txt
    • Read :help various.txt
      • In regard to :normal, read :help motion.txt
    • Pass the Novice assessments
  3. Worker
    • Read :help eval.txt
    • Read :help usr_41.txt
    • Create three or more plugins under the supervision of a Professional or Expert
    • Assist Novices
  4. Professional
    • Actively support five or more peer-reviewed, fully usr_41 compliant plugins
    • Thoroughly document all supported plugins
    • Supervise Workers
    • Assist in the development of reference & resource materials
    • Participate in discussions about best practice for VimL development
  5. Expert
    • Create new tools and libraries for VimL development
    • Create new/interesting/engaging/fun reference material or tutorials for an aspect of Vim/VimL
    • Mentor, guide and train other VimLers
    • Maintain a regular presence on Stack Overflow, the vim-dev mailing lists, #vim or #viml as an authority and guide on advanced Vim and VimL topics

A Plan for Assessing VimL Skills

A central registry of available assessments:
A master github repo called https://github.com/dahu/VimLAssessments.git that contains a list of VimLAss_<level_name>_<assessment_number> github repos in the various skill levels that act as assessments.
E.g.:
  1. Trainee:

  1. Novice:
    • VimLAss_Novice_010 — usr_41 compliance: use <Plug> maps

Creating New VimLAss Assessment Repositories

To create a new VimLAss assessment piece, just copy the VimLAss_Skeleton repository which has the following layout:
  • README.md — an overview of the assessment and a detailed set of tasks to be completed
  • test/<task>.vim — one or more test files per task as listed in the README.md
  • plugin directories with files as necessary. e.g.:
    • autoload/
    • doc/
    • colors/
    • compiler/
    • ftdetect/
    • ftplugin/
    • indent/
    • plugin/
    • syntax/
All VimLAss repositories are to use the https://github.com/vim-scripts/runVimTests.git unit testing framework. The repositories should contain tests for expected behaviour that initially fail. Corresponding tasks in the READEME.md file detail the necessary fixes and enhancements that the vimmler is supposed to implement to get the tests to pass. Successful completion of the assessment begins with having all tests pass. The vimmler should then apply to a Professional/Expert vimmler to have his work reviewed, gain feedback and get his assessment signed off. Actual signoff could involve digital signatures, if that path was ever deemed necessary, which is unlikely.

Even though I have provided some links to various pieces mentioned above, all of this is still very much in thought space at the moment.

I am sure we haven’t covered all bases yet. Do you have anything to contribute?