Permalink
Browse files

Skip swap files with ]o and [o

  • Loading branch information...
1 parent 014d559 commit c8064420ae0408817247d70287cb1f0fff503fcd @tpope committed Feb 23, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugin/unimpaired.vim
View
@@ -41,8 +41,10 @@ function! s:FileByOffset(num)
elseif dir != ''
let dir .= '/'
endif
- let files = split(glob(dir.".*[^~.]"),"\n")
- let files += split(glob(dir."*[^~]"),"\n")
+ let files = split(glob(dir.".*"),"\n")
+ let files += split(glob(dir."*"),"\n")
+ call filter(files,'v:val !=# "." && v:val !=# ".."')
+ call filter(files,'v:val[-4:-1] !=# ".swp" && v:val[-1:-1] !=# "~"')
if a:num < 0
call reverse(sort(filter(files,'v:val < original')))
else

0 comments on commit c806442

Please sign in to comment.