diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-06-06 15:39:39 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-06-06 15:39:39 +0200 |
commit | 1e0654c08b69448dc8c0537a5dd57ce98843967b (patch) | |
tree | af83ef8d20de7d8d5bb7422340e3bc891c8f3539 | |
parent | 1ba3574cefc5b9b56ea8456a9645a5723586334b (diff) | |
parent | 0dc9b50d09a43f90cfba9a5140a54ee6d682d341 (diff) | |
download | dotfiles-1e0654c08b69448dc8c0537a5dd57ce98843967b.tar.gz |
Merge branch 'master' of github.com:kompetenzbolzen/vimconfig
-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 |