Giter VIP home page Giter VIP logo

vrapper's Introduction

vrapper

Vim-like editing in Eclipse Join the chat at https://gitter.im/vrapper/vrapper

Vrapper is an Eclipse plugin which acts as a wrapper for Eclipse text editors to provide a Vim-like input scheme for moving around and editing text.

Stable Update Site: http://vrapper.sourceforge.net/update-site/stable

Unstable Update Site: http://vrapper.sourceforge.net/update-site/unstable

License: GPL v3 or any later version

Home Page: http://vrapper.sourceforge.net/home/

Documentation: http://vrapper.sourceforge.net/documentation/

Developer Wiki: https://github.com/vrapper/vrapper/wiki

vrapper's People

Contributors

albertdev avatar andreybratukhin avatar bdetweiler avatar borisbrodski avatar dhleong avatar eliericha avatar espressosaurus avatar frankbenoit avatar goj avatar igrekster avatar j-fields avatar justinj avatar keforbes avatar kevinbisanz avatar kforbes-arkin avatar loonies avatar misfo avatar modosist avatar nahuel-soldevilla avatar psporysz avatar pubudug avatar rdawe avatar rdvdijk avatar richq avatar sagara- avatar t20 avatar wawe avatar weissi avatar wrigleyster avatar ychatz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vrapper's Issues

'R' does not modify 'last insert' register

  1. Perform some operation which modifies the 'last insert' register (e.g, 'yy')
  2. Use the 'R' command to overwrite some characters
  3. Hit '.'

The operation from step 1 will be repeated rather than the operation from 'R'.

Note that if you don't perform step 1 first and you start with step 2 you get some weird behavior which I'm just going to ignore and hope fixing the main issue will resolve that issue too.

Ctrl+W does not delete word before cursor

It would be nice if C-W in insert mode erased the word before the cursor, as it does in vim. Currently it doesn't seem to do anything. (I changed the "close tab" binding in Eclipse so that it does NOT conflict.)

vrapperrc on Windows

I am using Vrapper on Windows, and I can't create a ".vrapperrc" file in my home directory as a file can't start with a dot on Windows.

That being said, I have tried some other format for the config file name :
"_vrapperrc" (since vim use a _vimrc on windows)
"vrapperc" ( without dot)

Both don't work.

So basically, either I am doing something wrong, and it is not explained clearly in the documentation what you are supposed to do on Windows, or there is a bug on WIndows where you can't use a config file.

Thanks in advance,

Different behavior for 'Ctrl-Z' and 'u' undo

I understand that VIM have 'atomicinsert' on by default. However vrapper users could come from different background, some of us are not 'pure' vim users. (I think the beauty of vapper is that it allows a mixing of input styles that everyone see fits)

I hope that by default, 'Ctrl-z' could be the 'eclipse style' undo, where if you type some thing and paste a wrong line, you can just undo the paste.

While 'u' remains to be the standard 'VIM style' undo, where you undo everything since the last mode change.

Then we can have the best of both world.

Sed Functionality

Sed expressions for search & replace (:[%]s...) are one of my favorite features in Vim. Consider this an official feature request. Any idea how much work is involved in it?

^w and ^p bindings would be nice

It would be nice if ^w were bound to delete the previous word.

Also, ^p and ^n could be bound to complete word (bound to alt+/ by default). It would be even nicer if the behaviour were search back vs. search forward as in vim, but doing the same thing as alt+/ would be ok too.

Sporadic "Argument cannot be null" errors

I'm sporadically experiencing "Argument cannot be null" error messages with Vrapper 0.19.20120323. The errors happen when I open a new editor with Vrapper disabled.

The log file has stack traces like these:

!ENTRY org.eclipse.ui.workbench 4 2 2012-03-25 13:03:09.129
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
    at org.eclipse.swt.SWT.error(SWT.java:4263)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Text.setText(Text.java:1967)
    at net.sourceforge.vrapper.eclipse.ui.ModeContributionItem.fill(ModeContributionItem.java:48)
    at org.eclipse.jface.action.SubContributionItem.fill(SubContributionItem.java:59)
    at org.eclipse.jface.action.StatusLineManager.update(StatusLineManager.java:326)
    at org.eclipse.jface.action.SubStatusLineManager.update(SubStatusLineManager.java:152)
    at net.sourceforge.vrapper.eclipse.ui.ModeContributionItem.setText(ModeContributionItem.java:55)
    at net.sourceforge.vrapper.eclipse.platform.EclipseUserInterfaceService$PartChangeListener.partActivated(EclipseUserInterfaceService.java:66)
    at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
    ...
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

!ENTRY org.eclipse.jface 4 2 2012-03-25 13:03:11.086
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
    at org.eclipse.swt.SWT.error(SWT.java:4263)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Text.setText(Text.java:1967)
    at net.sourceforge.vrapper.eclipse.ui.ModeContributionItem.fill(ModeContributionItem.java:48)
    at org.eclipse.jface.action.SubContributionItem.fill(SubContributionItem.java:59)
    ...
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

yank last line error

When yanking (yy) the last line in an editor, the wrong text is yanked, with the preceeding newline char, and the cursor ends up in the line above.

Actually, whenever you yank a line, the cursor position always jumps to the start of the line, except for the case above, whereas in Vim the cursor stays.

Add support for counts in v/{search}

We recently added support for using a search result as the motion of an operation. This works for v/, y/, d/, and c/. You can also use counts: y3/{search}, d3/{search}, and c3/{search}. However, v3/{search} doesn't work. We need to add support for counts in visual mode to be consistent with the other operations.

text selection in normal mode

When in normal mode, I can use Ctrl-Shift + arrow keys to select text as per normal editor function. However, I can't use Shift + arrows to select text. In insert and visual mode I can do both.

<End> in visual mode does not select text

In normal mode:

  1. press v (should activate visual mode)
  2. press <End> (should go at the end of the line)

Expected: text selected from initial position to the end of the line.
Currently: selection begins at the end of the line.

<C>-f and <C>-b should not be remembered as "last command" for .

The CTRL keys for movement (CTRL-F/B/U/D) get remembered as the last command. So, say you make an edit with Iabc<esc> CTRL-D jjj. (insert abc at the beginning of the line, page down, move down three lines, repeat), you end up being moved down again instead of having the insert repeated.

<Esc> exit insert mode functionality blocked by autocomplete tab stops

When autocomplete has completed some code and left tab stops for insert points and/or going to the end of the autocompleted text, pressing will clear the tab stops and leave you in insert mode. This is very jarring coming from standard Vi/m. At a bare minimum this should both clear tab stops and exit insert mode, but it would be particularly cool if you could somehow exit insert mode while maintaining the tab stops for easy navigation.

% in visual mode doesn't work.

When the cursor is on {
start visual mode (v)
press %

doesn't go to the matched }

It was same in 0.18 and 0.20

In normal mode and line-wise visual mode(V), % works fine.

Thank you for vrapper.
It is a great plugin.

By the way, does vrapper not support block wise visual mode? or I don't know the shortcut? Ctrl+V or Ctrl+Q

Incorrect action for repeat last change (.)

Repeating last change is incorrect if the last change begins with a <Backspace>.

Say you have the following lines

blah blah bleh
blah blah blxh

If you go on the first line and execute append at the end of line (A) and replace "eh" with "ah123" (<Bs><Bs>ah) and then go on the second line and repeat the change (.) you end up with

Incorrect:
blah blah blah123
blah blah blxh123

Instead of correct:
blah blah blah123
blah blah blah123

Exmode is not visible with dark themes

Hi

I use pretty dark Eclipse syntax theme and I cannot see the exmode command line or the commands I am typing. Which color control or setting can change the coloring of the exmode line?

thanks

:wa[ll] does not work

:wa[ll] should save all modified files. However, this feature is currently missing from vrapper.

Repeating last visual-mode substitute is incomplete

Suppose you select something (v) and then substitute with something else (s). If you repeat the action (.) instead of replacing the initial text, the text is removed and you are taken to insert mode. In other words, adding the text and leaving insert mode is not repeated.

Substituting in normal-mode works fine.

Saving using :w doesn't trigger global save event

I use AnyEdit tools (http://andrei.gmxhome.de/anyedit) to strip any trailing whitespace when hit save. However, I notice that this does not occur when using :w through Vrapper.

I contacted the author of AnyEdit tools who indicated that his plugin hooks into the global save command, however :w doesn't trigger a global save event.

Is it possible for this to be added, or are they doing subtly different things? Obviously the simple work around for this is to save using command-s after finishing editing.

O below a folded section jumps to the top of the file

This has been present for quite a while: if you are in command mode, and hit O under a folded up method, the cursor jumps to the top of the file. You also jump to the top if you yank text and then 'p' on a folded up method.

Vrapper often switches to visual mode in Eclipse 3.7

The unstable version of Vrapper seems to frequently switch to visual mode after I upgraded to Eclipse 3.7. I haven't been able to figure out exactly what causes it to switch to visual mode, but using the mouse to switch to another editor seems to trigger it if the cursor is on an empty line. The stable version does not have this problem. Commits 9983b36 and fda5e59 appear to be the source, I built a custom version with these two commits reverted and didn't notice the problem during some quick testing.

Remapping tab

I have a problem remapping tab. I can't get vrapper to accept the following command

inoremap <tab> <esc>

line-wise selection of last line

When using -V to select the entire last line of a file, the highlighted text seems to omit the last character of the line. However, if yanked and pasted, the pasted text is correct.

So basically this is just a 'visual' bug.

ctx stays in insert mode when 'x' not found

We have a unit test in NormalModeTests that is failing:

@Test
public void test_cfx() throws Exception {
    checkCommand(forKeySeq("ctx"),
            "so",'m',"ething",
            "so",'m',"ething");
    assertEquals(NormalMode.NAME, adaptor.getCurrentModeName());
    verify(userInterfaceService).setErrorMessage("'x' not found");
}

I tried this myself and it is indeed broken. I'm not sure when it happened or whose commit introduced this so I'm filing an issue. If you do 'ctx' when there is no 'x' on the line, the cursor will still be a block as if you were in NormalMode but any characters you type will appear as if you were in InsertMode. The first time this happened I couldn't get it to exit InsertMode either; hitting {esc} had no effect.

Ctrl-R in Insert Mode doesn't work?

Ctrl-R is not working for me in insert mode. When I press Ctrl-R in insert mode, I expect a quote character to be displayed on the status bar and vrapper waiting for a register key (see :h i_ctrl-r in vim), but that does not happen.

Incorrect cursor position after mouse select

Click the mouse somewhere in the middle of a line. The cursor will jump to that spot. Press 'j' or 'k' to move the cursor above/below that line. The cursor will move to the correct line but the column will be incorrect. Sometimes the cursor jumps to the end of the line, sometimes the cursor just moves to the incorrect column.

key bindings begin to mix up within parentheses

noremap h i

noremap i k
noremap j h
noremap k j

inoremap hh
vnoremap hh
cnoremap hh

I have this as my .vrapperrc; so far it works fine outside of parens, but when i try to type h within parens it fails and jumps to before the h as i type, mixing up the letters.

More fold commands like zm and zr

I love vrapper and I like the folding commands like zM and zR.

It would be great if more fold related commands were supported. In particular,

  • zm which increases the folding by one level
  • zr which decreases the folding by one level

Thanks

Show 'recording' when recording a macro

When you hit q{0-9a-zA-Z"}, vrapper starts recording a macro until you hit 'q' to stop recording. In vim, this displays "recording" at the bottom of the screen. Vrapper should do the same thing so you know when it's recording.

Stuck in Insert Mode

I don't know what happened, but I somehow got Vrapper stuck in Insert Mode where <ESC> had no effect. This was with version 0.19.20120301 of the unstable update site. When I looked at Eclipse's error log, it had this stack trace:

java.lang.RuntimeException: org.eclipse.jface.text.BadLocationException
at net.sourceforge.vrapper.eclipse.platform.EclipseTextContent$ModelSideTextContent.getText(EclipseTextContent.java:76)
at net.sourceforge.vrapper.eclipse.platform.EclipseTextContent$ModelSideTextContent.getText(EclipseTextContent.java:81)
at net.sourceforge.vrapper.vim.modes.InsertMode.saveTypedText(InsertMode.java:144)
at net.sourceforge.vrapper.vim.modes.InsertMode.leaveMode(InsertMode.java:109)

I couldn't reproduce the error after restarting Eclipse but I'm hoping I can use this stack trace to catch the BadLocationException so it will successfully invoke leaveMode().

I haven't had time to look into this defect at all, I just wanted to post the stack trace here so I don't forget about it.

Mouse select, Cmd-C (copy) -- selection lost before copy

I only have OSX, so I don't know if this affects other platforms:

. In command mode (press esc)
. Select some text from top to bottom, and make sure to stop in the middle of a line (not on a line boundary)
. Press CMD (in preparation for a CMD-C to copy)

The selection is lost as you press CMD, and the resulting press of C to copy gets nothing.

This does NOT happen if you select from the bottom up, or if the selection ends at a line boundary.

Is in stable release, and the last (as of 4/4/2012) unstable release. Running Indigo on the latest OSX.

c2w broken

If I have 2 words next to each other and I do 'c2w' the first word is removed and it goes into insert mode before the second word. If I do 'c3w' it will remove the two words and go into insert mode. I think it's including the space as a word boundary. This does not happen with 'd2w', I think it's only the change operation that is messing up.

I think I'll hold off on releasing 0.18.0 until this defect is fixed. This is pretty standard functionality and it needs to work.

Ctrl Doesn't work

I tried using Ctrl-D and Ctrl-B but unfortunately the behavior is very different from vim.

Ctrl-D currently deletes a line while Ctrl-B builds the work space.

I am on eclipse 3.7 running on ubuntu 10.10

a little bug

hi, I am a chinese user. I have taken some days to configure my "_vrapperrc" file. It just contains one line "imap jj ".
It never works. Yesterday I found it. The only line "imap jj " should not be the first line. When i move the line to the
second line, it works. My software, Windows XP, eclipse 3.5, vrapper(the latest version). Thanks for vrapper, it helps me a lot.

Support omap command

There is a fourth mode besides insert, visual and normal: operator-pending mode. This is individually remapped using omap and friends. This command is important to those of us who do more extensive remapping (eg. Dvorak users).

For instance, if you hit "d" in normal mode you will enter operator pending mode waiting for a motion. If you then hit "i" you will still be in operator pending mode waiting for the text object.

This is apparent in Vim - whenever you are in operator pending mode, the block cursor is half-sized.

gt & gT commands (changing tab) with count

gt & gT commands doesn't work correctly with count. Without count it works like it should (prev/next tab).

Currently what happens is that if prefixed with number (e.g. 3gt), tab is changed to a tab which is 3 times to right (gt repeated 3 times). Correct behavior is to change to 3rd tab. So, 1gt changes to 1st tab, 6gt to 6th tab.

:9999 fails if last line is empty

If you try moving to a line beyond the end of a file, vrapper goes into a weird state and doesn't move to the bottom of the file. Eclipse's error log shows a stack trace. I thought I had fixed this but something must've broken it again.

UPDATE: It looks like this only happens if the last line of the file is empty. If the last line contains any characters then this still works fine.

copy & paste cursor problem

Steps to reproduce:

  1. Select a block of text via mouse. Make sure you include the newline char of the last line in the selected block.
  2. Ctrl-C to copy text
  3. Highlight a block of text to replace with the previous text.
  4. Ctrl-V to paste and overwite the old block of text

After pasting the text, the cursor position and behaviour is wrong when using k to navigate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.