mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 20:35:11 +01:00
Compare commits
2 Commits
38751d075b
...
680bf0196b
| Author | SHA1 | Date | |
|---|---|---|---|
| 680bf0196b | |||
| 796ffd9e34 |
@@ -51,16 +51,16 @@ highlight scratchThis ctermfg=Grey guifg=#666666
|
||||
" Task statuses
|
||||
syntax match todoNote "\v^\s{-}n .*$" nextgroup=todoNote
|
||||
syntax match todoNote "\v^ .*$" nextgroup=todoNote
|
||||
highlight todoNote ctermfg=Grey guifg=#666666
|
||||
highlight todoNote ctermfg=Grey guifg=#666666 cterm=italic
|
||||
|
||||
syntax match todoStatusDone "\v^\s{-}v " nextgroup=todoItem skipwhite
|
||||
highlight todoStatusDone ctermfg=green guifg=#00ff00
|
||||
|
||||
syntax match todoStatusCancelled "\v^\s{-}x .*$" nextgroup=todoItem skipwhite
|
||||
highlight todoStatusCancelled ctermfg=DarkGreen guifg=#005f00
|
||||
highlight todoStatusCancelled ctermfg=DarkGreen guifg=#005f00 cterm=italic
|
||||
|
||||
syntax match todoStatusDoing "\v^\s{-}d .*$" nextgroup=todoItem skipwhite
|
||||
highlight todoStatusDoing ctermfg=223 guifg=#f0dfaf
|
||||
highlight todoStatusDoing ctermfg=223 guifg=#f0dfaf cterm=italic
|
||||
|
||||
syntax match todoStatusTest "\v^\s{-}t " nextgroup=todoItem skipwhite
|
||||
highlight todoStatusTest ctermfg=darkcyan guifg=#6666ff
|
||||
@@ -70,7 +70,7 @@ highlight todoStatusTodo ctermfg=red guifg=#ff0000
|
||||
|
||||
syntax match todoStatusImportant "\v^\s{-}\> .*$" nextgroup=todoItem skipwhite
|
||||
syntax match todoStatusImportant "\v^\s{-}! .*$" nextgroup=todoItem skipwhite
|
||||
highlight todoStatusImportant ctermfg=167 guifg=#d75f5f
|
||||
highlight todoStatusImportant ctermfg=167 guifg=#d75f5f cterm=italic
|
||||
|
||||
syntax match todoStatusQuestion "\v^\s{-}\? " nextgroup=todoItem skipwhite
|
||||
highlight todoStatusQuestion ctermfg=darkcyan guifg=#6666ff
|
||||
|
||||
15
.vimrc
15
.vimrc
@@ -586,6 +586,21 @@ fun! TrimWhitespace()
|
||||
endfun
|
||||
command! TrimWhitespace call TrimWhitespace()
|
||||
|
||||
" Visually select text then press ~ to convert the text to UPPER CASE, then to lower case, then to Title Case.
|
||||
" Keep pressing ~ until you get the case you want.
|
||||
" https://vim.fandom.com/wiki/Switching_case_of_characters
|
||||
function! TwiddleCase(str)
|
||||
if a:str ==# toupper(a:str)
|
||||
let result = tolower(a:str)
|
||||
elseif a:str ==# tolower(a:str)
|
||||
let result = substitute(a:str,'\(\<\w\+\>\)', '\u\1', 'g')
|
||||
else
|
||||
let result = toupper(a:str)
|
||||
endif
|
||||
return result
|
||||
endfunction
|
||||
vnoremap ~ y:call setreg('', TwiddleCase(@"), getregtype(''))<CR>gv""Pgv
|
||||
|
||||
" enable words completion
|
||||
set dictionary+=/usr/share/dict/words
|
||||
" use ctrl-n ctrl-n instead of ctrl-x ctrl-k
|
||||
|
||||
Reference in New Issue
Block a user