drupal-hook-generator.vim


Ⅰ. 插件描述

Drupal Hook Generator for Vim

Ⅱ. 基本信息

创建日期:  2016-09-13
使用用户:  1
Github星:  2
插件作者:  Jackson Cooper

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'jacks0n/drupal-hook-generator-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'jacks0n/drupal-hook-generator-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'jacks0n/drupal-hook-generator-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/jacks0n/drupal-hook-generator.vim

Ⅳ. 文档说明

# Drupal Hook Generator for Vim

This Vim plugin provides a GenerateDrupalHook command, which generates a Drupal hook function based on tags, with optional support for fzf.vim.

Installation

Using vim-plug:

Plug 'jacks0n/Drupal-Hook-Generator.vim', { 'for': 'php' }
  • Ensure ctags is installed and all hook tags have been generated (see :echo taglist('^hook_') for all hook tags defined).
  • Follow the fzf.vim installation steps for FZF support (optional).
  • Make sure to use Vim 7.4 or above.

Usage

Generate ctags from the root of the code. Example:

ctags --langmap=php:.engine.inc.module.theme.install.php --php-kinds=cdfi --languages=php --recurse --fields=+aimlS
" Call the hook generator command directly.
:GenerateDrupalHook

" Mapping.
nmap <Leader>dh :GenerateDrupalHook<CR>

Screencasts

With fzf.vim enabled

With fzf.vim disabled/uninstalled

License

Copyright (c) Jackson Cooper. Distributed under the MIT license.

添加新评论