aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-05-31 22:03:54 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-05-31 22:03:54 +1200
commit08fa9c60db6690205474b501ce5b407ddc003ae3 (patch)
tree619e1469db287cbcc817ceeda8bbb56bc8c10d77
parent7843887019e23564a6ea4ca8fb0d8432f97635f0 (diff)
parentdb51ea4e96cda266ad0cb99301d57a874d9cd077 (diff)
downloaddotfiles-0.38.0.tar.gz (sig)
dotfiles-0.38.0.zip
Merge branch 'release/v0.38.0'v0.38.0
* release/v0.38.0: Bump VERSION Rebuild dotfiles(7) manual Update README.md about Vim plugins Correct comment typo Merge auto_*dir.vim plugins into one, spun out
-rw-r--r--.gitmodules3
-rw-r--r--Makefile38
-rw-r--r--README.md15
-rw-r--r--VERSION4
-rw-r--r--man/man7/dotfiles.7df18
m---------vim/bundle/auto_cache_dirs0
-rw-r--r--vim/config/backup.vim5
-rw-r--r--vim/config/swapfile.vim5
-rw-r--r--vim/config/undo.vim2
-rw-r--r--vim/doc/auto_backupdir.txt28
-rw-r--r--vim/doc/auto_swapdir.txt28
-rw-r--r--vim/doc/auto_undodir.txt29
-rw-r--r--vim/plugin/auto_backupdir.vim57
-rw-r--r--vim/plugin/auto_swapdir.vim57
-rw-r--r--vim/plugin/auto_undodir.vim60
15 files changed, 30 insertions, 319 deletions
diff --git a/.gitmodules b/.gitmodules
index e5d27293..53d12410 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,7 @@
# My Vim plugins
+[submodule "vim/bundle/auto_cache_dirs"]
+ path = vim/bundle/auto_cache_dirs
+ url = https://sanctum.geek.nz/code/vim-auto-cache-dirs.git
[submodule "vim/bundle/big_file_options"]
path = vim/bundle/big_file_options
url = https://sanctum.geek.nz/code/vim-big-file-options.git
diff --git a/Makefile b/Makefile
index 810da7a7..2b494a91 100644
--- a/Makefile
+++ b/Makefile
@@ -73,11 +73,7 @@
lint-sh \
lint-urxvt \
lint-vim \
- lint-xinit \
- dist-vim-plugin \
- dist-vim-plugin-auto-backupdir \
- dist-vim-plugin-auto-swapdir \
- dist-vim-plugin-auto-undodir
+ lint-xinit
.SUFFIXES:
.SUFFIXES: .awk .bash .m4 .mi5 .pl .sed .sh
@@ -496,11 +492,9 @@ install-vim: install-vim-after \
install-vim-bundle \
install-vim-compiler \
install-vim-config \
- install-vim-doc \
install-vim-ftdetect \
install-vim-ftplugin \
- install-vim-indent \
- install-vim-plugin
+ install-vim-indent
install-vim-after: install-vim-after-ftplugin \
install-vim-after-indent \
@@ -538,10 +532,6 @@ install-vim-config:
cp -p -- vim/vimrc $(VIMRC)
cp -p -- vim/config/*.vim $(VIMDIR)/config
-install-vim-doc:
- mkdir -p -- $(VIMDIR)/doc
- cp -p -- vim/doc/*.txt $(VIMDIR)/doc
-
install-vim-ftdetect:
mkdir -p -- $(VIMDIR)/ftdetect
cp -p -- vim/ftdetect/*.vim $(VIMDIR)/ftdetect
@@ -554,10 +544,6 @@ install-vim-indent:
mkdir -p -- $(VIMDIR)/indent
cp -p -- vim/indent/*.vim $(VIMDIR)/indent
-install-vim-plugin:
- mkdir -p -- $(VIMDIR)/plugin
- cp -p -- vim/plugin/*.vim $(VIMDIR)/plugin
-
install-vim-gui: install-vim \
install-vim-gui-config
@@ -657,23 +643,3 @@ lint-vim:
lint-xinit: check-xinit
sh lint/xinit.sh
-
-dist-vim-plugin: dist-vim-plugin-auto-backupdir \
- dist-vim-plugin-auto-swapdir \
- dist-vim-plugin-auto-undodir
-
-dist-vim-plugin-auto-backupdir: \
- vim/plugin/auto_backupdir.vim \
- vim/doc/auto_backupdir.txt \
- VERSION
- sh dist/vim-plugin.sh auto_backupdir
-dist-vim-plugin-auto-swapdir: \
- vim/plugin/auto_swapdir.vim \
- vim/doc/auto_swapdir.txt \
- VERSION
- sh dist/vim-plugin.sh auto_swapdir
-dist-vim-plugin-auto-undodir: \
- vim/plugin/auto_undodir.vim \
- vim/doc/auto_undodir.txt \
- VERSION
- sh dist/vim-plugin.sh auto_undodir
diff --git a/README.md b/README.md
index 82cc5dfd..5a67c28c 100644
--- a/README.md
+++ b/README.md
@@ -348,24 +348,23 @@ realized I'd forgotten what half of it did.
If the logic for doing something involves more than a few lines or any
structures like functions, I like to implement it as a plugin in
-`~/.vim/plugin` and/or `~/.vim/autoload`. There's documentation for each of
-those in `~/.vim/doc`.
+`~/.vim/plugin` and/or `~/.vim/autoload`, with documentation for each in
+`~/.vim/doc`.
They eventually get either discarded or spun off into their own repositories,
added to this repository as submodules instead, and uploaded to
[vim.org](https://www.vim.org/account/profile.php?user_id=73687).
-You can create distribution packages for whatever's still in here with `make
-dist-vim-plugin`; they will be created in `vim/dist`.
-
-All plugins and colorschemes with their own repositories are installed as
-submodules in `~/.vim/bundle`. They are installed into `~/.vim` as normal.
+In the current version, there are no local plugins; everything's got its own
+repository. All plugins and colorschemes are available as submodules in
+`~/.vim/bundle`. They are installed into `~/.vim`.
I also define a few rules specific to file types I often edit in
`~/.vim/after/ftplugin`, including some local mappings for checking, linting,
and tidying, and a few more in `~/.vim/after/indent`. There are also a few
tweaks to core syntax files in `~/.vim/after/syntax`, especially for shell
-script (`sh.vim`).
+script (`sh.vim`). Some/all of these filetype plugins are also due to be
+separately distributed and installed via submodules instead.
#### Neovim
diff --git a/VERSION b/VERSION
index d5957126..ca7eeb51 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v0.37.1
-Thu May 31 06:26:59 UTC 2018
+tejr dotfiles v0.38.0
+Thu May 31 10:03:28 UTC 2018
diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df
index b46167e8..c215ae80 100644
--- a/man/man7/dotfiles.7df
+++ b/man/man7/dotfiles.7df
@@ -487,21 +487,19 @@ day and realized I'd forgotten what half of it did.
.PP
If the logic for doing something involves more than a few lines or any
structures like functions, I like to implement it as a plugin in
-\f[C]~/.vim/plugin\f[] and/or \f[C]~/.vim/autoload\f[].
-There's documentation for each of those in \f[C]~/.vim/doc\f[].
+\f[C]~/.vim/plugin\f[] and/or \f[C]~/.vim/autoload\f[], with
+documentation for each in \f[C]~/.vim/doc\f[].
.PP
They eventually get either discarded or spun off into their own
repositories, added to this repository as submodules instead, and
uploaded to
vim.org (https://www.vim.org/account/profile.php?user_id=73687).
.PP
-You can create distribution packages for whatever's still in here with
-\f[C]make\ dist\-vim\-plugin\f[]; they will be created in
-\f[C]vim/dist\f[].
-.PP
-All plugins and colorschemes with their own repositories are installed
-as submodules in \f[C]~/.vim/bundle\f[].
-They are installed into \f[C]~/.vim\f[] as normal.
+In the current version, there are no local plugins; everything's got its
+own repository.
+All plugins and colorschemes are available as submodules in
+\f[C]~/.vim/bundle\f[].
+They are installed into \f[C]~/.vim\f[].
.PP
I also define a few rules specific to file types I often edit in
\f[C]~/.vim/after/ftplugin\f[], including some local mappings for
@@ -510,6 +508,8 @@ checking, linting, and tidying, and a few more in
There are also a few tweaks to core syntax files in
\f[C]~/.vim/after/syntax\f[], especially for shell script
(\f[C]sh.vim\f[]).
+Some/all of these filetype plugins are also due to be separately
+distributed and installed via submodules instead.
.SS Neovim
.PP
I test my configuration every now and then with the Neovim
diff --git a/vim/bundle/auto_cache_dirs b/vim/bundle/auto_cache_dirs
new file mode 160000
+Subproject 1bfe208f58f055f605806d7f5f05a208ae643ce
diff --git a/vim/config/backup.vim b/vim/config/backup.vim
index 8735a094..cf2d63ba 100644
--- a/vim/config/backup.vim
+++ b/vim/config/backup.vim
@@ -1,9 +1,10 @@
" Default to no backup files at all, in a way that even ancient/tiny Vims will
-" understand; the auto_backupdir.vim plugin will take care of re-enabling this
+" understand; the auto_cache_dirs.vim plugin will take care of re-enabling
+" this with a 'backupdir' setting
set nobackup
set nowritebackup
-" If backps are enabled, use a more explicit and familiar backup suffix
+" If backups are enabled, use a more explicit and familiar backup suffix
set backupext=.bak
" Don't back up files in anything named */shm/; they might be password
diff --git a/vim/config/swapfile.vim b/vim/config/swapfile.vim
index bf91aa6b..de0598c2 100644
--- a/vim/config/swapfile.vim
+++ b/vim/config/swapfile.vim
@@ -1,5 +1,6 @@
-" Default to no swapfile files at all, in a way that even ancient/tiny Vims
-" will understand; the auto_swapdir.vim plugin will take care of this
+" Default to no swap files at all, in a way that even ancient/tiny Vims will
+" understand; the auto_cache_dirs.vim plugin will take care of re-enabling
+" this with a 'directory' setting
set noswapfile
" Don't keep swap files from temporary directories or shared memory in case
diff --git a/vim/config/undo.vim b/vim/config/undo.vim
index f85d9d8c..b9186d6f 100644
--- a/vim/config/undo.vim
+++ b/vim/config/undo.vim
@@ -5,7 +5,7 @@ inoremap <C-c> <C-c>u
set undolevels=2000
" 'undodir' and 'undofile' settings will be taken care of by the
-" auto_undodir.vim plugin if applicable/possible
+" auto_cache_dirs.vim plugin if applicable/possible
if has('persistent_undo')
" Turn off the option by default
diff --git a/vim/doc/auto_backupdir.txt b/vim/doc/auto_backupdir.txt
deleted file mode 100644
index 2990332e..00000000
--- a/vim/doc/auto_backupdir.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-*auto_backupdir.txt* For Vim version 7.0 Last change: 2017 November 12
-
-DESCRIPTION *auto_backupdir*
-
-This plugin attempts to create a directory "backup" in the directory named by
-the first element of 'realtimepath', and enables 'backup' with that as the
-'backupdir' if it succeeds or if the directory already exists.
-
-REQUIREMENTS *auto_backupdir-requirements*
-
-This plugin is only available if 'compatible' is not set.
-
-AUTHOR *auto_backupdir-author*
-
-Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
-
-LICENSE *auto_backupdir-license*
-
-Licensed for distribution under the same terms as Vim itself (see |license|).
-
-DISTRIBUTION *auto_backupdir-distribution*
-
-This plugin lives in Tom Ryder's "dotfiles" suite, and may eventually be spun
-off into a separate distribution as it solidifies and this documentation
-improves. See <https://sanctum.geek.nz/cgit/dotfiles.git/about/> for more
-information.
-
- vim:tw=78:ts=8:ft=help:norl:
diff --git a/vim/doc/auto_swapdir.txt b/vim/doc/auto_swapdir.txt
deleted file mode 100644
index a5b8f274..00000000
--- a/vim/doc/auto_swapdir.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-*auto_swapdir.txt* For Vim version 7.0 Last change: 2017 November 12
-
-DESCRIPTION *auto_swapdir*
-
-This plugin attempts to create a directory "swap" in the directory named by
-the first element of 'runtimepath', and enables 'swapfile' with that as the
-'directory' if it succeeds or if the directory already exists.
-
-REQUIREMENTS *auto_swapdir-requirements*
-
-This plugin is only available if 'compatible' is not set.
-
-AUTHOR *auto_swapdir-author*
-
-Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
-
-LICENSE *auto_swapdir-license*
-
-Licensed for distribution under the same terms as Vim itself (see |license|).
-
-DISTRIBUTION *auto_swapdir-distribution*
-
-This plugin lives in Tom Ryder's "dotfiles" suite, and may eventually be spun
-off into a separate distribution as it solidifies and this documentation
-improves. See <https://sanctum.geek.nz/cgit/dotfiles.git/about/> for more
-information.
-
- vim:tw=78:ts=8:ft=help:norl:
diff --git a/vim/doc/auto_undodir.txt b/vim/doc/auto_undodir.txt
deleted file mode 100644
index af7a49bf..00000000
--- a/vim/doc/auto_undodir.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-*auto_undodir.txt* For Vim version 7.0 Last change: 2017 November 12
-
-DESCRIPTION *auto_undodir*
-
-This plugin attempts to create a directory "undo" in the directory named by
-the first element of 'runtimepath', and enables 'undofile' with that as the
-'undodir' if it succeeds or if the directory already exists.
-
-REQUIREMENTS *auto_undodir-requirements*
-
-This plugin is only available if 'compatible' is not set. It also requires the
-|+persistent_undo| Vim feature.
-
-AUTHOR *auto_undodir-author*
-
-Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
-
-LICENSE *auto_undodir-license*
-
-Licensed for distribution under the same terms as Vim itself (see |license|).
-
-DISTRIBUTION *auto_undodir-distribution*
-
-This plugin lives in Tom Ryder's "dotfiles" suite, and may eventually be spun
-off into a separate distribution as it solidifies and this documentation
-improves. See <https://sanctum.geek.nz/cgit/dotfiles.git/about/> for more
-information.
-
- vim:tw=78:ts=8:ft=help:norl:
diff --git a/vim/plugin/auto_backupdir.vim b/vim/plugin/auto_backupdir.vim
deleted file mode 100644
index 1535c486..00000000
--- a/vim/plugin/auto_backupdir.vim
+++ /dev/null
@@ -1,57 +0,0 @@
-"
-" auto_backupdir.vim: Configure 'backupdir' automatically, including trying
-" hard to create it.
-"
-" Author: Tom Ryder <tom@sanctum.geek.nz>
-" License: Same as Vim itself
-"
-if exists('g:loaded_auto_backupdir') || &compatible
- finish
-endif
-let g:loaded_auto_backupdir = 1
-
-" Define the backup path we want
-if exists('$VIM_BACKUPDIR')
- let s:backupdir = $VIM_BACKUPDIR
-else
-
- " This is imperfect in that it will break if you have a backslashed comma in
- " the first component of your &runtimepath, but if you're doing that, you
- " probably already have way bigger problems
- let s:backupdir
- \ = strpart(&runtimepath, 0, stridx(&runtimepath, ','))
- \ . '/backup'
-endif
-
-" If the prospective backup directory does not exist, try hard to create it
-if !isdirectory(expand(s:backupdir))
-
- " Try Vim's native mkdir() first
- if exists('*mkdir')
- silent! call mkdir(expand(s:backupdir), 'p', 0700)
-
- " Failing that, use an OS-dependent command
- " (Fortunately, Unix and Windows are the only OS types in the world)
- elseif has('*shellescape')
- if has('unix')
- let l:mkdir = '!mkdir -m 0700 -p '
- elseif has('win32') || has('win64')
- let l:mkdir = '!mkdir '
- endif
- silent! execute l:mkdir
- \ . shellescape(expand(s:backupdir))
- endif
-
-endif
-
-" If the directory exists after that...
-if isdirectory(expand(s:backupdir))
-
- " Set the backup directory and turn backups on
- execute 'set backupdir^=' . s:backupdir . '//'
- set backup
-
-" If not, give up and raise an error
-else
- echoerr 'Could not create backupdir ' . s:backupdir
-endif
diff --git a/vim/plugin/auto_swapdir.vim b/vim/plugin/auto_swapdir.vim
deleted file mode 100644
index 2f9e6d25..00000000
--- a/vim/plugin/auto_swapdir.vim
+++ /dev/null
@@ -1,57 +0,0 @@
-"
-" auto_swapdir.vim: Configure 'directory' automatically, including trying hard
-" to create it.
-"
-" Author: Tom Ryder <tom@sanctum.geek.nz>
-" License: Same as Vim itself
-"
-if exists('g:loaded_auto_swapdir') || &compatible
- finish
-endif
-let g:loaded_auto_swapdir = 1
-
-" Define the swap path we want
-if exists('$VIM_SWAPDIR')
- let s:swapdir = $VIM_SWAPDIR
-else
-
- " This is imperfect in that it will break if you have a backslashed comma in
- " the first component of your &runtimepath, but if you're doing that, you
- " probably already have way bigger problems
- let s:swapdir
- \ = strpart(&runtimepath, 0, stridx(&runtimepath, ','))
- \ . '/swap'
-endif
-
-" If the prospective swapfile directory does not exist, try hard to create it
-if !isdirectory(expand(s:swapdir))
-
- " Try Vim's native mkdir() first
- if exists('*mkdir')
- silent! call mkdir(expand(s:swapdir), 'p', 0700)
-
- " Failing that, use an OS-dependent command
- " (Fortunately, Unix and Windows are the only OS types in the world)
- elseif has('*shellescape')
- if has('unix')
- let l:mkdir = '!mkdir -m 0700 -p '
- elseif has('win32') || has('win64')
- let l:mkdir = '!mkdir '
- endif
- silent! execute l:mkdir
- \ . shellescape(expand(s:swapdir))
- endif
-
-endif
-
-" If the directory exists after that...
-if isdirectory(expand(s:swapdir))
-
- " Set the swapfile directory and turn swapfiles on
- execute 'set directory^=' . s:swapdir . '//'
- set swapfile
-
-" If not, give up and raise an error
-else
- echoerr 'Could not create swapdir ' . s:swapdir
-endif
diff --git a/vim/plugin/auto_undodir.vim b/vim/plugin/auto_undodir.vim
deleted file mode 100644
index a38dce02..00000000
--- a/vim/plugin/auto_undodir.vim
+++ /dev/null
@@ -1,60 +0,0 @@
-"
-" auto_undodir.vim: Configure 'undodir' automatically, including trying hard
-" to create it.
-"
-" Author: Tom Ryder <tom@sanctum.geek.nz>
-" License: Same as Vim itself
-"
-if exists('g:loaded_auto_undodir') || &compatible
- finish
-endif
-if !has('persistent_undo')
- finish
-endif
-let g:loaded_auto_undodir = 1
-
-" Define the undo path we want
-if exists('$VIM_UNDODIR')
- let s:undodir = $VIM_UNDODIR
-else
-
- " This is imperfect in that it will break if you have a backslashed comma in
- " the first component of your &runtimepath, but if you're doing that, you
- " probably already have way bigger problems
- let s:undodir
- \ = strpart(&runtimepath, 0, stridx(&runtimepath, ','))
- \ . '/undo'
-endif
-
-" If the prospective undo directory does not exist, try hard to create it
-if !isdirectory(expand(s:undodir))
-
- " Try Vim's native mkdir() first
- if exists('*mkdir')
- silent! call mkdir(expand(s:undodir), 'p', 0700)
-
- " Failing that, use an OS-dependent command
- " (Fortunately, Unix and Windows are the only OS types in the world)
- elseif has('*shellescape')
- if has('unix')
- let l:mkdir = '!mkdir -m 0700 -p '
- elseif has('win32') || has('win64')
- let l:mkdir = '!mkdir '
- endif
- silent! execute l:mkdir
- \ . shellescape(expand(s:undodir))
- endif
-
-endif
-
-" If the directory exists after that...
-if isdirectory(expand(s:undodir))
-
- " Set the undo directory and turn persistent undo files on
- execute 'set undodir^=' . s:undodir . '//'
- set undofile
-
-" If not, give up and raise an error
-else
- echoerr 'Could not create undodir ' . s:undodir
-endif