Changes between Version 11 and Version 12 of VimInterface
- Timestamp:
- Mar 4, 2014, 4:58:39 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
VimInterface
v11 v12 1 The command interface provides the use of ReactorErl in VIM.2 3 1 In VIM, a VIM plugin has to be made to create a user 4 interface which contains the menus of RefactorErl as well as2 interface which contains the menus of !RefactorErl as well as 5 3 those commands with the help of which the refactorings can be run 6 4 and the files loaded in the system can be handled. … … 10 8 === Installation === 11 9 12 To install the plugin, you can copy it to the vim ftplugin 13 directory. For global installation, the plugin directory is 14 usually located in {{{/usr/share/vim/vimVersion/ftplugin}}}, for local install 15 copy the plugin to {{{HOME/.vim/ftplugin}}} 16 directory. 10 To install the plugin, you can copy it to the vim ftplugin directory. The plugin is located in {{{REFACTORERL/lib/referl_ui/vim/ftplugin}}} directory and consists of 2 files: referl.py and referl.vim. For the plugin you also need 11 python 2. You can download it from http://www.python.org. 12 For global installation, the ftplugin directory is usually located in 13 {{{/usr/share/vim/vimVersion/ftplugin}}}, for local install copy the plugin to 14 {{{HOME/.vim/ftplugin}}} directory. 17 15 18 Then you should modify the {{{refpath}}} variable in thescript to19 the installation directory of RefactorErl. You should also set the other16 Next, you should modify the {{{refpath}}} variable in the referl.vim script to 17 the installation directory of !RefactorErl. You should also set the other 20 18 variables shown in the table. 21 19 22 20 || Variable name || Value || 23 || {{{refpath}}} || path to RefactorErl||24 || {{{ref_base_path}}} || path to the tool||21 || {{{refpath}}} || you must enter the full path to the !RefactorErl executable under the directory of the tool (under {{{bin}}} directory). || 22 || {{{ref_base_path}}} || you must enter the full path to the root directory of the tool. || 25 23 || {{{ref_undo_mode}}} || selective_undo or one_step || 26 || {{{ref_datadir}}} || path to directory of data ||24 || {{{ref_datadir}}} || path to directory of data used by !RefactorErl || 27 25 || {{{ref_name_type}}} || sname or name || 28 26 || {{{ref_server_name}}} || name of the server node || 29 || {{{ref_db_type}}} || the type of db backend||27 || {{{ref_db_type}}} || here you can choose the database type !RefactorErl uses. || 30 28 31 29 32 To install the plugin, you can copy it to the vim ftplugin directory. The 33 plugin contains 2 files: referl.py and referl.vim. For the plugin you also need 34 python 2. You can download it from http://www.python.org. 35 The For global installation, the ftplugin directory is usually located in 36 {{{/usr/share/vim/vimVersion/plugin}}}, for local install copy the plugin to 37 {{{HOME/.vim/plugin}}} directory. If you want to use the plugin only as filetype plugin then you should copy the files instead of plugin under ftplugin, and also add these lines to your .vimrc: 30 If you want to use the plugin only as filetype plugin then you should copy the files instead of plugin under ftplugin, and also add the following lines to your .vimrc. (The .vimrc is located under {{{HOME}}}.) 38 31 39 32 {{{ … … 41 34 au BufNewFile,BufRead *.erl source path/to/referl.vim 42 35 }}} 43 44 The .vimrc is located under {{{HOME}}}.45 46 Then you should set the variables in the referl.vim script:47 48 * {{{refpath}}}: you must enter the full path to the RefactorErl executable under the directory of the tool (under {{{bin}}} directory).49 50 * {{{ref_base_path}}}: you must enter the full path to the root directory of the tool.51 52 * {{{ref_datadir}}}: you can change the location of the database here.53 54 * {{{ref_name_type}}}: you can choose sname or name.55 56 * {{{re_server_name}}}: this variable has to match with the !RefactorErl server.57 58 * {{{ref_db_type}}}: here you can choose the database type !RefactorErl uses.59 60 36 61 37 … … 77 53 78 54 VIM can be used both in command line and in graphical environment. The 79 VIM plugin of RefactorErl supports both of them. In the graphical55 VIM plugin of !RefactorErl supports both of them. In the graphical 80 56 front-end every command can be reached from the 81 RefactorErl menu. The features are grouped to be easily found. These57 !RefactorErl menu. The features are grouped to be easily found. These 82 58 groups and the most important tasks can be found in the following, and the second column of the table shows the 83 59 corresponding command to be used in non-graphical mode. … … 99 75 ==== Server submenu ==== 100 76 The server can be started and stopped by the menus and commands shown 101 in the following table. If the RefactorErl cannot be started77 in the following table. If the !RefactorErl cannot be started 102 78 an error message is shown in command buffer. 103 79