Skip to content
Browse files

Changed FileEdit and rewroted FileView

  • Loading branch information...
1 parent 1ffedd3 commit dc2a4dda1e4a45bf100e42686db32a6e4355b544 @Alukardd committed Jan 28, 2012
Showing with 6 additions and 31 deletions.
  1. +6 −31 vimcommander.vim
View
37 vimcommander.vim
@@ -243,7 +243,6 @@ fu! <SID>SSHConnect()
endwhile
endf
-
fu!<SID>First()
if has("unix")
let s:slash_char = "/"
@@ -473,45 +472,21 @@ fu! <SID>ProvideBuffer()
endf
fu! <SID>FileView()
- let i=0
- if strlen(b:vimcommander_selected)>0
- let name=<SID>SelectedNum(b:vimcommander_selected, i)
- let filename=<SID>MyPath().name
- let i=i+1
- else
- let name=" "
- let filename=<SID>PathUnderCursor()
+ let path=<SID>PathUnderCursor()
+ if(isdirectory(path))
+ return
end
- let opt=""
- while strlen(name)>0
- if filereadable(filename)
- if has("unix")
- cal system("(see ".shellescape(filename).") &")
- else
- exec "silent ! start \"\" \"".substitute(filename, "/", "\\", "g")."\""
- endif
- en
- if strlen(b:vimcommander_selected)>0
- let name=<SID>SelectedNum(b:vimcommander_selected, i)
- let filename=<SID>MyPath().name
- let i=i+1
- else
- let name=""
- end
- endwhile
- let b:vimcommander_selected=""
- cal <SID>RefreshDisplays()
+ let s:buffer_to_load=path
+ exe "tab sview ".<SID>VimEscape(path)
endf
fu! <SID>FileEdit()
let path=<SID>PathUnderCursor()
if(isdirectory(path))
return
end
- "cal <SID>ProvideBuffer()
let s:buffer_to_load=path
- cal <SID>Close()
- exe "edit ".<SID>VimEscape(path)
+ exe "tabedit ".<SID>VimEscape(path)
endf
fu! <SID>NewFileEdit()

0 comments on commit dc2a4dd

Please sign in to comment.
Something went wrong with that request. Please try again.