comparison runtime/doc/repeat.txt @ 8376:e448f2a5d45b v7.4.1480

commit https://github.com/vim/vim/commit/91715873d19a1859c08eeded7848113596e2f2bd Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 3 17:13:03 2016 +0100 patch 7.4.1480 Problem: Cannot add a pack direcory without loading a plugin. Solution: Add the :packadd command.
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Mar 2016 17:15:05 +0100
parents 88207f4b861a
children f5972de59001
comparison
equal deleted inserted replaced
8375:3d5a49fe23bf 8376:e448f2a5d45b
411 411
412 A Vim package is a directory that contains one or more plugins. The 412 A Vim package is a directory that contains one or more plugins. The
413 advantages over normal plugins: 413 advantages over normal plugins:
414 - A package can be downloaded as an archive and unpacked in its own directory. 414 - A package can be downloaded as an archive and unpacked in its own directory.
415 That makes it easy to updated and/or remove. 415 That makes it easy to updated and/or remove.
416 - A package can be a git, mercurial, etc. respository. That makes it really 416 - A package can be a git, mercurial, etc. repository. That makes it really
417 easy to update. 417 easy to update.
418 - A package can contain multiple plugins that depend on each other. 418 - A package can contain multiple plugins that depend on each other.
419 - A package can contain plugins that are automatically loaded on startup and 419 - A package can contain plugins that are automatically loaded on startup and
420 ones that are only loaded when needed with `:loadplugin`. 420 ones that are only loaded when needed with `:loadplugin`.
421 421
440 In the example Vim will find "my/ever/always/plugin/always.vim" and adds 440 In the example Vim will find "my/ever/always/plugin/always.vim" and adds
441 "~/.vim/pack/my/ever/always" to 'runtimepath'. 441 "~/.vim/pack/my/ever/always" to 'runtimepath'.
442 442
443 If the "always" plugin kicks in and sets the 'filetype' to "always", Vim will 443 If the "always" plugin kicks in and sets the 'filetype' to "always", Vim will
444 find the syntax/always.vim file, because its directory is in 'runtimepath'. 444 find the syntax/always.vim file, because its directory is in 'runtimepath'.
445
446 Vim will also load ftdetect files, like with |:loadplugin|.
445 447
446 *load-plugin* 448 *load-plugin*
447 To load an optional plugin from a pack use the `:loadplugin` command: > 449 To load an optional plugin from a pack use the `:loadplugin` command: >
448 :loadplugin mydebug 450 :loadplugin mydebug
449 This could be done inside always.vim, if some conditions are met. 451 This could be done inside always.vim, if some conditions are met.