11" MIT License
22"
3- " Copyright (c) 2018 Alexander Serebryakov ([email protected] )3+ " Copyright (c) 2019 Alexander Serebryakov ([email protected] )44"
55" Permission is hereby granted, free of charge, to any person obtaining a copy
66" of this software and associated documentation files (the "Software"), to
@@ -327,6 +327,12 @@ function! VimTodoListsSetItemMode()
327327 vnoremap <buffer> <Space> :VimTodoListsToggleItem<CR>
328328 inoremap <buffer> <CR> <CR><ESC> :VimTodoListsCreateNewItem<CR>
329329 noremap <buffer> <leader> e :silent call VimTodoListsSetNormalMode()<CR>
330+ nnoremap <buffer> <Tab> :VimTodoListsIncreaseIndent<CR>
331+ nnoremap <buffer> <S-Tab> :VimTodoListsDecreaseIndent<CR>
332+ vnoremap <buffer> <Tab> :VimTodoListsIncreaseIndent<CR>
333+ vnoremap <buffer> <S-Tab> :VimTodoListsDecreaseIndent<CR>
334+ inoremap <buffer> <Tab> <ESC> :VimTodoListsIncreaseIndent<CR> A
335+ inoremap <buffer> <S-Tab> <ESC> :VimTodoListsDecreaseIndent<CR> A
330336endfunction
331337
332338
@@ -392,6 +398,15 @@ function! VimTodoListsToggleItem()
392398 call cursor (l: cursor_pos [1 ], l: cursor_pos [4 ])
393399endfunction
394400
401+ " Increases the indent level
402+ function ! VimTodoListsIncreaseIndent ()
403+ normal ! >>
404+ endfunction
405+
406+ " Decreases the indent level
407+ function ! VimTodoListsDecreaseIndent ()
408+ normal ! <<
409+ endfunction
395410
396411" Plugin startup code
397412if ! exists (' g:vimtodolists_plugin' )
@@ -415,5 +430,7 @@ if !exists('g:vimtodolists_plugin')
415430 command ! VimTodoListsGoToNextItem silent call VimTodoListsGoToNextItem ()
416431 command ! VimTodoListsGoToPreviousItem silent call VimTodoListsGoToPreviousItem ()
417432 command ! - range VimTodoListsToggleItem silent <line1> ,<line2> call VimTodoListsToggleItem ()
433+ command ! - range VimTodoListsIncreaseIndent silent <line1> ,<line2> call VimTodoListsIncreaseIndent ()
434+ command ! - range VimTodoListsDecreaseIndent silent <line1> ,<line2> call VimTodoListsDecreaseIndent ()
418435endif
419436
0 commit comments