diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-06-04 14:02:21 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-06-04 14:02:21 +0200 |
commit | 0dc9b50d09a43f90cfba9a5140a54ee6d682d341 (patch) | |
tree | caa46cecef1f5ef8c655aae9d948f43e5a380324 /.vim | |
parent | d1b874d8f5d83a6ddfbde86d55ff70ad29c4584e (diff) | |
download | dotfiles-0dc9b50d09a43f90cfba9a5140a54ee6d682d341.tar.gz |
Command FileHEader
Diffstat (limited to '.vim')
-rw-r--r-- | .vim/vimrc | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -78,8 +78,6 @@ nmap <silent> gn :tabnew<CR>:e .<CR> " COMMANDS " =========== -command -bar InsertHeader call Fileheader() - command -bar Suw :w !SUDO_ASKPASS="/usr/lib/ssh/ssh-askpass" sudo -A tee % " Command HEXMODE @@ -91,11 +89,18 @@ command! MakeTags !ctags -R . command -bar Newterm call Run_in_terminal("") command -bar Runbuffer call Run_in_terminal(expand("%:p")) command -bar Make call Run_in_terminal("make") +command -bar Fileheader call Insert_Header(expand("%")) " =========== " FUNCTIONS " =========== +function Insert_Header(name) + let l:year=system("date +%Y") + call append("0", ["/*", " * ".a:name, " * (c) ".strftime("%Y"), " * License: ", "*/"]) + startinsert +endfunction + function Run_in_terminal(prog) tabnew execute "terminal " . a:prog |