From bc7d1987d389d3a7870e620ecba25970fac437e2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 13 Jun 2019 14:13:06 +1200 Subject: Add version number tag reference links to vimrc --- vim/vimrc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'vim') diff --git a/vim/vimrc b/vim/vimrc index 629ab631..5bb0602d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -135,6 +135,8 @@ endif " It should rename the buffer as "foo bar aaz"; note the change in the first " letter of the last word of the filename. " +" +" if $MYVIM =~# '\\' \ && (v:version < 701 || v:version == 701 && !has('patch55')) echoerr 'Illegal backslash in user runtime path on Vim < v7.1.055' @@ -209,6 +211,8 @@ augroup vimrc " invocations of :source of either vimrc file, and translate that into " reloading the stub vimrc. " + " + " if exists('##SourceCmd') autocmd SourceCmd $MYVIMRC,$MYVIM/vimrc \ ReloadVimrc @@ -235,6 +239,8 @@ augroup END " with restrictive permissions, too. Who knows what secrets are in your file " buffers? " +" +" function! s:Establish(path) abort let path = expand(a:path) if !isdirectory(path) && exists('*mkdir') @@ -274,6 +280,8 @@ Establish $MYVIM " Vim v8.1.716 introduced a nicer way to set this with an option named " 'viminfofile', which is too new for us to use just yet. " +" +" Establish $MYVIM/cache set viminfo+=n$MYVIM/cache/viminfo @@ -314,6 +322,8 @@ set backup " value in older versions of Vim where they don't do anything, so we'll check " the version ourselves to see if there's any point in including them. " +" +" " It's all so awkward. Surely separate options named something like " 'backupfullname', 'swapfilefullname' would have been clearer. " @@ -482,6 +492,8 @@ set shiftwidth=4 " Indent command like < and > use four-space indents " Vim is new enough to support it (v7.3.693), apply a negative value to do " this dynamically if 'shiftwidth' changes. " +" +" if v:version > 730 || v:version == 730 && has('patch693') set softtabstop=-1 else @@ -532,6 +544,8 @@ endif " The 'breakindent' option wasn't added until v7.4.338, so we need to check it " exists before we set it. " +" +" if exists('+breakindent') set breakindent endif @@ -606,6 +620,8 @@ set formatoptions+=1 " suppress errors for this sort of thing when I can reasonably avoid it, even " if the tests are somewhat more verbose. " +" +" if v:version > 730 || v:version == 730 && has('patch541') set formatoptions+=j endif @@ -644,7 +660,7 @@ set cpoptions+=J " does. I wrote the patch that added it, after becoming envious of an " analogous feature during an ill-fated foray into GNU Emacs usage. " -" +" " if has('patch-8.1.728') set formatoptions+=p @@ -911,6 +927,8 @@ set wildignore=*~,#*#,*.7z,.DS_Store,.git,.hg,.svn,*.a,*.adf,*.asc,*.au,*.aup " The option wasn't added until v7.3.72, so we need to check it exists before " we try to set it. " +" +" if exists('+wildignorecase') set wildignorecase endif -- cgit v1.2.3