nvim: Fix 'vim:' modeline, add paragraph highlights

Fixed bug when line in todo dropdown starts with `vim:`, `vi:`, or `:ex`
which would automatically be read by vim and tried to be set in the
editor. Removed modeline reading from vim to fix the bug, and since it
provides quite an attack vector anyway.

Added Limelight to its startup procedure to highlight the current to-do
paragraph.
This commit is contained in:
Marty Oehme 2020-09-08 14:58:36 +02:00
parent 4774cd5b15
commit 12beacac19
No known key found for this signature in database
GPG Key ID: 0CCB0526EFB9611A
3 changed files with 4 additions and 1 deletions

View File

@ -148,6 +148,8 @@ au FocusLost * :wa
" disables showing us the current mode in the command line since airline takes
" care of it
set noshowmode
" turn off modeline, to ensure security observation
set nomodeline
" i feel foldlevel 2 is generally pretty usable, for headlines and similar
set foldlevel=2

View File

@ -52,3 +52,4 @@ JIT
Fordism
embeddedness
Zapatista
essentialism

View File

@ -4,7 +4,7 @@ Description=Todo.md floating vim instance
[Service]
Type=simple
# workaround to allow relative executable invocation (i.e. current users' home dir)
ExecStart=/bin/bash -c 'alacritty --title "dropdown-todo" --class "Alacritty,scratchpad" -e nvim -c ":set nonumber norelativenumber noshowmode noruler laststatus=0 noshowcmd shortmess=F" %h/documents/records/todo.md'
ExecStart=/bin/bash -c 'alacritty --title "dropdown-todo" --class "Alacritty,scratchpad" -e nvim -c ":set nonumber norelativenumber noshowmode noruler laststatus=0 noshowcmd shortmess=F | :Limelight" %h/documents/records/todo.md'
Restart=always
RestartSec=5