Function: viper-skip-separators

viper-skip-separators is a byte-compiled function defined in viper-cmd.el.gz.

Signature

(viper-skip-separators FORWARD)

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-cmd.el.gz
;;; Word command

;; Words are formed from alpha's and nonalphas - <sp>,\t\n are separators for
;; word movement.  When executed with a destructive command, \n is usually left
;; untouched for the last word.  Viper uses syntax table to determine what is a
;; word and what is a separator.  However, \n is always a separator.  Also, if
;; viper-syntax-preference is 'vi, then `_' is part of the word.

;; skip only one \n
(defun viper-skip-separators (forward)
  (if forward
      (progn
	(viper-skip-all-separators-forward 'within-line)
	(if (looking-at "\n")
	    (progn
	      (forward-char)
	      (viper-skip-all-separators-forward  'within-line))))
    ;; check for eob and white space before it.  move off of eob
    (if (and (eobp) (save-excursion
		      (viper-backward-char-carefully)
		      (viper-looking-at-separator)))
	(viper-backward-char-carefully))
    (viper-skip-all-separators-backward 'within-line)
    (viper-backward-char-carefully)
    (if (looking-at "\n")
	(viper-skip-all-separators-backward 'within-line)
      (or (viper-looking-at-separator) (forward-char)))))