From 12beacac19daa4a9e9e4ae58b314895bef2f7833 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 8 Sep 2020 14:58:36 +0200 Subject: [PATCH] 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. --- nvim/.config/nvim/init.vim | 2 ++ nvim/.config/nvim/spell/en.utf-8.add | 1 + services/.config/systemd/user/dropdown-todo.service | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index fe53e5c..e29d82d 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -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 diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add index fa2bdfb..17b41b2 100644 --- a/nvim/.config/nvim/spell/en.utf-8.add +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -52,3 +52,4 @@ JIT Fordism embeddedness Zapatista +essentialism diff --git a/services/.config/systemd/user/dropdown-todo.service b/services/.config/systemd/user/dropdown-todo.service index 6ccd39c..871d3fb 100644 --- a/services/.config/systemd/user/dropdown-todo.service +++ b/services/.config/systemd/user/dropdown-todo.service @@ -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