Skip to content

talha131/logpad-plus-duration

master
Switch branches/tags
Code
This branch is 7 commits ahead, 2 commits behind vim-scripts:master.
Contribute

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Logpad + Duration

Vim plugin to emulate Windows Notepad logging feature, and log duration of each entry.

Author Talha Mansoor
Author Email talha131@gmail.com
Author Homepage http://onCrashReboot.com
Github Account https://github.com/talha131

Credits

This plugin is a fork of logpad plugin by Sven Knurr.

Background

It is suggested to keep a daily log to stay focused on productivity. Life Hacker did an article on it. I looked for plugin to have similar feature in Vim and that landed me on Logpad plugin.

Wouldn't it be nice if besides logging, we can also see how much time was spent on the latest activity? This is exactly what this plugin attempts to do. If you enable it, it will calculate the time elapsed and insert it in the file.

With this plugin you get all the features of Logpad plugin plus log duration feature.

How to use it

Create a new file, write .LOG as the first line and save it. Every time you reopen the file, a new line with the current timestamp is added, so you can easily maintain a chronologic log of your tasks.

Options

By default, this plugin works the same way as the original Notepad. You can modify certain aspects of it by setting the following variables:

let LogpadEnabled = 1

  • enables/disables logpad
  • available values : [0, 1]
  • default value: 1

let LogpadInsert = 0

  • automatically enables insert mode when a new log entry is created
  • available values : [0, 1]
  • default value: 0

let LogpadLineBreak = 0

  • adds an empty line before a new log entry
  • available values : [0, 1]
  • default value: 0 (Windows Notepad behavior)

let LogpadIgnoreNotes = 0

  • allows adding notes before the first log entry
  • available values : [0, 1]
  • default value: 0

let LogpadIgnoreReadOnly = 0

  • allows logpad to ignore a file's read-only flag
  • available values : [0, 1]
  • default value: 0

let LogpadLogDuration = 1

  • adds the time elapsed since last timestamp under the new timestamp
  • available values : [0 ,1]
  • default value: 0

Example (without LogpadLogDuration)

.LOG
Sun Jul 14 17:38:44 2013
First entry of the day
Sun Jul 14 17:46:11 2013
Replied to customer emails.
Sun Jul 14 18:41:43 2013
Skype session with remote team.

Example (with LogpadLogDuration)

If LogpadLogDuration is set then time elapsed since last event will also be added.

.LOG
Sun Jul 14 17:38:44 2013
First entry of the day
Sun Jul 14 17:46:11 2013
Time elapsed: 7 min 27 sec
Replied to customer emails.
Sun Jul 14 18:41:43 2013
Time elapsed: 55 min 32 sec 
Skype session with remote team.

Now you can see that your Skype session took 55 min. Your replied to emails within 7 min. Without this feature, you will have to do mental maths to calculate the time it took you to do a work.

About

Vim plugin to emulate Windows Notepad logging feature, and log duration of each entry

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%