From 4859fdb5a9d319d743078ca413e43cd95e766226 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Wed, 11 May 2022 00:56:13 +0200 Subject: [PATCH] Update vim functions --- .vimrc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 86e3c26..b317b80 100644 --- a/.vimrc +++ b/.vimrc @@ -30,14 +30,23 @@ set ar " Autoread " Functions ____________________________ " Toggle line numbers -fu! ToggleRnu() " toggle: no numbers - relative nummbers - if(&nu) | se nonu nornu | else | se nu rnu | endif +fu! ToggleLineNumbers() + set nu! rnu! " toggle: no numbers - relative nummbers endfu " https://alok.github.io/2018/04/26/using-vim-s-conceal-to-make-languages-more-tolerable/ fu! ToggleConceal() if (&cole == 0) | se cole =2 | else | set cole =0 | endif endfu + +" Insert date +fu! Today() + :put =strftime('%d %b %Y') +endfu + +" Add command line functions names +com! -nargs=0 Today :call Today() +com! -nargs=0 ToggleLineNumbers :call ToggleLineNumbers() com! -nargs=0 ToggleConceal :call ToggleConceal() " Keybindings