aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-18 00:03:51 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-18 00:03:51 +1200
commitd5f52edcf6e87a2ada4af932225ef28af45aab36 (patch)
tree94729df2314d40b3229940cbf57d94268e358976
parent8d2009a122f3cd434ade496d5e4ed94ccdea0832 (diff)
downloaddotfiles-d5f52edcf6e87a2ada4af932225ef28af45aab36.tar.gz
Move 'wildignore' setting back into .vimrc
-rw-r--r--vim/plugin/wildignore.vim173
-rw-r--r--vim/vimrc73
2 files changed, 72 insertions, 174 deletions
diff --git a/vim/plugin/wildignore.vim b/vim/plugin/wildignore.vim
deleted file mode 100644
index 36a8f492..00000000
--- a/vim/plugin/wildignore.vim
+++ /dev/null
@@ -1,173 +0,0 @@
-" Don't complete certain files that I'm not likely to want to manipulate from
-" within Vim; this is kind of expensive to reload, so I've made it a plugin
-" with a load guard
-if &compatible || v:version < 700 || !has('wildignore')
- finish
-endif
-if exists('loaded_wildmenu')
- finish
-endif
-let loaded_wildmenu = 1
-
-" Helper function for local scope
-function! s:Wildignore() abort
-
- " New empty array
- let ignores = []
-
- " Archives
- let ignores += [
- \ '*.7z'
- \,'*.bz2'
- \,'*.gz'
- \,'*.jar'
- \,'*.rar'
- \,'*.tar'
- \,'*.xz'
- \,'*.zip'
- \ ]
-
- " Bytecode
- let ignores += [
- \ '*.class'
- \,'*.pyc'
- \ ]
-
- " Databases
- let ignores += [
- \ '*.db'
- \,'*.dbm'
- \,'*.sdbm'
- \,'*.sqlite'
- \ ]
-
- " Disk
- let ignores += [
- \ '*.adf'
- \,'*.bin'
- \,'*.hdf'
- \,'*.iso'
- \ ]
-
- " Documents
- let ignores += [
- \ '*.docx'
- \,'*.djvu'
- \,'*.odp'
- \,'*.ods'
- \,'*.odt'
- \,'*.pdf'
- \,'*.ppt'
- \,'*.xls'
- \,'*.xlsx'
- \ ]
-
- " Encrypted
- let ignores += [
- \ '*.asc'
- \,'*.gpg'
- \ ]
-
- " Executables
- let ignores += [
- \ '*.exe'
- \ ]
-
- " Fonts
- let ignores += [
- \ '*.ttf'
- \ ]
-
- " Images
- let ignores += [
- \ '*.bmp'
- \,'*.gd2'
- \,'*.gif'
- \,'*.ico'
- \,'*.jpeg'
- \,'*.jpg'
- \,'*.pbm'
- \,'*.png'
- \,'*.psd'
- \,'*.tga'
- \,'*.xbm'
- \,'*.xcf'
- \,'*.xpm'
- \ ]
-
- " Incomplete
- let ignores += [
- \ '*.filepart'
- \ ]
-
- " Objects
- let ignores += [
- \ '*.a'
- \,'*.o'
- \ ]
-
- " Sound
- let ignores += [
- \ '*.au'
- \,'*.aup'
- \,'*.flac'
- \,'*.mid'
- \,'*.m4a'
- \,'*.mp3'
- \,'*.ogg'
- \,'*.opus'
- \,'*.s3m'
- \,'*.wav'
- \ ]
-
- " System-specific
- let ignores += [
- \ '.DS_Store'
- \ ]
-
- " Translation
- let ignores += [
- \ '*.gmo'
- \ ]
-
- " Version control
- let ignores += [
- \ '.git'
- \,'.hg'
- \,'.svn'
- \ ]
-
- " Video
- let ignores += [
- \ '*.avi'
- \,'*.gifv'
- \,'*.mp4'
- \,'*.ogv'
- \,'*.rm'
- \,'*.swf'
- \,'*.webm'
- \ ]
-
- " Vim
- let ignores += [
- \ '*~'
- \,'*.swp'
- \ ]
-
- " If on a system where case matters for filenames, for any that had
- " lowercase letters, add their uppercase analogues
- if has('fname_case')
- for ignore in ignores
- if ignore =~# '\l'
- call add(ignores, toupper(ignore))
- endif
- endfor
- endif
-
- " Return the completed setting
- return join(ignores, ',')
-
-endfunction
-
-" Run helper function just defined
-let &wildignore = s:Wildignore()
diff --git a/vim/vimrc b/vim/vimrc
index 6b5fce34..fc27e34a 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -187,7 +187,78 @@ if has('persistent_undo')
set undodir^=$MYVIMRUNTIME/cache/undo//
endif
-" Tab completion settings; see also plugin/wildignore.vim
+" Tab completion settings
+set wildignore=*~
+ \,*.7z
+ \,*.a
+ \,*.adf
+ \,*.asc
+ \,*.au
+ \,*.aup
+ \,*.avi
+ \,*.bin
+ \,*.bmp
+ \,*.bz2
+ \,*.class
+ \,*.db
+ \,*.dbm
+ \,*.djvu
+ \,*.docx
+ \,*.exe
+ \,*.filepart
+ \,*.flac
+ \,*.gd2
+ \,*.gif
+ \,*.gifv
+ \,*.gmo
+ \,*.gpg
+ \,*.gz
+ \,*.hdf
+ \,*.ico
+ \,*.iso
+ \,*.jar
+ \,*.jpeg
+ \,*.jpg
+ \,*.m4a
+ \,*.mid
+ \,*.mp3
+ \,*.mp4
+ \,*.o
+ \,*.odp
+ \,*.ods
+ \,*.odt
+ \,*.ogg
+ \,*.ogv
+ \,*.opus
+ \,*.pbm
+ \,*.pdf
+ \,*.png
+ \,*.ppt
+ \,*.psd
+ \,*.pyc
+ \,*.rar
+ \,*.rm
+ \,*.s3m
+ \,*.sdbm
+ \,*.sqlite
+ \,*.swf
+ \,*.swp
+ \,*.tar
+ \,*.tga
+ \,*.ttf
+ \,*.wav
+ \,*.webm
+ \,*.xbm
+ \,*.xcf
+ \,*.xls
+ \,*.xlsx
+ \,*.xpm
+ \,*.xz
+ \,*.zip
+ \,.DS_Store
+ \,.git
+ \,.hg
+ \,.svn
if exists('+wildignorecase')
set wildignorecase " Case insensitive, if supported (v7.3.072)
endif