<commit_before>function! StartServer()
  let l:cmd = '../bin/task_server &'
"  let result = system(l:cmd)
  echo "Starting server"
endfunction

function! BasicMappings()
  exec "nnoremap <silent> <leader>t :call StartTasks()<CR>"
  exec "nnoremap <silent> <leader>rl :source task_app.vim<CR>"
  exec "nnoremap <silent> <leader>q :call QuitApp()<CR>"
endfunction
   
"function! ApplyMappings()
  "exec "nnoremap <silent> <buffer> <CR> :call SelectList()<CR>"
"endfunction

function! StartTasks()
  rubyfile done_app.rb
  ruby << EOF
    $v = DoneApp.new
EOF
  "call ApplyMappings()
endfunction

function! SelectList()
  ruby $v.select_tasklist()
endfunction

function! ToggleTask()
  ruby $v.toggle_task
endfunction

function! SelectTlWindow()
  ruby $v.select_tl_window
  ruby $v.close_task_window
endfunction

function! RefreshTasks()
  ruby $v.refresh_tasks
endfunction

function! SortTasks()
  ruby $v.sort_tasks
endfunction

function! AddTask()
  ruby $v.add_task
endfunction

function! DeleteTask()
  ruby $v.delete_task
endfunction

function! ChangeTaskName()
  ruby $v.change_task_name
endfunction

function! QuitApp()
  ruby $v.quit
endfunction

command! Tasks :call StartTasks()
command! RefreshTasks :call RefreshTasks()
command! SortTasks :call SortTasks()
command! AddTask :call AddTask()
command! QuitTasks :call QuitApp()

call BasicMappings()
call StartServer()
<commit_msg>Fixes load path problem for rubyfile<commit_after>" Done.vim, a simple way to integrate Google Tasks and vim
" Version 0.1.1
" <NAME>, 2012

function! StartServer()
  let l:cmd = '../bin/task_server &'
"  let result = system(l:cmd)
  echo "Starting server"
endfunction

function! BasicMappings()
  exec "nnoremap <silent> <leader>t :call StartTasks()<CR>"
  exec "nnoremap <silent> <leader>rl :source task_app.vim<CR>"
  exec "nnoremap <silent> <leader>q :call QuitApp()<CR>"
endfunction
   
"function! ApplyMappings()
  "exec "nnoremap <silent> <buffer> <CR> :call SelectList()<CR>"
"endfunction

function! StartTasks()
  let s:p = call fnameescape(expand('<sfile>:p:h')
  rubyfile s:p.done_app.rb
  ruby << EOF
    $v = DoneApp.new
EOF
  "call ApplyMappings()
endfunction

function! SelectList()
  ruby $v.select_tasklist()
endfunction

function! ToggleTask()
  ruby $v.toggle_task
endfunction

function! SelectTlWindow()
  ruby $v.select_tl_window
  ruby $v.close_task_window
endfunction

function! RefreshTasks()
  ruby $v.refresh_tasks
endfunction

function! SortTasks()
  ruby $v.sort_tasks
endfunction

function! AddTask()
  ruby $v.add_task
endfunction

function! DeleteTask()
  ruby $v.delete_task
endfunction

function! ChangeTaskName()
  ruby $v.change_task_name
endfunction

function! QuitApp()
  ruby $v.quit
endfunction

command! Tasks :call StartTasks()
command! RefreshTasks :call RefreshTasks()
command! SortTasks :call SortTasks()
command! AddTask :call AddTask()
command! QuitTasks :call QuitApp()

call BasicMappings()
call StartServer()

{'fraction_non_alphanumeric': 0.11706820495419071, 'fraction_numerical': 0.0023752969121140144, 'mean_word_length': 5.507726269315674, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2525841', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1017, 'n_words': 276}