Problem: No good reason why text objects are only in larger builds.
Solution: Graduate +textobjects.
without white space, or just the white space. Thus the "inner" commands
always select less text than the "a" commands.
-These commands are not available when the |+textobjects| feature has been
-disabled at compile time.
Also see `gn` and `gN`, operating on the last search pattern.
*v_aw* *aw*
"</aaa>", including the "<aaa>" and "</aaa>".
See |tag-blocks| about the details.
When used in Visual mode it is made characterwise.
+ Only available when compiled with the |+eval| feature.
*v_it* *it*
it "inner tag block", select [count] tag blocks, from the
*+terminfo* uses |terminfo| instead of termcap
N *+termresponse* support for |t_RV| and |v:termresponse|
B *+termguicolors* 24-bit color in xterm-compatible terminals support
-N *+textobjects* |text-objects| selection
+T *+textobjects* |text-objects| selection. Always enabled since 9.0.0222.
N *+textprop* |text-properties|
*+tgetent* non-Unix only: able to use external termcap
N *+timers* the |timer_start()| function
#endif
clear_string_option(&buf->b_p_dict);
clear_string_option(&buf->b_p_tsr);
-#ifdef FEAT_TEXTOBJ
clear_string_option(&buf->b_p_qe);
-#endif
buf->b_p_ar = -1;
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
clear_string_option(&buf->b_p_lw);
0
#endif
},
- {"textobjects",
-#ifdef FEAT_TEXTOBJ
- 1
-#else
- 0
-#endif
- },
+ {"textobjects", 1},
{"textprop",
#ifdef FEAT_PROP_POPUP
1
* +lispindent lisp indenting (From Eric Fischer).
* +cindent C code indenting (From Eric Fischer).
* +smartindent smart C code indenting when the 'si' option is set.
+ * +textobjects Text objects: "vaw", "das", etc.
*
* Obsolete:
* +tag_old_static Old style static tags: "file:tag file ..".
# define FEAT_TIMERS
#endif
-/*
- * +textobjects Text objects: "vaw", "das", etc.
- */
-#if defined(FEAT_NORMAL) && defined(FEAT_EVAL)
-# define FEAT_TEXTOBJ
-#endif
-
/*
* Insert mode completion with 'completefunc'.
*/
}
}
-#if defined(FEAT_TEXTOBJ) || defined(PROTO)
/*
* Make sure curwin->w_cursor is not on the NUL at the end of the line.
* Allow it when in Visual mode and 'selection' is not "old".
&& gchar_cursor() == NUL)
--curwin->w_cursor.col;
}
-#endif
/*
* When curwin->w_leftcol has changed, adjust the cursor position.
static void nv_esc(cmdarg_T *oap);
static void nv_edit(cmdarg_T *cap);
static void invoke_edit(cmdarg_T *cap, int repl, int cmd, int startln);
-#ifdef FEAT_TEXTOBJ
static void nv_object(cmdarg_T *cap);
-#endif
static void nv_record(cmdarg_T *cap);
static void nv_at(cmdarg_T *cap);
static void nv_halfpage(cmdarg_T *cap);
else if ((cap->cmdchar == 'a' || cap->cmdchar == 'i')
&& (cap->oap->op_type != OP_NOP || VIsual_active))
{
-#ifdef FEAT_TEXTOBJ
nv_object(cap);
-#else
- clearopbeep(cap->oap);
-#endif
}
#ifdef FEAT_TERMINAL
else if (term_in_normal_mode())
restart_edit = restart_edit_save;
}
-#ifdef FEAT_TEXTOBJ
/*
* "a" or "i" while an operator is pending or in Visual mode: object motion.
*/
case '>':
flag = current_block(cap->oap, cap->count1, include, '<', '>');
break;
+#ifdef FEAT_EVAL
case 't': // "at" = a tag block (xml and html)
// Do not adjust oap->end in do_pending_operator()
// otherwise there are different results for 'dit'
cap->retval |= CA_NO_ADJ_OP_END;
flag = current_tagblock(cap->oap, cap->count1, include);
break;
+#endif
case 'p': // "ap" = a paragraph
flag = current_par(cap->oap, cap->count1, include, 'p');
break;
adjust_cursor_col();
curwin->w_set_curswant = TRUE;
}
-#endif
/*
* "q" command: Start/stop recording.
case PV_MOD: return (char_u *)&(curbuf->b_changed);
case PV_NF: return (char_u *)&(curbuf->b_p_nf);
case PV_PI: return (char_u *)&(curbuf->b_p_pi);
-#ifdef FEAT_TEXTOBJ
case PV_QE: return (char_u *)&(curbuf->b_p_qe);
-#endif
case PV_RO: return (char_u *)&(curbuf->b_p_ro);
case PV_SI: return (char_u *)&(curbuf->b_p_si);
case PV_SN: return (char_u *)&(curbuf->b_p_sn);
#ifdef FEAT_COMPL_FUNC
buf->b_p_tsrfu = empty_option;
#endif
-#ifdef FEAT_TEXTOBJ
buf->b_p_qe = vim_strsave(p_qe);
COPY_OPT_SCTX(buf, BV_QE);
-#endif
#if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
buf->b_p_bexpr = empty_option;
#endif
#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
EXTERN long p_pyx; // 'pyxversion'
#endif
-#ifdef FEAT_TEXTOBJ
EXTERN char_u *p_qe; // 'quoteescape'
-#endif
EXTERN int p_ro; // 'readonly'
#ifdef FEAT_RELTIME
EXTERN long p_rdt; // 'redrawtime'
#endif
, BV_PATH
, BV_PI
-#ifdef FEAT_TEXTOBJ
, BV_QE
-#endif
, BV_RO
, BV_SI
, BV_SN
#endif
#define PV_PATH OPT_BOTH(OPT_BUF(BV_PATH))
#define PV_PI OPT_BUF(BV_PI)
-#ifdef FEAT_TEXTOBJ
-# define PV_QE OPT_BUF(BV_QE)
-#endif
+#define PV_QE OPT_BUF(BV_QE)
#define PV_RO OPT_BUF(BV_RO)
#define PV_SI OPT_BUF(BV_SI)
#define PV_SN OPT_BUF(BV_SN)
#endif
SCTX_INIT},
{"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
-#ifdef FEAT_TEXTOBJ
(char_u *)&p_qe, PV_QE,
- {(char_u *)"\\", (char_u *)0L}
-#else
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
-#endif
- SCTX_INIT},
+ {(char_u *)"\\", (char_u *)0L} SCTX_INIT},
{"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
(char_u *)&p_ro, PV_RO,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
check_string_option(&buf->b_p_cms);
#endif
check_string_option(&buf->b_p_nf);
-#ifdef FEAT_TEXTOBJ
check_string_option(&buf->b_p_qe);
-#endif
#ifdef FEAT_SYN_HL
check_string_option(&buf->b_p_syn);
check_string_option(&buf->b_s.b_syn_isk);
int sid;
scriptitem_T *si = NULL;
int save_estack_compiling = estack_compiling;
+ ESTACK_CHECK_DECLARATION
#endif
#ifdef STARTUPTIME
struct timeval tv_rel;
#endif
int save_sticky_cmdmod_flags = sticky_cmdmod_flags;
int trigger_source_post = FALSE;
- ESTACK_CHECK_DECLARATION
CLEAR_FIELD(cookie);
if (fname == NULL)
if (got_int)
emsg(_(e_interrupted));
+#ifdef FEAT_EVAL
ESTACK_CHECK_NOW
+#endif
estack_pop();
if (p_verbose > 1)
{
int b_p_ma; // 'modifiable'
char_u *b_p_nf; // 'nrformats'
int b_p_pi; // 'preserveindent'
-#ifdef FEAT_TEXTOBJ
char_u *b_p_qe; // 'quoteescape'
-#endif
int b_p_ro; // 'readonly'
long b_p_sw; // 'shiftwidth'
int b_p_sn; // 'shortname'
" Test for textobjects
source check.vim
-CheckFeature textobjects
func CpoM(line, useM, expected)
new
return FALSE;
}
-#if defined(FEAT_TEXTOBJ) || defined(PROTO)
/*
* Go back to the start of the word or the start of white space
*/
return OK;
}
+#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Return TRUE if the cursor is on a "<aaa>" tag. Ignore "<aaa/>".
* When "end_tag" is TRUE return TRUE if the cursor is on "</aaa>".
p_ws = save_p_ws;
return retval;
}
+#endif
int
current_par(
}
return FALSE;
}
-
-#endif // FEAT_TEXTOBJ
#else
"-termresponse",
#endif
-#ifdef FEAT_TEXTOBJ
"+textobjects",
-#else
- "-textobjects",
-#endif
#ifdef FEAT_PROP_POPUP
"+textprop",
#else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 222,
/**/
221,
/**/