/toggl.vim

Toggl client in vim script

Primary LanguageVim ScriptMIT LicenseMIT

toggl.vim

Toggl client for vimscript and vim.

Dependences

  • vital.vim
  • unite.vim (optional)

Usage

Set your API token

let g:toggl_api_token = "b51ff78xxxxxxxxxxxxxxxxxxxxxxxxx"

Set your workspace ID (optional) Note: If you don't set this, toggl.vim will default to your first workspace

let g:toggl_workspace_id = 987654321

Start task

:TogglStart task name +project @tag1 @tag2
:TogglStart task name
:TogglSelectStart

Stop current task

:TogglStop

Update cache

:TogglCacheUpdate

Check task

:TogglTask

Check time

:TogglTime

unite.vim interface

There are two sources:

:Unite toggl/task

which helps you to restart past time entries.

:Unite toggl/project

which helps you to change the project of current task.

Show lightline.vim

You can always check task on vim.

let g:lightline = {
            \ 'colorscheme': 'jellybeans',
            \ 'active': {
            \   'left': [
            \       ['mode', 'paste'],
            \       ['readonly', 'filename', 'modified']
            \   ],
            \   'right': [ [ 'syntastic', 'lineinfo' ],
            \              [ 'toggl_task', 'toggl_time', 'percent' ],
            \              [ 'fileformat', 'fileencoding', 'filetype' ] ]
            \ },
            \ 'component_function': {
            \   'toggl_task': 'toggl#task',
            \   'toggl_time': 'toggl#time',
            \ }
            \ }

Sample key mapping

let g:toggl_api_token = "xxxxxxxxxx"
nnoremap tt :TogglStop<CR>
vnoremap tt :TogglSelectStart<CR>

License

MIT (see LICENSE file)