diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-13 10:59:31 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-13 10:59:31 +1200 |
commit | e65d1e0790768fdf265650f5b12880805ce601f1 (patch) | |
tree | f099f23052a2323b59ebe472872e66a4d3f29e77 /vim/vimrc | |
parent | Merge branch 'release/v0.51.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-e65d1e0790768fdf265650f5b12880805ce601f1.tar.gz dotfiles-e65d1e0790768fdf265650f5b12880805ce601f1.zip |
Merge branch 'release/v0.52.0'v0.52.0
* release/v0.52.0:
Bump VERSION
Use proper version test for 'fo' j
Check for +unix before binding date commands
Correct Mutt filename pattern
Add Ruby shebang
Don't require num suffix to Python shebang word
Accept "5" as suffix to Perl shebang word
Add TCL shebang handling
Lots of extension to filetype.vim
Rename terminfo files to *.ti extension
Add .wgetrc Vim filetype
Add crontab(5) Vim filetype
Apply t_cm hack to Makefile Vim invocation
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -85,10 +85,13 @@ if has('cmdline_info') 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> +" Current date and time insertion commands, requiring POSIX date(1) +if has('unix') + " \d: Local + nnoremap <silent> <Leader>d :<C-U>read !date<CR> + " \D: UTC + nnoremap <silent> <Leader>D :<C-U>read !date -u<CR> +endif " Don't try to complete strings from included files, just use the strings in " the open buffers; I'll open the file if I want to complete from it @@ -182,8 +185,10 @@ nnoremap <silent> ZA :<C-U>wall!<CR> set nrformats-=octal " Try to set the 'j' flag for 'formatoptions', to automatically delete comment -" leaders when joining lines -silent! set formatoptions+=j +" leaders when joining lines, if supported +if v:version >= 704 || v:version == 703 && has('patch541') + set formatoptions+=j +endif " \f shows the current formatoptions at a glance nnoremap <silent> <Leader>f :<C-U>setlocal formatoptions?<CR> |