aboutsummaryrefslogtreecommitdiffstats
path: root/vim/vimrc
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-05-11 21:11:25 +0100
committerMatthew Lemon <y@yulqen.org>2023-05-11 21:11:25 +0100
commitb9e16d08f8886aa3dab7dda34e6faf0e606adf12 (patch)
tree750cdd0b4854cad1387341c9585d4973d974feaf /vim/vimrc
parent9b8cdee1558ae3c2ba0d77c0d13cbd51afa56508 (diff)
Adds a function to remove a line from a vim file and add as a task in tw
Diffstat (limited to '')
-rw-r--r--vim/vimrc14
1 files changed, 13 insertions, 1 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 0db68c4..d7d1d55 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -13,6 +13,18 @@ nnoremap <leader>ev <C-w>s<C-w>j<C-w>L:e $MYVIMRC<cr>
let maplocalleader = "\\"
let mapleader = " "
+" Function to allow adding a line of text to taskwarrior
+function! TaskWarriorAddCurrentLine()
+ let current_line = getline('.')
+ silent execute ":!task add " . shellescape(current_line)
+ redraw!
+ echo "Task added: " . current_line
+ delete
+endfunction
+
+nnoremap <leader>q :call TaskWarriorAddCurrentLine()<CR>
+
+
" encryption method when using :X
set cm=blowfish2
@@ -477,7 +489,7 @@ augroup END
syntax off
set nohlsearch
set background=dark
-set cursorline
+"set cursorline
"set cursorcolumn
"set visualbell
highlight clear