summaryrefslogtreecommitdiff
path: root/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-04-09 14:09:09 +0300
committerPaul Buetow <paul@buetow.org>2023-04-09 14:09:09 +0300
commite33611dcfe0d77df67c6ee7e5c7aa71b6266bbd5 (patch)
tree0b03e2d30830e10127de655d973663961171bb3f /gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi
parentbd16830912308e880d26ac03863e1bd192c55f53 (diff)
Update content for gemtext
Diffstat (limited to 'gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi')
-rw-r--r--gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi5
1 files changed, 3 insertions, 2 deletions
diff --git a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi
index 7b6a1df1..26332a05 100644
--- a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi
+++ b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi
@@ -64,7 +64,8 @@ NeoVim is also programmable with Lua, which seems to be a step up and Vim comes
One example is my workflow of how I compose my blog articles (e.g. this one you are currently reading): I am writing everything in NeoVim, but I also want to have every paragraph checked against Grammarly (as English is not my first language). So I write a whole paragraph, then I select the entire paragraph via visual selection with `SHIFT+v`, and then I press `,y` to yank the paragraph to the systems clipboard, then I paste the paragraph to Grammarly's browser window with `CTRL+v`, let Grammarly suggest the improvements, and then I copy the result back with `CTRL+c` to the system clipboard and in NeoVim I type `,i` to insert the result back overriding the old paragraph (which is still selected in visual mode) with the new content. That all sounds a bit complicated, but it's surprisingly natural and efficient.
To come back to the example, for the clipboard integration, I use this small VimScript snippet, and I didn't have to dig into any Lisp or Perl for this:
-```
+
+```vim
" Clipboard
vnoremap ,y !pbcopy<CR>ugv
vnoremap ,i !pbpaste<CR>
@@ -117,7 +118,7 @@ E-Mail your comments to hi@paul.cyou :-)
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`:
-```
+```vim
function! ReadJournalPageNumber()
let page = expand("<cword>")
if page !~# '^\d\+$'