"df" not deleting the searched charactor
Hi, Just noticed a problem: the command "df[char]" is not deleting the searched character [char] itself, making this command no difference to "dt[char]". This is pretty annoying because if the searched char is not being deleted, we can no longer use dot command to repeat the deleting operation. For example, I have this string: "foo-bar bar-foo fooa-bara bara-fooa should be deleted", I want to delete everything up to substring "should be deleted", I could use "df<SPC>" followed by dot command to repeat the deletion which is really handy. But now, since df<SPC> is not deleting the space itself, the dot command will fail, you have to type another "df<SPC>", sad. Don't you guys think this is worth fixing? Thanks, York
On 2011-06-11 04:41 +0200, York Zhao wrote:
Just noticed a problem: the command "df[char]" is not deleting the searched character [char] itself, making this command no difference to "dt[char]".
I am unable to reproduce this, but I have added a Makefile rule in commit 98e464e which creates a fresh instance of Vimpulse. Get it with: git pull Then type: make emacs Please report if there's any difference. -- Vegard
Hi Vegard, Thanks for your change in the Makefile and I'm sorry it was my problem. It turned out that it was because I re-binded the 'f' key to my function. But what my function did was simply a check on whether edebug was active, if edebug was not active, it simply called the old function. Here is my customization. I don't understand why this did harm, I'm pretty new to emacs, can you give me any suggestion on how to archive the same thing in a "better" way? (define-key viper-vi-basic-map "f" 'york/viper-find-char-forward) (defun york/viper-find-char-forward (arg) (interactive "P") (if edebug-active (edebug-forward-sexp arg) (viper-find-char-forward arg))) Thanks, York On Sat, Jun 11, 2011 at 3:55 PM, Vegard Øye <[email protected]> wrote: On 2011-06-11 04:41 +0200, York Zhao wrote:
Just noticed a problem: the command "df[char]" is not deleting the searched character [char] itself, making this command no difference to "dt[char]".
I am unable to reproduce this, but I have added a Makefile rule in commit 98e464e which creates a fresh instance of Vimpulse. Get it with: git pull Then type: make emacs Please report if there's any difference. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On 2011-06-12 00:59 +0200, York Zhao wrote:
It turned out that it was because I re-binded the 'f' key to my function. But what my function did was simply a check on whether edebug was active, if edebug was not active, it simply called the old function.
Some Viper motions need to be called with a special argument in order to work properly in Operator-Pending state. As your function called `viper-find-char-forward' without this argument, it behaved differently. Commit 3221608 tries to eliminate this trap by using `defadvice' to generate the argument automatically. I have also added some edebug compatibility bindings in commit 4bdc95f. I usually run edebug in Emacs state or Insert state, but now it should also work reasonably well in vi state. -- Vegard
Nice "fix", thanks a lot. Another minor issue I've just noticed after started using the "undo-tree" was that the "hjkl" are not working in the undo-tree-visualizer-mode. But that's just small inconvenience. York On Sun, Jun 12, 2011 at 4:28 PM, Vegard Øye <[email protected]> wrote: On 2011-06-12 00:59 +0200, York Zhao wrote:
It turned out that it was because I re-binded the 'f' key to my function. But what my function did was simply a check on whether edebug was active, if edebug was not active, it simply called the old function.
Some Viper motions need to be called with a special argument in order to work properly in Operator-Pending state. As your function called `viper-find-char-forward' without this argument, it behaved differently. Commit 3221608 tries to eliminate this trap by using `defadvice' to generate the argument automatically. I have also added some edebug compatibility bindings in commit 4bdc95f. I usually run edebug in Emacs state or Insert state, but now it should also work reasonably well in vi state. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Hi Vegard, Thanks for the fixes, they all seem to be working except that the "hjkl" keys still do not work in undo-tree-visualizer-mode. Thanks, York On Tue, Jun 14, 2011 at 12:27 PM, Vegard Øye <[email protected]> wrote: On 2011-06-13 21:00 +0200, York Zhao wrote:
Another minor issue I've just noticed after started using the "undo-tree" was that the "hjkl" are not working in the undo-tree-visualizer-mode.
Should be fixed in commit ecbf0a8. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
The "hkjl" keys are still not working On Wed, Jun 15, 2011 at 3:58 PM, Vegard Øye <[email protected]> wrote: On 2011-06-15 17:08 +0200, York Zhao wrote:
Thanks for the fixes, they all seem to be working except that the "hjkl" keys still do not work in undo-tree-visualizer-mode.
Try commit b57fbb7; it fixes an issue with newer versions of undo-tree.el. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Hi Vegard, I just tested it again, if the undo-tree-visualizer-mode was called by ":ulist" the "hkjl" keys worked fine, but if called by pressing "C-x u" then they do not work. Thank, York On Wed, Jun 15, 2011 at 5:06 PM, York Zhao <[email protected]> wrote: The "hkjl" keys are still not working On Wed, Jun 15, 2011 at 3:58 PM, Vegard Øye <[email protected]> wrote: On 2011-06-15 17:08 +0200, York Zhao wrote:
Thanks for the fixes, they all seem to be working except that the "hjkl" keys still do not work in undo-tree-visualizer-mode.
Try commit b57fbb7; it fixes an issue with newer versions of undo-tree.el. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On 2011-06-15 23:11 +0200, York Zhao wrote:
I just tested it again, if the undo-tree-visualizer-mode was called by ":ulist" the "hkjl" keys worked fine, but if called by pressing "C-x u" then they do not work.
Try commit e314f0b -- newer versions of undo-tree.el create the undo-tree-visualizer-mode buffer without running any hooks. -- Vegard
Hi Vegaed, This is working perfectly fine now, I also have learnt something very useful from you in recent few days, thanks a lot. Have a nice day, York On Thu, Jun 16, 2011 at 9:55 AM, Vegard Øye <[email protected]> wrote: On 2011-06-15 23:11 +0200, York Zhao wrote:
I just tested it again, if the undo-tree-visualizer-mode was called by ":ulist" the "hkjl" keys worked fine, but if called by pressing "C-x u" then they do not work.
Try commit e314f0b -- newer versions of undo-tree.el create the undo-tree-visualizer-mode buffer without running any hooks. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
participants (2)
-
Vegard Øye -
York Zhao