Ⅰ. 插件描述
Sublime Text plugin that autocompletes filenamesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'boundincode/autofilename'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'boundincode/autofilename'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'boundincode/autofilename'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/boundincode/autofilename
Ⅳ. 文档说明
AutoFileName: Autocomplete Filenames in Sublime Text
Do you ever find yourself sifting through folders in the sidebar trying to remember what you named that file? Can't remember if it was a jpg or a png? Maybe you just wish you could type filenames faster. No more.
Whether your making a img tag in html, setting a background image in css, or linking a .js file to your html (or whatever else people use filename paths for these days...), you can now autocomplete the filename. Plus, it uses the built-in autocomplete, so no need to learn another pesky shortcut.
Usage
If you are looking to autocomplete an image path in an HTML <img> tag:
<img src="../|" />Pressing ctrl+space, will activate AutoFileName. I list of available files where be ready to select.
Looking for an even more automatic and seemless completion? Add the following to your User Settings file:
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": "/",
"selector": "string.quoted.double.html,string.quoted.single.html, source.css"
}
]
With this, there's no need to worry about pressing ctrl+space, autocompletion with appear upon pressing /.