Skip to content

Commit

Permalink
Remove unnecessary functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kchmck committed Feb 15, 2012
1 parent 3b81d8b commit 41fb408
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions ftplugin/coffee.vim
Expand Up @@ -34,16 +34,6 @@ function! s:CoffeeCompileResetVars()
let b:coffee_compile_watch = 0 let b:coffee_compile_watch = 0
endfunction endfunction


" Save the cursor in the CoffeeCompile buffer.
function! s:CoffeeCompileSavePos()
let b:coffee_compile_pos = getpos('.')
endfunction

" Restore the cursor in the CoffeeCompile buffer.
function! s:CoffeeCompileRestorePos()
call setpos('.', b:coffee_compile_pos)
endfunction

" Clean things up in the source buffer. " Clean things up in the source buffer.
function! s:CoffeeCompileClose() function! s:CoffeeCompileClose()
exec bufwinnr(b:coffee_compile_src_buf) 'wincmd w' exec bufwinnr(b:coffee_compile_src_buf) 'wincmd w'
Expand Down Expand Up @@ -86,7 +76,7 @@ function! s:CoffeeCompileUpdate(startline, endline)
setlocal filetype=javascript setlocal filetype=javascript
endif endif


call s:CoffeeCompileRestorePos() call setpos('.', b:coffee_compile_pos)
endfunction endfunction


" Update the CoffeeCompile buffer with the whole source buffer. " Update the CoffeeCompile buffer with the whole source buffer.
Expand Down Expand Up @@ -155,7 +145,8 @@ function! s:CoffeeCompile(startline, endline, args)
setlocal nobuflisted nomodifiable noswapfile nowrap setlocal nobuflisted nomodifiable noswapfile nowrap


autocmd BufWipeout <buffer> call s:CoffeeCompileClose() autocmd BufWipeout <buffer> call s:CoffeeCompileClose()
autocmd BufLeave <buffer> call s:CoffeeCompileSavePos() " Save the cursor when leaving the CoffeeCompile buffer.
autocmd BufLeave <buffer> let b:coffee_compile_pos = getpos('.')


nnoremap <buffer> <silent> q :hide<CR> nnoremap <buffer> <silent> q :hide<CR>
Expand Down

0 comments on commit 41fb408

Please sign in to comment.