I often use the_underscore_convention for naming
symbols in my code. I often find myself changing
words between underscores in that context, so I
implemented a 'a_' text object.

The patch is rather trivial so here it is.

diff -r 0f3a5589de8a -r a0f5264043d7 runtime/doc/motion.txt
--- a/runtime/doc/motion.txt    Wed Aug 17 16:25:48 2011 +0200
+++ b/runtime/doc/motion.txt    Wed Aug 17 11:20:36 2011 -0400
@@ -635,6 +635,7 @@
 a"                                                     *v_aquote* *aquote*
 a'                                                     *v_a'* *a'*
 a`                                                     *v_a`* *a`*
+a_                                                     *v_a_* *a_*
                        "a quoted string".  Selects the text from the previous
                        quote until the next quote.  The 'quoteescape' option
                        is used to skip escaped quotes.
diff -r 0f3a5589de8a -r a0f5264043d7 src/normal.c
--- a/src/normal.c      Wed Aug 17 16:25:48 2011 +0200
+++ b/src/normal.c      Wed Aug 17 11:20:36 2011 -0400
@@ -9133,6 +9133,7 @@
        case '"': /* "a"" = a double quoted string */
        case '\'': /* "a'" = a single quoted string */
        case '`': /* "a`" = a backtick quoted string */
+       case '_': /* "a_" = an underscore quoted string */
                flag = current_quote(cap->oap, cap->count1, include,
                                                                  cap->nchar);
                break;

-- 
JR [who loves scratching his own itch once in awhile]

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui