serhii.net

In the middle of the desert you can say anything you want

07 Oct 2020

Day 646

Slack formatting

Format your messages | Slack:

  • ~strikethrough~, *bold*, _italic_.
  • > quoting is as usual.
  • Highlight text and paste a link -> create a link.
in:#team-marketing 
in:@sara

to:@anna

before:4/12/2019
after:4/12/2019
on:4/12/2019
during:april

has::white_check_mark:

has:pin
is:saved
has:link

vim folding by tab works again now!

Had to remove this snipped from vimrc:

augroup remember_folds
  autocmd!
  autocmd BufWinLeave *.* mkview
  autocmd BufWinEnter *.* loadview
augroup END

vim folding

Will now try to use almost exclusively folding by tabs. For this, these are going to be helpful: 1

zo		Open one fold under the cursor.  
zc		Close one fold under the cursor.  

zO		Open all folds under the cursor recursively.  
zC		Close all folds under the cursor recursively.  

za		When on a closed fold: open it.  
		When on an open fold: close it 
zA		When on a closed fold: open it recursively.
		When on an open fold: close it recursively 

zv		View cursor line: Open just enough folds to make the line in
		which the cursor is located not folded.

zX		Undo manually opened and closed folds: re-apply 'foldlevel'.
		Also forces recomputing folds, like |zx|.


zm		Fold more: Subtract one from 'foldlevel'.  
zM		Close all folds: set 'foldlevel' to 0.


zr		Reduce folding: Add one to 'foldlevel'.
zR		Open all folds.  This sets 'foldlevel' to highest fold level.


zn		Fold none: reset 'foldenable'.  All folds will be open.
zN		Fold normal: set 'foldenable'.  All folds will be as they
		were before.
zi		Invert 'foldenable'.


MOVING OVER FOLDS 

[z		Move to the start of the current open fold.  
]z		Move to the end of the current open fold.  
zj		Move downwards to the start of the next fold. 
zk		Move upwards to the end of the previous fold.  

TODO and XXX conventions

coding style - Where does the TODO convention come from? - Stack Overflow - XXX as marker for something dangerous. Fixme Comment in c2 wiki for more.

TODO vim highlighting

Very ugly but it works:

fun! SetTodo()
    syn match modo /.*MODO.*$/
    hi link modo Keyword
    syn match nodo /.*NODO.*$/
    hi link nodo javaScript
    syn match todo /\s*TODO.*$/
    hi link todo vbTodo
    syn match done /\s*DONE.*$/
    hi link done cssListProp
    syn match xxx /\s*XXX.*$/
    hi link xxx htmlError
endfu
autocmd filetype markdown :call SetTodo()
Nel mezzo del deserto posso dire tutto quello che voglio.