-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathquicktask.vim
More file actions
executable file
·48 lines (45 loc) · 1.71 KB
/
quicktask.vim
File metadata and controls
executable file
·48 lines (45 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
" quicktask.vim: A lightweight task management plugin.
"
" Author: Aaron Bieber
" Version: 1.4
" Date: 25 January 2014
"
" See the documentation in doc/quicktask.txt
"
" Quicktask is free software: you can redistribute it and/or modify it under
" the terms of the GNU General Public License as published by the Free
" Software Foundation, either version 3 of the License, or (at your option)
" any later version.
"
" Quicktask is distributed in the hope that it will be useful, but WITHOUT ANY
" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
" details.
"
" You should have received a copy of the GNU General Public License along with
" Quicktask. If not, see <http://www.gnu.org/licenses/>.
" Set all buffer-local settings: {{{1
let s:version = '1.4'
" ============================================================================
" QTInit(): Initialize a new task list. {{{1
"
" Create a new Quicktask file in a new buffer.
function! QTInit()
if len(expand('%:p')) || &modified
execute "new"
endif
setlocal filetype=quicktask
let new_task_list = [ '# Quicktask v'.s:version,
\'',
\'CURRENT TASKS:',
\' - My first task.',
\' @ Added ['.strftime("%a %Y-%m-%d").']',
\'COMPLETED TASKS:',
\'',
\'# vim:ft=quicktask']
call append(0, new_task_list)
execute "normal GddggzR"
endfunction
" ============================================================================
" Commands {{{1
command! QTInit call QTInit()