Lines Matching defs:motion
153 * motion. If it does, we get it too, calling its underlying
187 * any motion component goes away, i.e. "d3w2." deletes a
212 * Do any required motion; v_motion sets the from MARK and the
306 * its motion, the count was used only for the motion.
326 * motion component. Other similar commands (e.g. +, -) don't
444 * The O_TILDEOP option makes the ~ command take a motion instead
454 "[count]~[count]motion",
455 " ~ change case to motion"
466 /* Previous key if getting motion component. */
496 * [count] [buffer] [count] key [[motion] | [buffer] [character]]
498 * and there are, of course, several special cases. The motion value
598 /* The tildeop option makes the ~ command take a motion. */
619 /* If called for a motion command, stop now. */
661 /* Illegal motion command. */
717 * Commands that have motion components can be doubled to imply the
721 msgq(sp, M_ERR, "210|%s may not be used as a motion command",
762 * Get resulting motion mark.
767 VICMD motion;
778 * If '.' command, use the dot motion, else get the motion command.
779 * Clear any line motion flags, the subsequent motion isn't always
780 * the same, i.e. "/aaa" may or may not be a line motion.
783 motion = *dm;
784 F_SET(&motion, VC_ISDOT);
785 F_CLR(&motion, VM_COMMASK);
788 memset(&motion, 0, sizeof(VICMD));
789 gcret = v_cmd(sp, NULL, &motion, vp, ¬used, mappedp);
795 * A count may be provided both to the command and to the motion, in
797 * same as "12yy". This count is provided to the motion command and
800 cnt = motion.count = F_ISSET(&motion, VC_C1SET) ? motion.count : 1;
802 motion.count *= vp->count;
803 F_SET(&motion, VC_C1SET);
820 if (gcret != GC_EVENT && vp->key == motion.key) {
834 vp->m_stop.lno = sp->lno + motion.count - 1;
846 * Motion commands change the underlying movement (*snarl*).
850 motion.rkp = vp->kp;
854 * Use yank instead of creating a new motion command, it's a
865 * RCM flags -- the motion command will set the RCM flags in
866 * the vp structure if necessary. This means that the motion
869 * it no RCM flags are set by the motion command, with a small
874 * unless the motion command explicitly specified it. This
884 F_SET(&motion, motion.kp->flags & ~VM_RCM_MASK);
892 motion.m_final.lno =
893 motion.m_stop.lno = motion.m_start.lno = sp->lno;
894 motion.m_final.cno =
895 motion.m_stop.cno = motion.m_start.cno = sp->cno;
899 if ((motion.kp->func)(sp, &motion))
902 if (strchr(O_STR(sp, O_IMKEY), motion.key))
904 rval = (motion.kp->func)(sp, &motion);
905 if (strchr(O_STR(sp, O_IMKEY), motion.key))
913 * historic vi allowed "c<motion>" or "!<motion>" to insert
914 * text. Otherwise fail -- most motion commands will have
935 * from the motion command structure, i.e. anything that the
936 * motion command can set for us. The commands can flag the
937 * movement as a line motion (see v_sentence) as well as set
940 F_SET(vp, F_ISSET(&motion, VM_COMMASK | VM_RCM_MASK));
943 * If the motion command set no relative motion flags, use
950 * Commands can change behaviors based on the motion command
952 * command if N or n was used as the motion.
954 vp->rkp = motion.kp;
957 * Motion commands can reset all of the cursor information.
958 * If the motion is in the reverse direction, switch the
962 if (motion.m_start.lno > motion.m_stop.lno ||
963 (motion.m_start.lno == motion.m_stop.lno &&
964 motion.m_start.cno > motion.m_stop.cno)) {
965 vp->m_start = motion.m_stop;
966 vp->m_stop = motion.m_start;
968 vp->m_start = motion.m_start;
969 vp->m_stop = motion.m_stop;
971 vp->m_final = motion.m_final;
975 * If the command sets dot, save the motion structure. The motion
980 *dm = motion;