Skip to content

Commit

Permalink
Skip swap files with ]o and [o
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Feb 23, 2010
1 parent 014d559 commit c806442
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/unimpaired.vim
Expand Up @@ -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
Expand Down

0 comments on commit c806442

Please sign in to comment.