Skip to content

Commit

Permalink
util.vim: fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih committed May 25, 2015
1 parent f058252 commit 8760678
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions autoload/go/util.vim
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
" PathSep returns the appropriate OS specific path separator.
function! go#util#PathSep()
if go#util#IsWin()
return '\'
endif
return '/'
if go#util#IsWin()
return '\'
endif
return '/'
endfunction

" PathListSep returns the appropriate OS specific path list separator.
function! go#util#PathListSep()
if go#util#IsWin()
return ";"
endif
return ":"
if go#util#IsWin()
return ";"
endif
return ":"
endfunction

" LineEnding returns the correct line ending, based on the current fileformat
function! go#util#LineEnding()
if &fileformat == 'dos'
return "\r\n"
elseif &fileformat == 'mac'
return "\r"
endif
if &fileformat == 'dos'
return "\r\n"
elseif &fileformat == 'mac'
return "\r"
endif

return "\n"
return "\n"
endfunction

" IsWin returns 1 if current OS is Windows or 0 otherwise
function! go#util#IsWin()
let win = ['win16', 'win32', 'win32unix', 'win64', 'win95']
for w in win
if (has(w))
return 1
endif
endfor

return 0
let win = ['win16', 'win32', 'win32unix', 'win64', 'win95']
for w in win
if (has(w))
return 1
endif
endfor

return 0
endfunction

" StripPath strips the path's last character if it's a path separator.
Expand All @@ -47,3 +47,5 @@ function! go#util#StripPathSep(path)

return a:path
endfunction

" vim:ts=4:sw=4:et

0 comments on commit 8760678

Please sign in to comment.