42 Header Vim Review

function! Update42Date() " Find the 'Updated:' line and replace with current timestamp execute "silent! %s/Updated: .*$/Updated: " . strftime("%Y/%m/%d %H:%M:%S") . " by " . g:user42 . "/e" endfunction

Leo looked around. The first line of hex read: 7f 45 4c 46 — the ELF magic number. 42 header vim

Don't like using F1 ? Maybe your laptop's touch bar makes F1 hard to reach. You can remap the header command in your .vimrc . The internal command for the 42 header is usually :Stdheader . Add this to your .vimrc to use h instead: function

This will call the :Stdheader command automatically when you create a new source file. strftime("%Y/%m/%d %H:%M:%S")

This is useful if you want to keep your environment variables separate from your school configuration. Usage & Shortcuts