I cannot use backspace to delete any character if the text has been autocompleted.
Eg: sout + tab -> System.out.println("").
I canot use backspace to delete any character in that line, however backspace works normally for other user entered lines.
The backspace key is not deleting in non autocompleted terms too. It works intially, but then refuses to delete characters once the line has been completed and parsed I think.
I wonder if this is a feature ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, in insert mode.
Yes, setting bs to '2' solved my problem, it was set to '0'.
I wonder if setting it to '0' is advisable as the default option ? Because vim does not work that way by default.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, I'm not using the arrow keys.
Also I have fresh install of Netbeans 8.0.2 and jVi. Haven't made any changes. Should I post a screenshot or a video ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I downloaded/installed 8.0.2, jdk 1.8.0_25, started NB (did not import settings from previous install)
did File>NewProject>JavaApp
In main(...) went into input mode and entered: sout+TAB+BS+BS+BS+BS+BS+BS
Observed that things worked as expected: sout was expanded and the following backspaces did the right thing leaving:
Syste");
with the caret between the e and double quote.
Note, I made no NB or jVi option changes.
I'm on Win7, but hard to see how that would be an issue.
If you want to pursue this, I can assist you in debugging it.
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\b\nb-test\nb-8.0.2\T1\userdir
Cache directory: C:\b\nb-test\nb-8.0.2\T1\cachedir
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
private static boolean
ins_bs(char c, int mode, MutableBoolean inserted_space_p)
method in Edit.java.
It may be an issue with the complex "if" expression at the beginning of this method, or an unexpected value of the Insstart variable. Since it works with 'bs'=2 and not with 'bs'=0, the code
is suspect. When 'bs'=0, !can_bs(BS_START) is true; meaning you can not backspace over the start of the insert. Insstart (the start of insert) should point at or before the first character of "sout" in your original input. If it is not, then you will have the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
System --
Netbeans 8.0.2
OpenJDK 1.8.0_25
Linux 3.16 x64
Edit:
The backspace key is not deleting in non autocompleted terms too. It works intially, but then refuses to delete characters once the line has been completed and parsed I think.
I wonder if this is a feature ?
I can not reproduce this. I did code completion while in input mode.
Are you in input mode when you do the autocompletion?
If you go into input mode after the autocompletion, you might be having an interaction with the 'bs' option. See
Yes, in insert mode.
Yes, setting bs to '2' solved my problem, it was set to '0'.
I wonder if setting it to '0' is advisable as the default option ? Because vim does not work that way by default.
Actually, vim default is '0'.
Even with 'bs' set to '0' I can not reproduce what you are seeing.
Are you using the arrow keys while in insert mode before doing the backspace? The arrow keys change the "start of insert" just like in vim.
No, I'm not using the arrow keys.
Also I have fresh install of Netbeans 8.0.2 and jVi. Haven't made any changes. Should I post a screenshot or a video ?
I downloaded/installed 8.0.2, jdk 1.8.0_25, started NB (did not import settings from previous install)
did File>NewProject>JavaApp
In main(...) went into input mode and entered: sout+TAB+BS+BS+BS+BS+BS+BS
Observed that things worked as expected: sout was expanded and the following backspaces did the right thing leaving:
with the caret between the e and double quote.
Note, I made no NB or jVi option changes.
I'm on Win7, but hard to see how that would be an issue.
If you want to pursue this, I can assist you in debugging it.
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\b\nb-test\nb-8.0.2\T1\userdir
Cache directory: C:\b\nb-test\nb-8.0.2\T1\cachedir
Forgot to say that I installed jVi using the plugin manager. First installed the jVi update center, then installed jVi modules.
Sure, if you want more info on it.
Instructions for setting up jvi for debug at:
The problem probably comes from the
method in Edit.java.
It may be an issue with the complex "if" expression at the beginning of this method, or an unexpected value of the Insstart variable. Since it works with 'bs'=2 and not with 'bs'=0, the code
is suspect. When 'bs'=0, !can_bs(BS_START) is true; meaning you can not backspace over the start of the insert. Insstart (the start of insert) should point at or before the first character of "sout" in your original input. If it is not, then you will have the problem.
Can't reproduce. No comments several years. closing.