Lines Matching full:motion
137 * motion. If it does, we get it too, calling its underlying in vi()
171 * any motion component goes away, i.e. "d3w2." deletes a in vi()
196 * Do any required motion; v_motion sets the from MARK and the in vi()
281 * its motion, the count was used only for the motion. in vi()
301 * motion component. Other similar commands (e.g. +, -) don't in vi()
419 * The O_TILDEOP option makes the ~ command take a motion instead
429 "[count]~[count]motion",
430 " ~ change case to motion"
439 * [count] [buffer] [count] key [[motion] | [buffer] [character]]
441 * and there are several special cases. The motion value is itself a vi
451 VICMD *ismotion, /* Previous key if getting motion component. */ in v_cmd()
557 /* The tildeop option makes the ~ command take a motion. */ in v_cmd()
577 /* If called for a motion command, stop now. */ in v_cmd()
619 /* Illegal motion command. */ in v_cmd()
675 * Commands that have motion components can be doubled to imply the in v_cmd()
679 msgq(sp, M_ERR, "210|%s may not be used as a motion command", in v_cmd()
710 * Get resulting motion mark.
719 VICMD motion; in v_motion() local
726 * If '.' command, use the dot motion, else get the motion command. in v_motion()
727 * Clear any line motion flags, the subsequent motion isn't always in v_motion()
728 * the same, i.e. "/aaa" may or may not be a line motion. in v_motion()
731 motion = *dm; in v_motion()
732 F_SET(&motion, VC_ISDOT); in v_motion()
733 F_CLR(&motion, VM_COMMASK); in v_motion()
735 memset(&motion, 0, sizeof(VICMD)); in v_motion()
736 if (v_cmd(sp, NULL, &motion, vp, ¬used, mappedp) != GC_OK) in v_motion()
741 * A count may be provided both to the command and to the motion, in in v_motion()
743 * same as "12yy". This count is provided to the motion command and in v_motion()
746 cnt = motion.count = F_ISSET(&motion, VC_C1SET) ? motion.count : 1; in v_motion()
748 motion.count *= vp->count; in v_motion()
749 F_SET(&motion, VC_C1SET); in v_motion()
766 if (vp->key == motion.key) { in v_motion()
780 vp->m_stop.lno = sp->lno + motion.count - 1; in v_motion()
792 * Motion commands change the underlying movement (*snarl*). in v_motion()
796 motion.rkp = vp->kp; in v_motion()
800 * Use yank instead of creating a new motion command, it's a in v_motion()
811 * RCM flags -- the motion command will set the RCM flags in in v_motion()
812 * the vp structure if necessary. This means that the motion in v_motion()
815 * it no RCM flags are set by the motion command, with a small in v_motion()
820 * unless the motion command explicitly specified it. This in v_motion()
830 F_SET(&motion, motion.kp->flags & ~VM_RCM_MASK); in v_motion()
838 motion.m_final.lno = in v_motion()
839 motion.m_stop.lno = motion.m_start.lno = sp->lno; in v_motion()
840 motion.m_final.cno = in v_motion()
841 motion.m_stop.cno = motion.m_start.cno = sp->cno; in v_motion()
844 if ((motion.kp->func)(sp, &motion)) in v_motion()
849 * historic vi allowed "c<motion>" or "!<motion>" to insert in v_motion()
850 * text. Otherwise fail -- most motion commands will have in v_motion()
871 * from the motion command structure, i.e. anything that the in v_motion()
872 * motion command can set for us. The commands can flag the in v_motion()
873 * movement as a line motion (see v_sentence) as well as set in v_motion()
876 F_SET(vp, F_ISSET(&motion, VM_COMMASK | VM_RCM_MASK)); in v_motion()
879 * If the motion command set no relative motion flags, use in v_motion()
886 * Commands can change behaviors based on the motion command in v_motion()
888 * command if N or n was used as the motion. in v_motion()
890 vp->rkp = motion.kp; in v_motion()
893 * Motion commands can reset all of the cursor information. in v_motion()
894 * If the motion is in the reverse direction, switch the in v_motion()
898 if (motion.m_start.lno > motion.m_stop.lno || in v_motion()
899 (motion.m_start.lno == motion.m_stop.lno && in v_motion()
900 motion.m_start.cno > motion.m_stop.cno)) { in v_motion()
901 vp->m_start = motion.m_stop; in v_motion()
902 vp->m_stop = motion.m_start; in v_motion()
904 vp->m_start = motion.m_start; in v_motion()
905 vp->m_stop = motion.m_stop; in v_motion()
907 vp->m_final = motion.m_final; in v_motion()
911 * If the command sets dot, save the motion structure. The motion in v_motion()
916 *dm = motion; in v_motion()