Ⅰ. 插件描述
Refactoring tool for Coffeescript in vim!Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ranska/vim-coffeescript-refactoring'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ranska/vim-coffeescript-refactoring'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ranska/vim-coffeescript-refactoring'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ranska/vim-coffeescript-refactoring
Ⅳ. 文档说明
vim-coffeescript-refactoring
Refactoring tool for Coffeescript in vim!
same feeling has vim-ruby-refactoring
Thanks to AndrewRadev
You can help
new idea, bugs... please open issue.
You have some spec or exemple, please forkit and add them to the tests and make
a pull request :)
You know vimscript please take an issue i will merge tested pull request :)
Current work in progress
:CRAddParameter - Add Parameter
:CRExtractMethod - Extract Method Now you can install the plugin and try extract method.
this is a very early version.
To play with it add this to your .vimrc
nnoremap <leader>cem :call CRExtractMethod()<cr>For any problem please open an issue
Install
vim-coffeescript-refactoring follows the standard runtime path structure, so I highly recommend to use
a common and well known plugin manager to install vim-coffeescript-refactoring.
For Pathogen just clone the repo, for other plugin managers
add the appropriate lines and execute the plugin's install command.
git clone https://github.com/ranska/vim-coffeescript-refactoring.git ~/.vim/bundle/vim-coffeescript-refactoring
Plug 'ranska/vim-coffeescript-refactoring'
NeoBundle 'ranska/vim-coffeescript-refactoring'
Plugin 'ranska/vim-coffeescript-refactoring'
Manual
- Copy all of the files into your
~/.vimdirectory
- Copy all of the files into your
Test Road map
- test on travis
- improve practive in vimrunner
Vim ecosystem Road map
- vundle pathogen compatible
- augroup filetype_vim
- nnoramp default write on readme
Paterns Road map
:CRInlineTemp - Inline Temp
:CRConvertPostConditional - Convert Post Conditional
:CRExtractConstant - Extract Constant
:CRExtractLocalVariable - Extract Local Variable
:CRRenameLocalVariable - Rename Local Variable
:CRRenameInstanceVariable - Rename Instance Variable How to run tests
Use rspec
rspec spec/plugin/add_parameter_spec.rb 