2

I like to take minutes for meetings using vim+Markdown(CommonMark)

I like having something like this

# Meeting Name - 2018-02-25

The way I accomplish this is

i# Meeting Name - ^[:put =strftime('%F')<cr>kJ

Is there a better way? I know you can do :-1put ... and it will put things on the previous line, but is there a way to :put at the end of the line? (obviously I could make a macro/map, but is there a better way with just put?)

Wayne Werner
  • 425
  • 2
  • 7

1 Answers1

3

Why stick to put?

There is a nice alternative to it, like :

i#Meeting Name - ^R=strftime("%F")<cr>

btw: Your example seems to be missing a <cr> after the )

Rich
  • 31,891
  • 3
  • 72
  • 139
Naumann
  • 2,759
  • 1
  • 11
  • 16
  • 1
    It might be worth to link to :h i_CTRL-R and specifically :h i_CTRL-R_= – statox Feb 26 '18 at 10:19
  • Nice! This totally works - I hadn't heard of ^r - and @statox thanks for linking to that docs, because that's way more useful than I imagined! There are a number of times that I've done itype some things <esc>pAtype some more things. – Wayne Werner Feb 26 '18 at 17:20
  • 1
    @WayneWerner Actually everything is in the doc, once you read it you (almost) don't need this site anymore ;) Have a look at this excellent question about how to navigate in the doc, it might save you a lot of googling in the future. – statox Feb 26 '18 at 17:40