Advertisement
Guest User

Untitled

a guest
Jan 15th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.73 KB | None | 0 0
  1. " GTD "
  2. function! LoadCompteurs()
  3.     let g:noAction=readfile("compteurs")[1]
  4.     let g:noProjet=readfile("compteurs")[3]
  5. endfunction
  6.  
  7. function! AssignerNoAction()
  8.     let noAssigne = g:noAction
  9.     let g:noAction = g:noAction + 1
  10.     return noAssigne
  11. endfunction
  12.  
  13. function! AssignerNoProjet()
  14.     let noAssigne = g:noProjet
  15.     let g:noProjet = g:noProjet + 1
  16.     return noAssigne
  17. endfunction
  18.  
  19. nmap ZL :call LoadCompteurs()<CR>
  20. nmap ZU :new compteurs<CR>:2<CR>cc<c-r>=noAction<CR><ESC>:4<CR>cc<c-r>=noProjet<CR><ESC>:wq<CR>
  21. nmap ZA i<c-r>=printf('A%04d', AssignerNoAction())<CR><ESC>
  22. nmap ZP i<c-r>=printf('P%04d', AssignerNoProjet())<CR><ESC>
  23.  
  24. " Probablement pour GTD mais souvent pratique "
  25. set linebreak
  26. set breakindent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement