aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-03 20:12:17 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-03 20:12:17 +1300
commit07a97f3cdcca67bb6cd7735ad12109b613b84f80 (patch)
treedbe8bafaf17ab9bf7f5bfce10b6ff3cc42ef96a8
parentBump version number to 0.4.2 (diff)
downloaddotfiles-07a97f3cdcca67bb6cd7735ad12109b613b84f80.tar.gz
dotfiles-07a97f3cdcca67bb6cd7735ad12109b613b84f80.zip
Require eval feature for netrw opts assignment
Tiny builds of Vim that exclude the eval feature throw errors at the :let commands in this file: $ vim.tiny Error detected while processing /home/tom/.vim/config/netrw.vim: line 2: E319: Sorry, the command is not available in this version: let g:netrw_banner = 0 line 5: E319: Sorry, the command is not available in this version: let g:netrw_silent = 1 line 8: E319: Sorry, the command is not available in this version: let g:netrw_liststyle = 3 line 11: E319: Sorry, the command is not available in this version: let g:netrw_list_hide = '^\.$,^tags$' Press ENTER or type command to continue This code was not being run on such builds before commit 538b71c, because it was in an "after" directory for the netrw plugin and would have been skipped. Wrapping a check for has('eval') around this whole file fixes the problem. netrw.vim won't run without this feature anyway.
-rw-r--r--vim/config/netrw.vim21
1 files changed, 13 insertions, 8 deletions
diff --git a/vim/config/netrw.vim b/vim/config/netrw.vim
index 528f0ca6..b38649b9 100644
--- a/vim/config/netrw.vim
+++ b/vim/config/netrw.vim
@@ -1,11 +1,16 @@
-" Don't show the preamble banner
-let g:netrw_banner = 0
+" netrw plugin configuration
+if has('eval')
-" Perform file transfers silently
-let g:netrw_silent = 1
+ " Don't show the preamble banner
+ let g:netrw_banner = 0
-" Use a tree-style file listing
-let g:netrw_liststyle = 3
+ " Perform file transfers silently
+ let g:netrw_silent = 1
-" Don't list the current directory shortcut, and don't show tags files
-let g:netrw_list_hide = '^\.$,^tags$'
+ " Use a tree-style file listing
+ let g:netrw_liststyle = 3
+
+ " Don't list the current directory shortcut, and don't show tags files
+ let g:netrw_list_hide = '^\.$,^tags$'
+
+endif