diff options
| -rw-r--r-- | gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi | 24 |
1 files changed, 10 insertions, 14 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 469dff6f..db8507f4 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 @@ -1,6 +1,6 @@ -# I tried Doom Emacs, but I switched back to (Neo)Vim +# I tried (Doom) Emacs, but I switched back to (Neo)Vim -> Published by Paul at 2021-11-24 +> Published by Paul at 2022-11-24, last updated 2022-11-26 ``` _/ \ _(\(o @@ -64,19 +64,11 @@ 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: - ``` " Clipboard - -if uname != 'Darwin' - vnoremap ,y !gpaste-client<CR>ugv - vnoremap ,i !gpaste-client --use-index get 0<CR> - nmap ,i !wgpaste-client --use-index get 0<CR> -else - vnoremap ,y !pbcopy<CR>ugv - vnoremap ,i !pbpaste<CR> - nmap ,i !wpbpaste<CR> -endif +vnoremap ,y !pbcopy<CR>ugv +vnoremap ,i !pbpaste<CR> +nmap ,i !wpbpaste<CR> ``` That's only a very few lines and does precisely what I want. It's quick and dirty but get's the job done! If VimScript becomes too cumbersome, I can use Lua for NeoVim scripting. @@ -89,7 +81,7 @@ Org-mode is an Emacs mode for keeping notes, authoring documents, computational In short, Org-mode is an "interactive markup language" that helps you organize everything mentioned above. I rarely touched the surface during my two-month experiment with Emacs, and I am impressed by it, so I see the benefits of having that. But it's not for me. -I use "Dead Paper Mode" to organize my work and notes. Dead paper? Yeah, I use an actual pen and a real paper journal (Leuchtturm or a Moleskine and a set of coloured `0.5` Muji Pens are excellent choices). That's far more immersive and flexible than a computer program can ever be. Yes, some automation and interaction with the computer (like calendar scheduling etc.) are missing. Still, an actual paper journal forces you to stay simple and focus on the actual work rather than tinkering with your computer program. (But I could not resist, and I wrote a VimScript which parses a table of contents page in Markdown format of my scanned paper journals, and NeoVim allows me to select a topic so that the corresponding PDF scan on the right journal page gets opened in an external PDF viewer (the PDF viewer is `zathura`, it uses Vi-keybindings, of course) :-). (See the appendix of this blog post for that script). +I use "Dead Tree Mode" to organize my work and notes. Dead tree? Yeah, I use an actual pen and a real paper journal (Leuchtturm or a Moleskine and a set of coloured `0.5` Muji Pens are excellent choices). That's far more immersive and flexible than a computer program can ever be. Yes, some automation and interaction with the computer (like calendar scheduling etc.) are missing. Still, an actual paper journal forces you to stay simple and focus on the actual work rather than tinkering with your computer program. (But I could not resist, and I wrote a VimScript which parses a table of contents page in Markdown format of my scanned paper journals, and NeoVim allows me to select a topic so that the corresponding PDF scan on the right journal page gets opened in an external PDF viewer (the PDF viewer is `zathura`, it uses Vi-keybindings, of course) :-). (See the appendix of this blog post for that script). => https://pwmt.org/projects/zathura/ Zathura @@ -113,6 +105,10 @@ I understand the Emacs users now. Emacs is an incredibly powerful platform for a Vim/NeoVim also comes with a very high degree of customization options, but to a lesser extreme than Emacs (but still, a much higher degree than most other editors out there). If you want the best text editor in the world, which can also be tweaked to be a decent IDE, you are only looking for: Pick Vim or NeoVim! You would also need to invest a lot of time in learning, tweaking and customizing Vim/NeoVim, but that's a little more straightforward, and the result is much more lightweight once you get used to the "Vi way of doing things" you never would want to change back. I haven't tried the Emacs vanilla keystrokes, but they are terrible (that's probably one of the reasons why Doom Emacs uses Vim keybindings by default). +> Update: One reader recommended to have a look at NvChad. NvChad is a NeoVim config written in Lua aiming to provide a base configuration with very beautiful UI and blazing fast startuptime (around `0.02` secs ~ `0.07` secs). They tweak UI plugins such as telescope, nvim-tree, bufferline etc well to provide an aesthetic UI experience. That sounds interesting! + +=> https://github.com/NvChad/NvChad + E-Mail your comments to paul at buetow dot org! :-) => ../ Go back to the main site |
