vrapper / vrapper Goto Github PK
View Code? Open in Web Editor NEWVim-like editing in Eclipse
Home Page: http://vrapper.sourceforge.net/
License: GNU General Public License v3.0
Vim-like editing in Eclipse
Home Page: http://vrapper.sourceforge.net/
License: GNU General Public License v3.0
was working, doesn't seem to work in 1111 build.
Thanks,
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.
Yank lines should keep the cursor's position.
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.
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.
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.
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 levelzr
which decreases the folding by one levelThanks
That is very useful on Vim and I'd love to be able to use it on Vrapper.
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.
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
Occurs when I'm trying to save Hibernate configuration files (e.g. hibernate.cfg.xml, model.hbm.xml) in their editor (source tab) in Eclipse /w vrapper. :wa and/or Ctrl + S works but :w doesn't.
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?
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.
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.
when enabled, type ({"teststring"}) in the editor, the bracket match work wrongly.
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,
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.)
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.
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.
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)
Currently, : does not do anything.
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
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.
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.
In normal mode <End> should move the cursor on the last character on the line. However, vrapper moves it one character right, past the end of line. If <Esc> is pressed, then the cursor goes to the correct position.
Steps to reproduce:
After pasting the text, the cursor position and behaviour is wrong when using k to navigate.
This is a feature request. In vim, in insert mode Ctrl-y and Ctrl-e are used to copy characters from the adjacent lines.
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.
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.
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.
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.
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.
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
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.
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
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.
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.
I have a problem remapping tab. I can't get vrapper to accept the following command
inoremap <tab> <esc>
EOM
r<character> in normal mode works, but in visual mode it does not do anything.
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.
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.
Description: Open over 100+ files in editor, restart Eclipse, Eclipse hangs because of too many CReconciler threads are created and blocked.
I have reported this problem to Eclipse CDT https://bugs.eclipse.org/bugs/show_bug.cgi?id=377368 , but it turns out that Vrapper causes this problem. Please refer to that thread for more details.
Thanks.
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.
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.
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.
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.
:wa[ll] should save all modified files. However, this feature is currently missing from vrapper.
In normal mode:
<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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.