Changes between Initial Version and Version 1 of VimInterface


Ignore:
Timestamp:
Apr 17, 2012, 3:55:18 PM (13 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VimInterface

    v1 v1  
     1The command interface provides the use of ReactorErl in VIM.  
     2 
     3In VIM, a VIM plugin has to be made to create a user 
     4interface which contains the menus of RefactorErl as well as 
     5those commands with the help of which the refactorings can be run 
     6and the files loaded in the system can be handled. 
     7 
     8=== Installation === 
     9 
     10To install the plugin, you can copy it to the vim plugin 
     11directory. For global installation, the plugin directory is 
     12usually located in {{{/usr/share/vim/vimVersion/plugin}}}, for local install 
     13copy the plugin to {{{HOME/.vim/plugin}}} 
     14directory. 
     15 
     16Then you should modify the {{{refpath}}} variable in the script to 
     17the installation directory of RefactorErl. 
     18 
     19Since VIM interface is based on CLI it should be properly 
     20configured. For proper configuration of CLI, see the corresponding 
     21section. 
     22 
     23Since the VIM interface does not cover all features of the tool, it is 
     24a good idea to use another interface, e.g. the Erlang shell interface 
     25({{{ri}}}).  
     26 
     27=== Menu and command structure === 
     28 
     29VIM can be used both in command line and in graphical environment. The 
     30VIM plugin of RefactorErl supports both of them. In the graphical 
     31front-end (Fig. \ref{vim-fig}) every command can be reached from the 
     32RefactorErl menu. The features are grouped to be easily found. These 
     33groups and the most important tasks can be found in the following, and the second column of the table shows the 
     34corresponding command to be used in non-graphical mode. 
     35|| Menu item || Command || 
     36|| Server || --- || 
     37|| Files || --- || 
     38|| Undo (One step only) || {{{Refundo}}} || 
     39|| Semantic query || {{{Refsq}}} || 
     40|| Function || --- || 
     41|| Introduce/Eliminate || --- || 
     42|| Move to another module || --- || 
     43|| Renaming || --- || 
     44|| Upgrade || --- || 
     45|| Help || {{{Refh}}} || 
     46 
     47==== Server submenu ==== 
     48The server can be started and stopped by the menus and commands shown 
     49in Table \ref{vim-server-groups}. If the RefactorErl cannot be started 
     50an error message is shown in command buffer. 
     51 
     52 
     53|| Menu item || Command|| 
     54|| Server || --- || 
     55|| -> Start || {{{RefSta}}} || 
     56|| -> Stop || {{{RefSto}}} || 
     57 
     58 
     59==== Files submenu ==== 
     60Features dealing with files can be found in Table 
     61\ref{vim-files-groups}. \emph{Draw graph} makes a graphical 
     62representation of the database by creating a \emph{dot} file. 
     63 
     64|| Menu item || Command|| 
     65|| Files || --- || 
     66|| -> Add file|| {{{Refa}}} || 
     67|| -> Drop file|| {{{Refd}}} || 
     68|| -> Show database || {{{Refls}}} || 
     69|| -> Draw Graph || {{{Refgraph}}} || 
     70 
     71==== Function submenu ==== 
     72This submenu contains only the \emph{Reorder function parameter} 
     73refactoring, this menu group has been created for future use. Menu 
     74item and the command can be found in Table \ref{vim-func-groups}. 
     75 
     76|| Menu item || Command||  
     77|| Function || --- || 
     78||  -> Reorder function parameter || {{{Refof}}} || 
     79 
     80==== Introduce/Eliminate submenu ==== 
     81In this submenu (shown in Table \ref{vim-elim-groups}.) the 
     82refactorings concerning introduction and elimination of certain 
     83language constructs can be found. 
     84 
     85|| Menu item || Command|| 
     86|| Introduce/Eliminate || --- || 
     87|| -> Eliminate function call || {{{Refef}}} || 
     88|| -> Eliminate macro substitution || {{{Refem}}} || 
     89|| -> Eliminate variable || {{{Refev}}} || 
     90|| -> Eliminate fun expression || {{{Refeu}}} ||  
     91|| -> Introduce function || {{{Refif}}} || 
     92|| -> Introduce import || {{{Refii}}} || 
     93|| -> Introduce record || {{{Refir}}} || 
     94|| -> Introduce variable || {{{Refiv}}} || 
     95|| -> Introduce process || {{{Reffp}}} || 
     96|| -> Introduce function argument || {{{Refia}}} || 
     97|| -> Introduce tuple || {{{Reftf}}} || 
     98|| -> Transform list comprehension || {{{Reftl}}} || 
     99 
     100==== Move to another module submenu ==== 
     101In this menu item the refactorings concerning moving can be 
     102found. These are shown in Table \ref{vim-move-groups}. The modules 
     103changed by the refactoring are not opened. 
     104 
     105 
     106|| Menu item || Command|| 
     107|| Move to another module || --- || 
     108|| -> Move function || {{{Refmf}}} || 
     109|| -> Move macro || {{{Refmm}}} || 
     110|| -> Move record || {{{Refmr}}} || 
     111 
     112==== Upgrade submenu ==== 
     113The upgrade regexp refactoring can be found in the Upgrade submenu 
     114(shown in Table \ref{vim-upgrade-groups}). This menu has been created 
     115for future use, too. 
     116 
     117 
     118|| Menu item || Command|| 
     119|| Upgrade || --- || 
     120|| -> Upgrade regexp interface || {{{Refuir}}} || 
     121 
     122 
     123==== Renaming submenu ==== 
     124The universal renamer and the type specific renamer refactorings are 
     125shown in Table \ref{vim-ren-groups}. 
     126 
     127 
     128|| Menu item || Command|| 
     129|| Renaming || --- || 
     130|| -> Universal renamer || {{{Refr}}} || 
     131|| -> Rename function || {{{Refrf}}} || 
     132|| -> Rename header || {{{Refrh}}} || 
     133|| -> Rename macro || {{{Refrc}}} || 
     134|| -> Rename module || {{{Refrm}}} || 
     135|| -> Rename record || {{{Refrrd}}} || 
     136|| -> Rename record field || {{{Refrrf}}} || 
     137|| -> Rename variable || {{{Refrv}}} || 
     138 
     139=== Position based refactorings === 
     140Refactorings need either a single position or a range as a subject. In 
     141VIM, a range can be selected only in {{{Visual mode}}}, but you 
     142cannot execute a single statement while {{{Visual mode}}} is 
     143active, so you have to save the boundaries of the selection by 
     144pressing F2. Then you can run the range based refactorings. Position 
     145based refactorings are not affected by any saved ranges, they 
     146determine the actual cursor position every time a refactoring is 
     147started. 
     148 
     149=== Interaction === 
     150If any of the given argument is missing or incorrect the interface 
     151provides user interaction to collect required data. To cancel an 
     152ongoing interaction you should use a blank answer. 
     153 
     154=== Semantic queries === 
     155Semantic queries are fully supported in VIM interface (shown in 
     156Table \ref{vim-main-groups}). VIM does not support links to different 
     157sources, but the path and the location are listed after all entity in 
     158the result. This filepath can be copied and pasted after an open 
     159command ({{{:e +line filepath }}}).  
     160