aboutsummaryrefslogtreecommitdiffstats
path: root/vim/vimrc
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-07-08 09:53:07 +0100
committerMatthew Lemon <y@yulqen.org>2024-07-08 09:53:07 +0100
commit38d4467707e401f641528067ced7f137fec5a5e7 (patch)
tree0955b6acb59a11eb94aa26c564cf4c25ebad21cb /vim/vimrc
parent061478b4c6401a5f83458b5abd60e55fa81a08c5 (diff)
Date shortcuts in vim
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc8
1 files changed, 2 insertions, 6 deletions
diff --git a/vim/vimrc b/vim/vimrc
index b4573f7..040ecb9 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -8,7 +8,9 @@ runtime macros/matchit.vim "allows jumping between brackets with % in normal mod
" Leaders {{{
let maplocalleader = "\\"
let mapleader = ","
+nnoremap <leader>tsk 0i- [ ]
nnoremap <silent> <leader>idate :.!date +"\%F"<CR>Ea<space>
+nnoremap <silent> <leader>mdate :.!date -Iminutes<CR>Ea<space>
nnoremap <leader>q :call TaskWarriorAddCurrentLine()<CR>
" nnoremap <C-h> :tabprevious<cr>
" nnoremap <C-l> :tabnext<cr>
@@ -25,12 +27,6 @@ if (exists("*strftime"))
noremap <silent> <leader>date "=strftime("%F")<CR>p9h
noremap <silent> <leader>time "=strftime("%X")<CR>p7h
endif
-
-" Place timestamps, be it date (YYYY-MM-DD) or time (HH:MM:SS).
-if (exists("*strftime"))
- noremap <silent> <leader>date "=strftime("%F")<CR>p9h
- noremap <silent> <leader>time "=strftime("%X")<CR>p7h
-endif
" Generate ctags for current working directory
nnoremap <leader>tt :silent !ctags -R . <CR>:redraw!<CR>
" notes stuff - from https://www.edwinwenink.xyz/posts/43-notes_tagging/