Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Hello. I tried the first, but it doesn't quite work. I should have been clearer; I don't want to insert the <CR>, as I want to leave the cursor in place to finish off the filename manually. But when I remove it, it just opens a command-line and inserts the literal text =strftime('%F'). Am I doing something wrong? Commented Aug 5, 2014 at 12:01
  • The second doesn't work either; I just get the error "Unknown mark". Commented Aug 5, 2014 at 12:02
  • Correction, the second does work; I made a typo. Commented Aug 5, 2014 at 12:03
  • I've considered that (in the first mapping, too); the <CR> is just to conclude the <C-r>= expression. Try it out! Commented Aug 5, 2014 at 12:41
  • Huh. Just tried the first one again and it worked this time. I guess I'm just typo-prone. Sorry! Thanks for the help in figuring this out, I just learnt about <expr> in mappings :) Commented Aug 6, 2014 at 10:33