filetype-magic.vim


Ⅰ. 插件描述

my (hacky) filetype magic in vim

Ⅱ. 基本信息

创建日期:  2013-12-09
使用用户:  1
Github星:  1
插件作者:  Marcel Beumer

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'marcelbeumer/filetype-magic-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'marcelbeumer/filetype-magic-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'marcelbeumer/filetype-magic-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/marcelbeumer/filetype-magic.vim

Ⅳ. 文档说明

filetype-magic.vim

My (hacky) filetype magic in vim. Makes builtin gf smarter and adds parsing source lines before feeding it to gf. Hardcoded to serve my specific project needs, dumped in a plugin not to clutter my vimrc.

  • Install the plugin using vundle Bundle 'marcelbeumer/filetype-magic.vim' (or use anything else).
  • Map something like map <leader>g :call EditIncludeOnLine()<CR>

Examples

Doing <leader>g on

<div class="homepage__wrap__signupBox">

Will jump to homepage.less

Doing <leader>g on

use Symfony\Component\HttpKernel\Exception\HttpException;

Will jump to Symfony/Component/HttpKernel/Exception/HttpException.php

Doing <leader>g on

{% extends 'InterNationsLayoutBundle:Responsive:layout.html.twig' %}

Will jump to LayoutBundle/Resources/views/Responsive/layout.html.twig

添加新评论