Skip to content

jens-na/vim-tasktimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

vim-tasktimer is a task timer for the Vim editor.

###Features

  • Starting/Stopping timer for tasks
  • List tasks in a seperate buffer

###Installation If you don't have a preferred way of installing Vim plugins I suggest to install vim-pathogen first and afterwards install vim-tasktimer like that:

cd ~/.vim/bundle
git clone https://github.com/jens-na/vim-tasktimer.git

If you really don't like to use pathogen you can still install it in the ~/.vim/ directory directly.

###Screenshot tasktimer

Usage

###Basic Commands

  • Use :TasktimerStart [<task>] to start a timer for a specific task
  • Use :TasktimerStatus to get information about the currently active task.
  • Use :TasktimerStop to stop the timer for the task
  • With :Tasktimer [<task...>] you can see all the tasks you have already timed

###Basic variables

  • g:tasktimer_timeformat the default output format for a time. See strftime(3) for the time format.
    Default: %Y-%m-%d %H:%M
  • g:tasktimer_dateformat the default output format for a date. See strftime(3) for the date format.
    Default: %Y-%m-%d

###Basic functions

  • g:tasktimer_formatfunc.format defines the function how to output a time.
  • g:tasktimer_formatfunc.format_total defines the output format of the total time of a task.
  • g:tasktimer_formatfunc.format_taskname defines the function how a task is displayed in the buffer.

Example format functions

  • decimal representation of all times
  • bugtracker prefix of all tasktimer entries
let g:tasktimer_formatfunc = {
 \ 'format' : 'Tasktimer_Custom_Format',
 \ 'format_total' : 'Tasktimer_Custom_Format',
 \ 'format_taskname' : 'Tasktimer_Custom_Taskname'
 \ }

function! Tasktimer_Custom_Format(seconds)
  let time = tasktimer#parsedecimal(a:seconds)
  return printf('%d,%.2d', time.hours, time.minutes)
endfunction

function! Tasktimer_Custom_Taskname(taskname)
  return "Bug-" . a:taskname
endfunction

The default output for a time is HH mm ss.

Example

You have to work on a change request named 'CR-223'. You can now start your task timer in Vim:

:TasktimerStart CR-223

When you are finished with the development of CR-223 you can stop the timer.

:TasktimerStop

If you later need to know the time of development for CR-223 you can see all the times with:

:Tasktimer CR-223

License and Copyright

Copyright (c) Jens Nazarenus. Distributed under the same terms as Vim itself. See :help license.

About

a task timer for the Vim editor

Resources

Stars

Watchers

Forks

Packages

No packages published