aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-29 00:09:16 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-29 00:09:16 +1300
commitffc11a076b7bb0ce7ac936085a904eb35603fdac (patch)
treee7c40d63bc955bfb3fc4979b73d630edfd398df1
parent692a114838b2d327fae9ab1fc5954e360af84501 (diff)
parentc70f0d298749fcf9e4476f79a425835572efaad8 (diff)
downloaddotfiles-ffc11a076b7bb0ce7ac936085a904eb35603fdac.tar.gz
Merge branch 'release/v1.78.0'v1.78.0
* release/v1.78.0: Bump VERSION Correct indentation in a few vim/after scripts Move b:undo_ftplugin unsets for C inline with sets Add config file for mpv Use full "mouse" for xset(1) call in ~/.xinitrc Remove vim-tiny workaround for 'undodir' setting Define b:undo_indent for Perl buffers Set missing b:undo_indent instructions for AWK Undo shell script dialect flags from filetype.vim Code-format word in TABS.md Remove a lot of alignment spacing
-rw-r--r--ISSUES.md2
-rw-r--r--Makefile11
-rw-r--r--README.md1
-rw-r--r--TABS.md4
-rw-r--r--VERSION4
-rw-r--r--X/xinitrc2
-rw-r--r--bin/dub.sh2
-rw-r--r--bin/maybe.sh4
-rw-r--r--bin/vex.sh2
-rw-r--r--dunst/dunstrc74
-rw-r--r--i3/config16
-rw-r--r--mpd/mpdconf14
-rw-r--r--mpv/mpv.conf2
-rw-r--r--mutt/muttrc70
-rw-r--r--sh/profile.d/editor.sh2
-rw-r--r--sh/profile.d/options.sh14
-rw-r--r--sh/shrc.d/grep.sh4
-rw-r--r--vim/after/ftplugin/c.vim5
-rw-r--r--vim/after/ftplugin/cpp.vim5
-rw-r--r--vim/after/ftplugin/gitcommit.vim2
-rw-r--r--vim/after/ftplugin/html.vim6
-rw-r--r--vim/after/ftplugin/sh.vim10
-rw-r--r--vim/after/ftplugin/vim.vim22
-rw-r--r--vim/after/indent/awk.vim7
-rw-r--r--vim/after/indent/perl.vim9
-rw-r--r--vim/vimrc4
26 files changed, 168 insertions, 130 deletions
diff --git a/ISSUES.md b/ISSUES.md
index 3ead2d0d..4e70c0ed 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -26,3 +26,5 @@ Known issues
depends on which shell you're using; the `sd` function isn't available when
you're not using Bash. Maybe I should try to extend `help` without breaking
it?
+* The b:undo\_indent definition for the perl filetype can probably be pushed
+ upstream.
diff --git a/Makefile b/Makefile
index 056f0ece..3093b96d 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@
install-login-shell \
install-man \
install-mpd \
+ install-mpv \
install-mutt \
install-mysql \
install-ncmcpp \
@@ -437,6 +438,10 @@ install-mpd: install-sh
cp -p -- mpd/profile.d/* $(HOME)/.profile.d
cp -p -- mpd/mpdconf $(HOME)/.mpdconf
+install-mpv:
+ mkdir -p -- $(HOME)/.config/mpv
+ cp -p -- mpv/* $(HOME)/.config/mpv
+
install-mutt:
mkdir -p -- $(HOME)/.muttrc.d $(HOME)/.cache/mutt
cp -p -- mutt/muttrc $(HOME)/.muttrc
@@ -564,9 +569,9 @@ install-vim-bundle: install-vim-config
install-vim-cache:
mkdir -p -- \
- $(VIMDIR)/cache/backup \
- $(VIMDIR)/cache/swap \
- $(VIMDIR)/cache/undo
+ $(VIMDIR)/cache/backup \
+ $(VIMDIR)/cache/swap \
+ $(VIMDIR)/cache/undo
install-vim-compiler:
mkdir -p -- $(VIMDIR)/compiler
diff --git a/README.md b/README.md
index ea316997..8a2f412d 100644
--- a/README.md
+++ b/README.md
@@ -92,6 +92,7 @@ Configuration is included for:
elements
* [i3](https://i3wm.org/) -- Tiling window manager
* [less](https://www.gnu.org/software/less/) -- Terminal pager
+* [mpv](https://mpv.io/) -- Media player
* [Mutt](http://www.mutt.org/) -- Terminal mail user agent
* [`mysql(1)`](https://linux.die.net/man/1/mysql) -- Command-line MySQL client
* [Ncmpcpp](https://rybczak.net/ncmpcpp/) -- ncurses music player client
diff --git a/TABS.md b/TABS.md
index 9ec5adb5..cecbf2ed 100644
--- a/TABS.md
+++ b/TABS.md
@@ -14,8 +14,8 @@ pretty nicely:
'for f;do unexpand -t2 "$f">"$f".tmp;mv "$f" "$f".tmp;done' \
_ {} +
-If you have GNU unexpand(1) and can add `--first-only` to each of those calls,
-the results seem perfect.
+If you have GNU `unexpand(1)` and can add `--first-only` to each of those
+calls, the results seem perfect.
You can configure Vim to accommodate this by removing the settings in vim/vimrc
for:
diff --git a/VERSION b/VERSION
index d135bdd5..1f815a05 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v1.77.1
-Sat Nov 24 07:20:26 UTC 2018
+tejr dotfiles v1.78.0
+Wed Nov 28 11:09:16 UTC 2018
diff --git a/X/xinitrc b/X/xinitrc
index 6f2ad45f..e86cac4d 100644
--- a/X/xinitrc
+++ b/X/xinitrc
@@ -5,7 +5,7 @@
xrdb "$HOME"/.Xresources
# Faster mouse acceleration with a natural threshold
-xset m 5/2 0
+xset mouse 5/2 0
# Load all supplementary scripts in ~/.xinitrc.d
for sh in "$HOME"/.xinitrc.d/*.sh ; do
diff --git a/bin/dub.sh b/bin/dub.sh
index 2dfd77f0..efdae4e9 100644
--- a/bin/dub.sh
+++ b/bin/dub.sh
@@ -14,7 +14,7 @@ cd -- "$dir" || exit
# wrong than malformed
nl=$(printf '\n/')
find . ! -name . -prune \( \
- -name '*'"${nl%/}"'*' \
+ -name '*'"${nl%/}"'*' \
-exec sh -c '
printf >&2 '\''%s: warning: skipped newline filename\n'\'' "$1"
' _ "$self" \; \
diff --git a/bin/maybe.sh b/bin/maybe.sh
index bda7bbc0..8a4f246e 100644
--- a/bin/maybe.sh
+++ b/bin/maybe.sh
@@ -3,8 +3,8 @@ self=maybe
# Figure out numerator and denominator from arguments
case $# in
- 0) num=1 den=2 ;;
- 1) num=1 den=$1 ;;
+ 0) num=1 den=2 ;;
+ 1) num=1 den=$1 ;;
2) num=$1 den=$2 ;;
*)
printf >&2 '%s: Unexpected arguments\n' "$self"
diff --git a/bin/vex.sh b/bin/vex.sh
index 8a696577..9e85c567 100644
--- a/bin/vex.sh
+++ b/bin/vex.sh
@@ -6,7 +6,7 @@ fi
"$@"
ex=$?
case $ex in
- 0) op='true' ;;
+ 0) op='true' ;;
*) op='false' ;;
esac
printf '%s\n' "$op"
diff --git a/dunst/dunstrc b/dunst/dunstrc
index a957b2c6..e3e3e43f 100644
--- a/dunst/dunstrc
+++ b/dunst/dunstrc
@@ -1,46 +1,46 @@
[global]
- alignment = left
- allow_markup = no
- bounce_freq = 0
- dmenu = dmenu -p dunst:
- follow = mouse
- format = "%s %b"
- geometry = "350x5-0-17"
- history_length = 20
- horizontal_padding = 8
- icon_position = off
- idle_threshold = 0
- ignore_newline = no
- indicate_hidden = no
- line_height = 0
- monitor = 0
- padding = 8
- separator_color = frame
- separator_height = 0
- show_age_threshold = -1
- show_indicators = no
- shrink = no
- sort = yes
- startup_notification = false
- sticky_history = yes
- transparency = 0
- word_wrap = yes
+galignment = left
+gallow_markup = no
+gbounce_freq = 0
+gdmenu = dmenu -p dunst:
+gfollow = mouse
+gformat = "%s %b"
+ggeometry = "350x5-0-17"
+ghistory_length = 20
+ghorizontal_padding = 8
+gicon_position = off
+gidle_threshold = 0
+gignore_newline = no
+gindicate_hidden = no
+gline_height = 0
+gmonitor = 0
+gpadding = 8
+gseparator_color = frame
+gseparator_height = 0
+gshow_age_threshold = -1
+gshow_indicators = no
+gshrink = no
+gsort = yes
+gstartup_notification = false
+gsticky_history = yes
+gtransparency = 0
+gword_wrap = yes
[frame]
- width = 1
- color = "#333333"
+gwidth = 1
+gcolor = "#333333"
[urgency_low]
- background = "#222222"
- foreground = "#bbbbbb"
- timeout = 10
+gbackground = "#222222"
+gforeground = "#bbbbbb"
+gtimeout = 10
[urgency_normal]
- background = "#285577"
- foreground = "#ffffff"
- timeout = 10
+gbackground = "#285577"
+gforeground = "#ffffff"
+gtimeout = 10
[urgency_critical]
- background = "#900000"
- foreground = "#ffffff"
- timeout = 0
+gbackground = "#900000"
+gforeground = "#ffffff"
+gtimeout = 0
diff --git a/i3/config b/i3/config
index 6fa0a0de..2b190998 100644
--- a/i3/config
+++ b/i3/config
@@ -74,27 +74,27 @@ bindsym $mod+Shift+9 move container to workspace 9
# Mod+r resizes a container
bindsym $mod+r mode "resize"
mode "resize" {
- bindsym h resize shrink width 10 px or 10 ppt
- bindsym j resize grow height 10 px or 10 ppt
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
- bindsym l resize grow width 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
# i3bar at bottom of screen
bar {
- position bottom
- status_command i3status --config ~/.i3/status
+ position bottom
+ status_command i3status --config ~/.i3/status
workspace_buttons yes
colors {
background #111111
statusline #eeeeee
- focused_workspace #ffffff #285577
- active_workspace #ffffff #333333
+ focused_workspace #ffffff #285577
+ active_workspace #ffffff #333333
inactive_workspace #888888 #222222
- urgent_workspace #ffffff #900000
+ urgent_workspace #ffffff #900000
}
}
diff --git a/mpd/mpdconf b/mpd/mpdconf
index 3dca8b6d..e8bad4cc 100644
--- a/mpd/mpdconf
+++ b/mpd/mpdconf
@@ -1,15 +1,15 @@
bind_to_address "~/.mpd/socket"
-db_file "~/.mpd/database"
+db_file "~/.mpd/database"
log_file "~/.mpd/log"
-music_directory "/mnt/media/shares/music"
+music_directory "/mnt/media/shares/music"
playlist_directory "~/.mpd/playlists"
-pid_file "~/.mpd/pid"
-state_file "~/.mpd/state"
-sticker_file "~/.mpd/sticker.sql"
+pid_file "~/.mpd/pid"
+state_file "~/.mpd/state"
+sticker_file "~/.mpd/sticker.sql"
audio_output {
- type "pulse"
- name "PulseAudio"
+ type "pulse"
+ name "PulseAudio"
}
diff --git a/mpv/mpv.conf b/mpv/mpv.conf
new file mode 100644
index 00000000..5a2a05c4
--- /dev/null
+++ b/mpv/mpv.conf
@@ -0,0 +1,2 @@
+# Don't try to show me album covers when I play FLAC
+no-audio-display
diff --git a/mutt/muttrc b/mutt/muttrc
index 41e8a75c..9ff4857d 100644
--- a/mutt/muttrc
+++ b/mutt/muttrc
@@ -1,8 +1,8 @@
# Addresses
set query_command = 'abook --mutt-query %s'
-set reverse_name = yes
-set use_domain = yes
-set use_from = yes
+set reverse_name = yes
+set use_domain = yes
+set use_from = yes
# Alerts
set beep_new = yes
@@ -20,23 +20,23 @@ set header_cache = '~/.cache/mutt/headers'
# Colors
color attachment brightyellow default
-color hdrdefault cyan default
-color indicator black white
-color markers brightred default
-color normal default default
-color quoted green default
-color signature cyan default
-color status default color22
-color tilde brightblack default
-color tree default default
+color hdrdefault cyan default
+color indicator black white
+color markers brightred default
+color normal default default
+color quoted green default
+color signature cyan default
+color status default color22
+color tilde brightblack default
+color tree default default
# Completion
bind editor <Tab> complete-query
-bind editor ^T complete
+bind editor ^T complete
# Files
set delete = ask-yes
-set move = no
+set move = no
# Flags
set mark_old = no
@@ -52,9 +52,9 @@ set index_format = '%4C %Z %{%b %d %Y} %-15.15L (%?l?%4l&%4c?) %s'
# Interaction
set abort_unmodified = no
-set confirmappend = no
-set wait_key = no
-set quit = ask-yes
+set confirmappend = no
+set wait_key = no
+set quit = ask-yes
# Intervals
set mail_check = 5
@@ -71,14 +71,14 @@ mime_lookup application/octet-stream
# Pager
set pager_context = 1
-set pager_format = '%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)'
-set pager_stop = yes
+set pager_format = '%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)'
+set pager_stop = yes
# Presentation/formatting
-set markers = no
-set smart_wrap = yes
+set markers = no
+set smart_wrap = yes
set text_flowed = yes
-set tilde = yes
+set tilde = yes
alternative_order text/plain text/html *
auto_view text/html
@@ -86,36 +86,36 @@ auto_view text/html
set quote_regexp = '^(>[ \t]*)+'
# Responses
-set fast_reply = yes
-set forward_format = 'Fw: %s'
-set include = yes
+set fast_reply = yes
+set forward_format = 'Fw: %s'
+set include = yes
set use_envelope_from = yes
# Searching/sorting
-set sort = 'threads'
-set sort_aux = 'last-date-received'
-set strict_threads = yes
+set sort = 'threads'
+set sort_aux = 'last-date-received'
+set strict_threads = yes
set thorough_search = yes
# SSH
set time_inc = 250
# Encryption settings
-set crypt_replysign = yes
-set crypt_replyencrypt = yes
+set crypt_replysign = yes
+set crypt_replyencrypt = yes
set crypt_replysignencrypted = yes
-set crypt_use_gpgme = yes
-set crypt_use_pka = yes
-set crypt_verify_sig = yes
+set crypt_use_gpgme = yes
+set crypt_use_pka = yes
+set crypt_verify_sig = yes
# Do decode classic PGP messages, though we'll never write them
set pgp_auto_decode = yes
# Vim-ish bindings
bind index gg first-entry
-bind index G last-entry
+bind index G last-entry
bind pager gg top
-bind pager G bottom
+bind pager G bottom
bind index,pager \Cu half-up
bind index,pager \Cd half-down
bind generic,index,browser,pager \Cf next-page
diff --git a/sh/profile.d/editor.sh b/sh/profile.d/editor.sh
index 6e202e26..37146fb9 100644
--- a/sh/profile.d/editor.sh
+++ b/sh/profile.d/editor.sh
@@ -12,7 +12,7 @@ elif (
ver=$(ex --version 2>/dev/null | awk '{print $1;exit}')
case $ver in
(VIM) exit 0 ;;
- (*) exit 1 ;;
+ (*) exit 1 ;;
esac
) >/dev/null 2>&1 ; then
EDITOR='exm'
diff --git a/sh/profile.d/options.sh b/sh/profile.d/options.sh
index 89b5d245..73f62243 100644
--- a/sh/profile.d/options.sh
+++ b/sh/profile.d/options.sh
@@ -39,17 +39,17 @@ options ed \
# Cache options for grep(1)
options grep \
binary-files \
- color \
- devices \
- directories \
- exclude \
+ color \
+ devices \
+ directories \
+ exclude \
exclude-dir
# Cache options for ls(1)
options ls \
- almost-all \
- block-size \
- color \
+ almost-all \
+ block-size \
+ color \
human-readable \
time-style
)
diff --git a/sh/shrc.d/grep.sh b/sh/shrc.d/grep.sh
index 3df1ee9a..43797ef5 100644
--- a/sh/shrc.d/grep.sh
+++ b/sh/shrc.d/grep.sh
@@ -28,7 +28,7 @@ grep() {
# Add --exclude to ignore .gitignore and .gitmodules files
[ -e "$HOME"/.cache/sh/opt/grep/exclude ] &&
set -- \
- --exclude=.gitignore \
+ --exclude=.gitignore \
--exclude=.gitmodules \
"$@"
@@ -37,7 +37,7 @@ grep() {
set -- \
--exclude-dir=.cvs \
--exclude-dir=.git \
- --exclude-dir=.hg \
+ --exclude-dir=.hg \
--exclude-dir=.svn \
"$@"
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim
index 9ac59733..da34d269 100644
--- a/vim/after/ftplugin/c.vim
+++ b/vim/after/ftplugin/c.vim
@@ -5,13 +5,14 @@ endif
" Include macros in completion
setlocal complete+=d
+let b:undo_ftplugin .= '|setlocal complete<'
" Set include pattern
setlocal include=^\\s*#\\s*include
+let b:undo_ftplugin .= '|setlocal include<'
" Include headers on UNIX
if has('unix')
setlocal path+=/usr/include
+ let b:undo_ftplugin .= '|setlocal path<'
endif
-
-let b:undo_ftplugin .= '|setlocal complete< include< path<'
diff --git a/vim/after/ftplugin/cpp.vim b/vim/after/ftplugin/cpp.vim
index b5596613..4042fb84 100644
--- a/vim/after/ftplugin/cpp.vim
+++ b/vim/after/ftplugin/cpp.vim
@@ -5,13 +5,14 @@ endif
" Include macros in completion
setlocal complete+=d
+let b:undo_ftplugin .= '|setlocal complete<'
" Set include pattern
setlocal include=^\\s*#\\s*include
+let b:undo_ftplugin .= '|setlocal include<'
" Include headers on UNIX
if has('unix')
setlocal path+=/usr/include
+ let b:undo_ftplugin .= '|setlocal path<'
endif
-
-let b:undo_ftplugin .= '|setlocal complete< include< path<'
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index c9b14b6b..2dc5fa37 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -12,7 +12,7 @@ let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
if has('autocmd') && exists('+cursorcolumn')
augroup gitcommit
autocmd CursorMoved,CursorMovedI <buffer>
- \ let &l:colorcolumn = gitcommit#CursorColumn()
+ \ let &l:colorcolumn = gitcommit#CursorColumn()
augroup END
let b:undo_ftplugin .= '|autocmd! gitcommit'
\ . '|augroup! gitcommit'
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim
index dc429221..759d06bf 100644
--- a/vim/after/ftplugin/html.vim
+++ b/vim/after/ftplugin/html.vim
@@ -12,9 +12,9 @@ let b:undo_ftplugin .= '|unlet b:current_compiler'
" Set up hooks for timestamp updating
augroup html_timestamp
autocmd BufWritePre <buffer>
- \ if exists('b:html_timestamp_check')
- \| call html#TimestampUpdate()
- \|endif
+ \ if exists('b:html_timestamp_check')
+ \| call html#TimestampUpdate()
+ \|endif
augroup END
let b:undo_ftplugin .= '|autocmd! html_timestamp BufWritePre <buffer>'
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim
index 766994b7..fdc42ccc 100644
--- a/vim/after/ftplugin/sh.vim
+++ b/vim/after/ftplugin/sh.vim
@@ -33,6 +33,16 @@ if exists('b:is_posix')
let g:is_posix = 1
endif
+" Queue up undo commands to clear the shell language flags that we set for
+" this buffer during filetype detection in filetype.vim
+if exists('b:is_bash')
+ let b:undo_ftplugin .= '|unlet b:is_bash'
+elseif exists('b:is_kornshell')
+ let b:undo_ftplugin .= '|unlet b:is_kornshell'
+elseif exists('b:is_posix')
+ let b:undo_ftplugin .= '|unlet b:is_posix'
+endif
+
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_sh_maps')
finish
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 46182627..2fc5bd78 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -24,15 +24,15 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K'
" 8.1.273 updated the runtime files to include a fix for this
if v:version < 801 || v:version == 801 && !has('patch273')
let b:undo_ftplugin .= '|nunmap <buffer> [['
- \ . '|vunmap <buffer> [['
- \ . '|nunmap <buffer> ]]'
- \ . '|vunmap <buffer> ]]'
- \ . '|nunmap <buffer> []'
- \ . '|vunmap <buffer> []'
- \ . '|nunmap <buffer> ]['
- \ . '|vunmap <buffer> ]['
- \ . '|nunmap <buffer> ]"'
- \ . '|vunmap <buffer> ]"'
- \ . '|nunmap <buffer> ["'
- \ . '|vunmap <buffer> ["'
+ \ . '|vunmap <buffer> [['
+ \ . '|nunmap <buffer> ]]'
+ \ . '|vunmap <buffer> ]]'
+ \ . '|nunmap <buffer> []'
+ \ . '|vunmap <buffer> []'
+ \ . '|nunmap <buffer> ]['
+ \ . '|vunmap <buffer> ]['
+ \ . '|nunmap <buffer> ]"'
+ \ . '|vunmap <buffer> ]"'
+ \ . '|nunmap <buffer> ["'
+ \ . '|vunmap <buffer> ["'
endif
diff --git a/vim/after/indent/awk.vim b/vim/after/indent/awk.vim
new file mode 100644
index 00000000..fc848d2a
--- /dev/null
+++ b/vim/after/indent/awk.vim
@@ -0,0 +1,7 @@
+" The stock AWK indenting is decent, but doesn't include an undo variable;
+" this adds one, clearing away the sole global function too.
+if !exists('b:undo_indent')
+ let b:undo_indent = 'unlet! b:did_indent'
+ let b:undo_indent = b:undo_indent . '|setlocal indentexpr< indentkeys<'
+ let b:undo_indent = b:undo_indent . '|delfunction! GetAwkIndent'
+endif
diff --git a/vim/after/indent/perl.vim b/vim/after/indent/perl.vim
new file mode 100644
index 00000000..6f97d979
--- /dev/null
+++ b/vim/after/indent/perl.vim
@@ -0,0 +1,9 @@
+" The stock Perl indenting is decent, but doesn't include an undo variable;
+" this adds one
+if !exists('b:undo_indent')
+ let b:undo_indent = 'unlet! b:did_indent'
+ let b:undo_indent = b:undo_indent . '|setlocal indentexpr< indentkeys<'
+ let b:undo_indent = b:undo_indent . '|unlet! b:indent_use_syntax'
+ let b:undo_indent = b:undo_indent . '|unlet! b:match_skip'
+ let b:undo_indent = b:undo_indent . '|unlet! b:match_words'
+endif
diff --git a/vim/vimrc b/vim/vimrc
index 03844def..25fe4e05 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -198,10 +198,10 @@ silent! set ttymouse=
" Keep undo files, hopefully in a dedicated directory
if has('persistent_undo')
set undofile
- set undodir^=~/.vim/cache/undo//
if has('win32') || has('win64')
- set undodir-=~/.vim/cache/undo//
set undodir^=~/vimfiles/cache/undo//
+ else
+ set undodir^=~/.vim/cache/undo//
endif
endif