[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: outline-mode to recognize Vim-type foldmarkers {{{1 {{{2 {{{3
From: |
Teemu Likonen |
Subject: |
Re: outline-mode to recognize Vim-type foldmarkers {{{1 {{{2 {{{3 |
Date: |
Thu, 27 Nov 2008 12:44:48 GMT |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Andreas Politz (2008-11-27 00:03 +0100) wrote:
> ;; vim outline
>
> Eval the next 2 expressions in the buffers context.
>
> ;; (set (make-local-variable 'outline-regexp) ".*{{{\\([0-9]+\\)")
> ;; (set (make-local-variable 'outline-level) 'vim-outline-level)
>
> (defun vim-outline-level ()
> (save-excursion
> (re-search-forward "{{{\\([0-9]+\\)" nil t)
> (string-to-number (match-string 1))))
Thanks, and nice to hear that it wasn't very difficult.