Type :% refers to the file
Type :%!sort
Type :%!uniq -u
Type :%!sort | uniq -u
Type :! [command]
to execute a shell command such as ls
Type :r ! [command]
to write the output of the command to the current file opened
Type :! ./%
to execute the file you have opened in vim
To execute the current line in vim terminal
:.w !bash
To execute selected line in vim terminal
enter v
to get into visual mode, move cursor to select the desired lines
enter :w !bash
to execute the selected lines and print the output in terminal
References:
:%s/ /\r/g
to replace all space with new line
The majority of the setup follows ThePrimeagen's "0 to LSP: Neovim RC From Scratch" tutorial. I did not install all the plugins he installed and did not adopt the majority of his key binding remaps.
Plugins I use but not included in ThePrimeagen's setup: