vim-gdscript-ctags


Ⅰ. 插件描述

Ctags support for GDScript

Ⅱ. 基本信息

创建日期:  2016-10-15
使用用户:  1
Github星:  10
插件作者:  syskrank

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/syskrank/vim-gdscript-ctags

Ⅳ. 文档说明

#vim-gdscript-ctags

About

This tiny project is dedicated to adding more GDScript support into the VIM editor via using ctags.

Tagbar excuberant-ctags GDSCript demo

Currently supported tags:

  • constants
  • export variables
  • onready-constructions
  • signals
  • functions
  • preloads

Dependencies

It is highly recommended to use these settings with the following VIM plugins:

Tagbar:

https://github.com/majutsushi/tagbar

GDScript syntax support:

https://github.com/a-watson/vim-gdscript

Installation

( also see ctags-excerpt and vimrc-excerpt files )

Add the following to your ~/.ctags file:

--langdef=gdscript
--langmap=gdscript:.gd

--regex-gdscript=/^[ \t]*const[ \t]+([a-zA-Z0-9_]+)[ \t]*/\1/c,constant/i
--regex-gdscript=/^[ \t]*export[ \t]*(\([ \t]*[a-zA-Z0-9_, \"\*\.]*\)|[ \t])+var[ \t]+([a-zA-Z0-9_]+)[ \t]*/\2/e,export/i
--regex-gdscript=/^[ \t]*onready[ \t]+var[ \t]+([a-zA-Z0-9_]+)[ \t]*/\1/o,onready-variable/i
--regex-gdscript=/^[ \t]*signal[ \t]+([a-zA-Z0-9_]+)[ \t]*/\1/s,signal/i
--regex-gdscript=/^[ \t]*func[ \t]+([a-zA-Z0-9_]+)[ \t]*/\1/f,function/i
--regex-gdscript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]=[ \t]*preload*/\1/p,preload/i

Add the following to your ~/.vimrc file:

let g:tagbar_type_gdscript = {
            \'ctagstype' :'gdscript',
            \'kinds':[
            \'c:constants',
            \'e:exports',
            \'o:onready',
            \'p:preloads',
            \'s:signals',
            \'f:functions',
            \]
            \}

添加新评论