Added Keymap for date insert
This commit is contained in:
@@ -69,7 +69,7 @@ keymap("c", "<c-k>", "<c-p>", opts)
|
||||
-- open the current file in the default program
|
||||
keymap("n", "<leader>x", [[:!xdg-open %<cr><cr>]], opts)
|
||||
|
||||
-- -- no ex mode for me
|
||||
-- -- no ex mode for me - Q reformats long lines (auto-wrap)
|
||||
keymap("n", "Q", "gq", opts)
|
||||
keymap("x", "Q", "gq", opts)
|
||||
|
||||
@@ -93,14 +93,12 @@ keymap("n", "<esc>", ":nohlsearch<cr><esc>", opts)
|
||||
|
||||
-- toggle spell checking
|
||||
keymap("n", "<leader>s", ":setlocal spell! spelllang=en_us,nl<cr>", opts)
|
||||
|
||||
-- date time stamp
|
||||
keymap("n", "<leader>dt", [[i<c-r>=strftime("%a %d %Y %H:%M")<cr><space>]], opts)
|
||||
keymap("n", "<leader>dt", [[i<c-r>=strftime("%d.%m.%Y")<cr><space>]], opts)
|
||||
|
||||
-- double space over word to find and replace
|
||||
keymap("n", "<space><space>", [[:%s/\<<c-r>=expand("<cword>")<cr>\>/]], opt)
|
||||
|
||||
-- search and replace all
|
||||
-- write file if you forgot to give it sudo permission
|
||||
keymap("c", "w!!", [[w !sudo tee %]], opt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user