viPlugin



User Manual v1.5

Copyright © by Michael Bartl, last updated 07.01.2005



Table of contents

Description
Installation
Activation
Configuration
Commands with Description
All Commands
Credits

Description

viPlugin is a plugin for the Eclipse Platform that adds vi(m) functionality to all editors that are implementations of the ITextEditor interface of Eclipse like the JDT, CDT and many more.
Support is currently given for Eclipse 2.1.3 and Eclipse 3.0 and WSAD based on Eclipse 2.1.

Go to Table of contents

Installation

There are two versions of the viPlugin:

viPlugin_1.x.y_E21.zip for Eclipse 2.1.3 and WSAD 5.x based on Eclipse 2.1
viPlugin_1.x.y_E30.zip for Eclipse 3.0

Unzip the correct file depending on your Eclipse version into the eclipse folder.

Go to Table of contents

Activation

For Eclipse 3.0:
For Eclipse 2.1 or WSAD 5.x: To get some of the vim CTRL-? shortcuts you have to activate the ViKeyConfiguration with
Note: As long as the plugin is loaded all TextEditors are using the viLayer. By clicking the icon again the viPlugin is unloaded.

Go to Table of contents

Configuration


The viPlugin can be configured with the viPlugin_rc.xml file which has to be placed in the same directory as the viPlugin.license file.

Following is a sample xml file to show how configuration can be done:

<?xml version="1.0"?>
<xml>
    <shiftwidth>4</shiftwidth>
    <vimcursor>true</vimcursor>
    <ignorecase>true</ignorecase>
    <expandtab>true</expandtab>
    <hlsearch>true</hlsearch>
    <incsearch>true</incsearch>
    <undolevels>1000</undolevels>
    <wordseparators>.,(,), ,TAB,ENTER,:,;,?,+,=,ANGLE_BRACKET_RIGHT,ANGLE_BRACKET_LEFT,*,{,},",|,COMMA,-,\,/,@,[,],},~,!,#,$,%,^,',`,´,AND</wordseparators>
</xml>
Additionaly the viPlugin implements the following commands (Eclipse Actions) that can be assigned Keybinding via the standard Preferences->Workbench->Keys dialog (select KeyConfiguration ViPluginKeyConfiguration and Category ViPlugin):

Go to Table of contents

Commands with Description

Following is a short description of implemented commands. For more information have a look at the vim documentation at http://www.vim.org.

Command
Description
ESC in insertMode: switch to command mode
in CommandMode: delete CommandBuffer
i,a,I,A
switch to insert mode
s delete current character and switch to Insert Mode
o
add a new line after the current line and switch to insert mode
O add a new line before the current line and switch to insert mode
$ move to the end of the line
0 move the the beginning of the line
yy yank (copy) current line
y yank (copy) selected text to default buffer (clipboard)
"ay
yank (copy) selected text to buffer a
p paste text in default buffer
"ap
paste text in buffer a
dd Delete current line
dk, d(Up Arrow)
delete current line and the line above
dj, d(Down Arrow) delete current line and the line below
dw Delete word
d$ Delete to the end of the line
d0 Delete to the beginning of the line
cc,S Delete current line and switch to insert mode
cw Delete to the end of the word and switch to insert mode
c$ Delete to the end of the line and switch to insert mode
c0 Delete to the beginning of the line and switch to insert mode
gg Go to the first line
G
Go to the last line
<n>G Go to the <n>-th line
/xxx search for xxx
* search for word under cursor
# search for word under cursor backwards
n search again with the last search string
N search backwards with the last search string
x delete current character
:w Save file
:wq Save file and close editor
:q Close editor without saving
:<nr> go to line number <nr>
hjkl movement keys
w move one word forward
b move one word backward
. repeat last command
:u
Undo last change
u
Undo last change
CTRL-R, Z Redo last undo
<<
Shift line left
>>
Shift line right

Go to Table of contents

All implemented commands without description

ESC, R, r, J, h, j, k, l, i, I, a, A, o, O, s, S, x, X, dd, D, yy, Y, cc, C, guu, gUU, p, P, u, U, n, N, ta, Ta, fa, Fa, ";", ",", w, b, E, v, V, ZZ, ZQ, zz, z-Enter, %, *, #, (dot-command), ma, 'a, "ay, "ap, /abc, ?abc, gg, G, H, M, L, _, +, -, {, }, ENTER, DEL, BACKSPACE, /(Up-Arrow), /(Down-Arrow), ?(Up-Arrow), ?(Down-Arrow), /ENTER, ?ENTER, W, B, ==, '' (2 single ticks), <<, >>

d, y, c, gu and gU with the following modifiers w,e,E,$,0, $, ^, h, j, k, l, {, }, W, B, gg, G, /xxx, ?xxx, tx, Tx, fx, Fx, (Up-Arrow), (Down-Arrow), (Left-Arrow), (Right-Arrow), 'a, %, SPACE

< and > with the following modifiers 'a, %, j, k, h, l

CTRL-R, CTRL-F, CTRL-B, CTRL-Y, CTRL-D, CTRL-E, CTRL-U, CTRL-T

:w, :wa, :q, :wq, :q!, :100, :u, :(Up-Arrow), :(Down-Arrow), :x, :[%]s/search/replace/[g], :s, :%s, :n, :p, :e!

:set, :set ignorecase, :set ic, :set noignorecase, :set noic, :set vimcursor, :set vc, :set novimcursor, :set novc, :set shiftwidth=3, :set sw=3, :set expandtab, :set et, :set noexpandtab, :set noet, :set hlsearch, :set nohlsearch, :set hl, :set nohl, :set incsearch, :set noincsearch, :set ic, :noic

vim imcompatibe commands:

q = page-down, Q = page-up

Go to Table of contents

Credits

This product includes software developed by the
Apache Software Foundation (
http://www.apache.org/)

Specifically this means the products: Jakarta-Commons and Jakarta-Regexp

For more information have a look at the file LICENSE_Apache.txt in the doc folder.

Go to Table of contents