On Wednesday, January 21, 2015 at 4:45:29 PM UTC-6, Oscar wrote:
> normal(zR)
> endfunction
>
> Of course I did *not* want to do this for every file, but before I could
> move that piece of code out of .vimrc, I noticed something strange: when
> opening a lot of files, even ones with no folds, vim would *not* start
> in the file's first line. The most notorious case was mutt: vim would
> start in the first non-blank line (either the signature line or the
> "Reply Original in..." line if replying to a previous mail).
>
"normal" is not a function, it's an ex command. Interactively, you would invoke it like :normal zR
Instead, you did :normal (zR)
That is:
( - jump back a "sentence"
zR - open all folds
) - jump forward a "sentence"
Depending on where Vim thinks the first "sentence" ends in your file (which is probably not prose with an actual sentence structure) this could place you pretty far into the document.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wednesday, January 21, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment