Ⅰ. 插件描述
PDF writerⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/fpdf-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/fpdf-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/fpdf-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/fpdf.vim
Ⅳ. 文档说明
fpdf.vim is a port of FPDF.
About FPDF:
FPDF is a PHP class which allows to generate PDF files with pure PHP.
See http://www.fpdf.org/
Requirement:
:set encoding=utf-8 and iconv() feature for non-ascii text.
xxd for image/font embedding.
xxd and gzip for compression.
Usage:
:set runtimepath+=/path/to/fpdf-vim
:let FPDF = fpdf#import()
:let pdf = FPDF.new()
:call pdf.AddPage()
:call pdf.SetFont('Arial','B',16)
:call pdf.Cell(40,10,'Hello World!')
:let pdfout = pdf.Output()
:put =pdfout
Reference:
See FPDF site.