diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-27 22:20:04 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-27 22:20:04 +1200 |
commit | 318e2991a70b410ed9f93d811d7d0acebc75d424 (patch) | |
tree | bc4ebe14b50792cda27b34395cdc4c23251d1a5b | |
parent | Whoops, I didn't mean to leave these in here (diff) | |
download | dotfiles-318e2991a70b410ed9f93d811d7d0acebc75d424.tar.gz dotfiles-318e2991a70b410ed9f93d811d7d0acebc75d424.zip |
Don't split entire array just to get first element
-rw-r--r-- | vim/vimrc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,7 +4,9 @@ " Set an environment variable for the user runtime directory, if not already " set; use the first element of &runtimepath, rather like 'spellfile' if !exists('$MYVIM') - let $MYVIM = expand(split(&runtimepath, ',')[0]) + let $MYVIM = expand( + \ strpart(&runtimepath, 0, stridx(&runtimepath, ',')) + \ ) endif " The all-important default indent settings; filetypes to tweak |