From 42dd9cd4255554adb359661e7e3d93170e1230ac Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 12 Aug 2023 22:47:34 +0300 Subject: Update content for html --- ...-tried-emacs-but-i-switched-back-to-neovim.html | 68 ---------------------- 1 file changed, 68 deletions(-) (limited to 'gemfeed') diff --git a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html index b0f727ed..82ce1730 100644 --- a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html +++ b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html @@ -126,74 +126,6 @@ nmap ,i !wpbpaste<C E-Mail your comments to paul at buetow.org :-)

Back to the main site
-
-

Appendix


-
-This is the VimScript I mentioned earlier, which parses a table of contents index of my scanned paper journals and opens the corresponding PDF at the right page in zathura:
-
- -
function! ReadJournalPageNumber()
-    let page = expand("<cword>")
-    if page !~# '^\d\+$'
-        for str in split(getline("."), "[ ,]")
-            if str =~# '^\d\+$'
-                let page = str
-                break
-            end
-        endfor
-    endif
-    return page
-endfunction
-
-function! ReadJournalMeta()
-    normal! mj
-
-    1/MetaFilePath:/
-    normal! 3w
-    let s:metaFilePath = expand("<cWORD>")
-    echom s:metaFilePath
-
-    1/MetaOffset:/
-    normal! 3w
-    let s:metaOffset = expand("<cword>")
-    echom s:metaOffset
-
-    1/MetaPageAtOffset:/
-    normal! 3w
-    let s:metaPageAtOffset = expand("<cword>")
-    echom s:metaPageAtOffset
-
-    1/MetaPagesPerScan:/
-    normal! 3w
-    let s:metaPagesPerScan = expand("<cword>")
-    echom s:metaPagesPerScan
-
-    normal! `j
-endfunction
-
-function! GetPdfPage(page)
-    return s:metaOffset + (a:page - s:metaPageAtOffset) / s:metaPagesPerScan
-endfunction
-
-function! OpenJournalPage()
-    let page = ReadJournalPageNumber()
-    if page !~# '^\d\+$'
-        echoerr "Could not identify Journal page number"
-    end
-    call ReadJournalMeta()
-    let pdfPage = GetPdfPage(page)
-    echon "Location is " . s:metaFilePath . ":" . pdfPage
-    call system("zathura --mode fullscreen -P " . pdfPage . " " . s:metaFilePath)
-    " call system("evince -p " . pdfPage . " " . s:metaFilePath)
-endfunction
-
-nmap ,j :call OpenJournalPage()<CR>
-
-
-Back to the main site