This series of Neovim videos is nuts. I watched everything on YT about Neovim, yet there are so many great and PRACTICAL things here, which I didn't know.
Some really nice tips in here, forgot that external commands can take a range, and really liked the keymaps to execute lines of a file in the shell. Seems super useful particularly when working with scripts.
If your script can work with multiple lines you can just create a mapping in visual mode: vim.keymap.set({ "n", "v" }, "xx", ":!sort -n -k 2", opts) -- here is example of calling external sort command I would suggest adding your script location to PATH and add node #! so you can just call the script name.
Fantastic. Very well structured and delivered.
This series of Neovim videos is nuts. I watched everything on YT about Neovim, yet there are so many great and PRACTICAL things here, which I didn't know.
Woohoo, awesome! More to come :). Working on tutorial for writing simple custom lua functions.
Really useful tips. I learned a lot, thanks !
Some really nice tips in here, forgot that external commands can take a range, and really liked the keymaps to execute lines of a file in the shell. Seems super useful particularly when working with scripts.
Thank you! The range one is super useful when executing code snippets from a markdown document.
thanks for those nice tips man.
Nice tips thank you
nice one
Just an fyi, vim has an in build sort command. So after selection, we can simply put sort. So :'
Thank you, this is also more predictable because there might be different versions of coreutils on a machine.
How to execute the shell command on text selected in the buffer? smth like:
"'
If your script can work with multiple lines you can just create a mapping in visual mode:
vim.keymap.set({ "n", "v" }, "xx", ":!sort -n -k 2", opts) -- here is example of calling external sort command
I would suggest adding your script location to PATH and add node #! so you can just call the script name.
:r !cat file is the same as :r file btw
Nice catch, thank you!