• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/emulation/

Lines Matching +defs:beginning +defs:of +defs:buffer

6 ;; This file is part of GNU Emacs.
19 ;; 1) Add a global key binding for command "vi-mode" (I use ESC ESC instead of
25 ;; after a file is loaded into the buffer. For example, I defined it as:
77 "Switch the major mode of current buffer as specified by the following char \\{vi-tilde-map}"
81 (with-output-to-temp-buffer "*Help*"
84 (set-buffer standard-output)
114 "Toggle current buffer's readonly flag."
116 (setq buffer-read-only (not buffer-read-only)))
120 Command state includes most of the vi editing commands, with some Emacs
164 (define-key vi-com-map "$" 'end-of-line)
176 (define-key vi-com-map "0" 'beginning-of-line)
196 (define-key vi-com-map "A" 'vi-append-at-end-of-line)
198 (define-key vi-com-map "C" 'vi-change-rest-of-line)
200 (define-key vi-com-map "E" 'vi-end-of-blank-delimited-word)
235 (define-key vi-com-map "e" 'vi-end-of-word)
237 (define-key vi-com-map "g" 'vi-beginning-of-buffer) ; extension
274 (put 'end-of-line 'point-moving-unit 'char)
283 (put 'beginning-of-line 'point-moving-unit 'char)
284 (put 'vi-beginning-of-buffer 'point-moving-unit 'char)
288 (put 'vi-end-of-blank-delimited-word 'point-moving-unit 'match)
300 (put 'vi-end-of-word 'point-moving-unit 'match)
317 (put 'mark-whole-buffer 'point-moving-unit 'region)
318 (put 'mark-end-of-sentence 'point-moving-unit 'region)
323 "Alist of (NAME . MARK), marks are local to each buffer.")
326 "Default amount of lines for scrolling (used by \"^D\"/\"^U\").")
335 "Length of last insertion.")
385 "Setup a buffer for vi-mode by creating necessary buffer-local variables."
413 The purpose of this mode is to provide you the combined power of vi (namely,
414 the \"cross product\" effect of commands and repeat last changes) and Emacs.
436 Also, no automatic wrap around at end of buffer for pattern searching.
448 esc-map or set undefined. These can give you the full power of Emacs.
451 `vi-mark-region', and 'vi-quote-words'. Some of them are quite handy.
456 (if (null vi-mode-old-major-mode) ; very first call for current buffer
471 (vi-end-of-insert-state))))
491 w C-x C-s (save-buffer)
502 (with-output-to-temp-buffer "*Help*"
505 (set-buffer standard-output)
537 (defun vi-end-of-insert-state ()
545 (let ((str (buffer-substring vi-ins-point (point))))
556 (let ((str (buffer-substring begin end)))
581 "kill specified number of lines (=d$), text saved in the kill ring."
591 (defun vi-append-at-end-of-line (arg)
592 "go to end of line and then go into vi insert state."
594 (vi-goto-insert-state arg '(end-of-line) t))
596 (defun vi-change-rest-of-line (arg)
597 "Change the rest of (ARG) lines (= c$ in vi)."
611 (or (beginning-of-line)
620 (or (end-of-line)
643 (end-of-buffer))
646 (defun vi-beginning-of-buffer ()
647 "Move point to the beginning of current buffer."
699 use those instead of the ones saved."
714 If the optional search args are given, use those instead of the ones saved."
747 (beginning-of-line 1)
794 (ding) ; no moving, already at end of buffer
801 (ding))) ; no moving, already at end of buffer
824 "Get following character (could be any CHAR) as part of the prefix argument.
871 "Return the raw value of numeric part prefix argument."
875 "Return numeric meaning of the raw prefix argument. This is a modification
883 is given, it is used instead of the saved one."
891 "Find in DIRECTION (1/-1) for CHAR of COUNT'th times on current line.
911 it is used instead of the saved one."
942 (defun vi-end-of-word (count)
943 "Move forward until encountering the end of a word.
978 "Get the char part of the current prefix argument."
986 the key bindings of the operators being fixed."
1012 (vi-set-last-change-command 'vi-delete-op (vi-repeat-command-of motion-command) arg)))
1016 (vi-repeat-command-of motion-command) arg) nil)))
1019 (vi-set-last-change-command 'vi-yank-op (vi-repeat-command-of motion-command) arg)))
1022 (vi-set-last-change-command 'vi-shell-op (vi-repeat-command-of motion-command) arg vi-last-shell-command)))
1025 (vi-set-last-change-command 'vi-shift-op (vi-repeat-command-of motion-command) arg (- vi-shift-width))))
1028 (vi-set-last-change-command 'vi-shift-op (vi-repeat-command-of motion-command) arg vi-shift-width)))
1031 (vi-set-last-change-command 'vi-indent-op (vi-repeat-command-of motion-command) arg)))
1035 (defun vi-repeat-command-of (command)
1043 "Return (begin . end) of the range spanned by executing the given
1066 (goto-char begin) (beginning-of-line) (setq begin (point))
1067 (goto-char end) (next-line 1) (beginning-of-line) (setq end (point))))
1068 (if (> end (point-max)) (setq end (point-max))) ; force in buffer region
1129 (progn (next-line 1) (beginning-of-line))
1130 (beginning-of-line))
1147 If char argument is given, it directs the output to a *temp* buffer."
1191 "Return contents of vi mark register named CHAR, or nil if undefined."
1195 "Set contents of vi mark register named CHAR to current point.
1225 (defun vi-end-of-blank-delimited-word (count)
1226 "Forward to the end of the COUNT'th blank-delimited word."
1232 "To window home or arg'th line from the top of the window."
1238 "To window last line or arg'th line from the bottom of the window."
1244 "To the middle line of the window."
1250 "Stop at the beginning of the COUNT'th words from point."
1262 it is used instead of the current `last-change-command'."
1280 The following char specifies unit of objects to be
1283 For the use of the prefix-arg, refer to individual functions called."
1310 "Move current line to the top/center/bottom of the window."
1320 "Go to given column of the current line."
1323 (beginning-of-line)
1343 (str (buffer-substring (nth 0 args) (nth 1 args)))
1358 "Change the case of the char after point."
1382 p(aragraph), P(age), f(unction in C/Pascal etc.), w(ord), e(nd of sentence),
1387 ((char-equal region ?b) (mark-whole-buffer))
1392 ((char-equal region ?e) (mark-end-of-sentence arg))
1399 "Mark NUM of lines from current line as current region."
1400 (beginning-of-line 1)
1402 (end-of-line num))
1409 (cond ((char-equal unit ?b) (call-interactively 'spell-buffer))
1423 ; of case-fold-search
1440 (message "Enter any of [,{,(,<,\",',`,* as quoting character.")
1450 (vi-end-of-word arg)
1456 It assumes a `(def..' always starts at the beginning of a line."
1460 (setq name (buffer-substring (progn (vi-backward-blank-delimited-word 1)
1463 (progn (vi-end-of-blank-delimited-word 1)