Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.

#163 Tag text objects not working?

Editing (61)

I read in a feature request that tag text object commands like "cit" should already be implemented. However, they seem to do nothing for me on jVi 1.4.5/NB 7.1.1. Anyone else experiencing that?

Thank you for this awesomest of all plugins! *bow*
I 'd like to contribute in the future, as soon as I can put some time aside without pain. Meanwhile, is it possible to support your efforts with a small donation?


1 2 > >> (Page 1 of 2)
  • Ernie Rael

    Ernie Rael - 2012-03-05

    I just tried it, seems to work. Could you provide a small example file and how to reproduce the failure?

  • Ernie Rael

    Ernie Rael - 2012-03-05
    • status: open --> pending
  • Ernie Rael

    Ernie Rael - 2012-03-05

    > a small donation?

    In vim, do ":help uganda" if you are in a generous mood.

    I do jVi for the good vibes.

  • work.flow

    work.flow - 2012-03-05
  • work.flow

    work.flow - 2012-03-05
    • status: pending --> open
  • work.flow

    work.flow - 2012-03-05

    In the provided example html file, navigate anywhere between <b> and </b> and hit "cit", nothing happens for me.
    Any additional information needed?

    Good vibes make me smile, and I'll forward that to Uganda with pleasure.

  • Ernie Rael

    Ernie Rael - 2012-03-06
    • status: open --> pending
  • Ernie Rael

    Ernie Rael - 2012-03-06

    It works for me. Does anything happen? Hard to imagine that it is OS or window manager related, if other stuff works.

    Starting with
    <b>Mister| Smith</b>
    where '|' shows the cursor.

    After entering: ci
    you should see [ci] in the lower left corner of the frame. (this is the NetBeans status area) Then, when 't' is entered, the status goes to '--INSERT--' and of course the line with the cursor turns into

  • work.flow

    work.flow - 2012-03-06

    I see the partial command up to [ci] in the status area, and on hitting "t" the status area message disappears w/o error.
    But nothing happens in terms of editing, and jVi stays in normal mode.

    That having to do with OS or window manger would be interesting indeed, but just in case: OS is Ubuntu 11.10 64bit, window manager is default compiz.
    Could it be a factor that I'm currently running nb on jdk 6?
    Product Version: NetBeans IDE 7.1.1 (Build 201202271535)
    Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02
    System: Linux version 3.0.0-16-generic running on amd64; UTF-8; en_US (nb)

  • Ernie Rael

    Ernie Rael - 2012-03-06

    Very peculiar. This feature has been in place for over 2 years. Do other text objects work?

    If you want to try it without Netbeans, you can do something like the following (with quoting as needed). And paste your document into the standalone/debug jvi with: "*p
    /ext/ $ pwd
    /ext/ $ java -cp $NB_INSTALL/platform/lib/org-openide-util.jar:$NB_INSTALL/platform/lib/org-openide-util-lookup.jar -jar jvi.jar

    If you want to debug it, something like
    mkdir jvi
    cd jvi
    hg clone http://jvi.hg.sourceforge.net:8000/hgroot/jvi/jvi

    and then open the plain old java project with netbeans.

    There is also the little used standalone_build.xml file, but it needs to be fixed since TypeBuf.java and TypeBufDeque.java should be excluded from compiling.

  • Ernie Rael

    Ernie Rael - 2012-03-06

    I was running with jdk1.7, but I just tried it with

    Product Version: NetBeans IDE 7.1.1 (Build 201202271535)
    Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

  • Ernie Rael

    Ernie Rael - 2012-03-06
    • status: pending --> pending-works-for-me
  • Ernie Rael

    Ernie Rael - 2012-03-18

    Any change?

  • work.flow

    work.flow - 2012-03-19

    Sorry for the delay - let's hack it.

    First of all, all other text objects (tried w W p s) seem to work fine.

    0@tribe:~/.netbeans/7.1/modules/ext$ java -cp /usr/share/netbeans/platform/lib/org-openide-util.jar:/usr/share/netbeans/platform/lib/org-openide-util-lookup.jar -jar jvi.jar
    Gives me
    Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/WeakSet
    at com.raelity.jvi.swing.SwingFactory.<init>(SwingFactory.java:91)
    at com.raelity.jvi.swing.simple.SimpleFactory.<init>(SimpleFactory.java:35)
    at com.raelity.jvi.cmd.PlayFactory.<init>(PlayFactory.java:48)
    at com.raelity.jvi.cmd.Jvi.main(Jvi.java:226)
    Caused by: java.lang.ClassNotFoundException: org.openide.util.WeakSet
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 4 more

    Anything wrong with my command?

    Apart from that I james-bond-cloned your repository, thanks for that. The code looks very well documented, but I'm not (yet) desperate enough to sacrifice sleep or love for debugging purposes. (:

  • work.flow

    work.flow - 2012-03-19
    • status: pending-works-for-me --> open-works-for-me
  • Ernie Rael

    Ernie Rael - 2012-03-19

    > First of all, all other text objects (tried w W p s) seem to work fine.

    Stranger and stranger. BTW, I usually use "vit" instead of "cit" to see what jVi's doing without modifying the file. There's also some different code paths, but...

    How about "vat"? Same problem?

    Not sure why the
    NoClassDefFoundError: org/openide/util/WeakSet
    That class is in org-openide-util.jar. Invoking java from the command line is somewhat system dependent.

    With the source checked out, you can do "ant run". That uses the NetBeans build file, I just tried it. It builds and runs the standalone-debug jVi. You can delete the editor contents and then, Mr. Smith, paste in your test file.

  • work.flow

    work.flow - 2012-03-19

    Strange indeed.
    "vit" leaves me with a single char selected in visual mode and -- VISUAL -- [ 1 ] in the status area. Same for "vat".

    Nice, I'm now in standalone jVi and... still no cit!

  • work.flow

    work.flow - 2012-03-19

    Mister Smith tried "vat" and "vit" with sunglasses off and a bitter look on his stern face.
    Time for Neo.

  • work.flow

    work.flow - 2012-06-09

    Just to provide you with an update - same thing on standalone-jvi/NB 7.1.2 running Java 7.

    So it really seems to be a platform-depend jvi mood.

    Anyone else on Ubuntu/Debian?

  • Ernie Rael

    Ernie Rael - 2012-06-09

    > Anyone else on Ubuntu/Debian?

    You might try asking about this on NetBeans user list. These jVi forums are pretty quiet.

    Another thing to try is a clean userdir and don't import any options. See http://wiki.netbeans.org/FaqAlternateUserdir for doing this on startup.

  • work.flow

    work.flow - 2012-06-09

    Thank you, done both. (no luck with clean userdir either)

  • Ernie Rael

    Ernie Rael - 2012-06-10

    You can open the standalone project with NetBeans and use the debugger to see if it ever gets to:
    current_tagblock(OPARG oap, int count_arg, boolean include)
    which is in Search03.java in package com.raelity.jvi.core;

    Note that this is an almost literal translation of vim code.

  • Ernie Rael

    Ernie Rael - 2012-06-14

    I just recalled that the option Tools>Options>jVi>General>selection affects the behavior of object selection. Might be worth trying seeing of the other settings...

  • work.flow

    work.flow - 2012-06-17

    No luck today with the 'selection' setting,
    just ran a debug like you suggested, and it does reach curent_tagblock(). Here's a little output from jvi (debug), though I doubt it will help:

    Method breakpoint hit in com.raelity.jvi.core.Search03.current_tagblock at line 712 by thread AWT-EventQueue-0.

    jviButton UI: javax.swing.plaf.metal.MetalToggleButtonUI
    jviButton isContentAreaFilled: true
    ViOutputStream: type: Output, file: no-file, info:
    jVi Version Information
    ViOutputStream: Running: jVi 1.4.6.x3 (development release)

    I should find the time to have a deeper look into the class in about two weeks, unless you have any quick ideas what could be running amiss.

    Once again, kind thanks for your support, and have a great day!

  • Daniele Bettella

    I have exactly the same problem using NetBeans 7.2 and jVi 1.4.7 on a Windows7 64 bit machine (java 1.7.0)

1 2 > >> (Page 1 of 2)

Log in to post a comment.