(no title)
lost-theory | 5 years ago
See how line 11 dynamically changes in this video based on whether his cursor is on the line:
https://youtu.be/C0OwhiCp2Hk?t=223
I believe this is done using "conceal" as JNRowe says, e.g. here:
https://github.com/vimwiki/vimwiki/blob/619f04f89861c58e5a64...
I also second what JNRowe says about trying the new popup feature. I recently used this to run a script that calculates something based on where my cursor is currently at in the file, then show the result at the cursor using a popup:
fun! CalculateFoodCalories()
let day = GetSectionName()
let day = substitute(day, "\[", "", "g")
let day = substitute(day, "\]", "", "g")
let out = split(trim(system("food --date=" . day)), "\n")
call popup_atcursor(out, #{ title: "Today's calories", highlight: 'Statement', border: [], padding: [1,2,1,2]})
endfun
nnoremap <silent> <leader>m :call CalculateFoodCalories()<CR>
lost-theory|5 years ago
I would look into using popups, a separate pane, or something like vim-notebook.