aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/config/command.vim9
-rw-r--r--vim/config/file.vim5
-rw-r--r--vim/config/format.vim5
3 files changed, 19 insertions, 0 deletions
diff --git a/vim/config/command.vim b/vim/config/command.vim
index f339635f..09ee0f40 100644
--- a/vim/config/command.vim
+++ b/vim/config/command.vim
@@ -25,3 +25,12 @@ set shellpipe=>
if exists('+shellslash')
set shellslash
endif
+
+" \d inserts the current local date from date(1)
+nnoremap <silent>
+ \ <Leader>d
+ \ :<C-U>read !date<CR>
+" \D inserts the current UTC date from date(1)
+nnoremap <silent>
+ \ <Leader>D
+ \ :<C-U>read !date -u<CR>
diff --git a/vim/config/file.vim b/vim/config/file.vim
index 4bf1f86b..a0c99f6c 100644
--- a/vim/config/file.vim
+++ b/vim/config/file.vim
@@ -3,6 +3,11 @@ if has('autocmd')
filetype plugin indent on
endif
+" Bind \p to show filetype
+nnoremap <silent>
+ \ <Leader>p
+ \ :<C-U>set filetype?<CR>
+
" Use all ancestors of current directory for :find
if has('file_in_path')
set path=**
diff --git a/vim/config/format.vim b/vim/config/format.vim
index e266f42a..e1da2d0b 100644
--- a/vim/config/format.vim
+++ b/vim/config/format.vim
@@ -2,6 +2,11 @@
" leaders when joining lines
silent! set formatoptions+=j
+" Show the current formatoptions at a glance
+noremap <silent>
+ \ <Leader>f
+ \ :<C-U>setlocal formatoptions?<CR>
+
" Use toggle_option_flag.vim plugin to bind quick toggle actions for some
" 'formatoptions' flags
if has('user_commands')