aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-06-06 15:39:39 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-06-06 15:39:39 +0200
commit1e0654c08b69448dc8c0537a5dd57ce98843967b (patch)
treeaf83ef8d20de7d8d5bb7422340e3bc891c8f3539
parent1ba3574cefc5b9b56ea8456a9645a5723586334b (diff)
parent0dc9b50d09a43f90cfba9a5140a54ee6d682d341 (diff)
downloaddotfiles-1e0654c08b69448dc8c0537a5dd57ce98843967b.tar.gz
Merge branch 'master' of github.com:kompetenzbolzen/vimconfig
-rw-r--r--.vim/vimrc9
1 files changed, 7 insertions, 2 deletions
diff --git a/.vim/vimrc b/.vim/vimrc
index c6b1f0d..23daddd 100644
--- a/.vim/vimrc
+++ b/.vim/vimrc
@@ -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