commit 63217082456c2874f4f934ef1a7a19f596f0dc8b Author: Dia Pacifica Date: Tue Oct 1 19:20:31 2024 -0700 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..27cb050 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# vimlistsyntax + +Bash script which lists all available syntax hightlight styles for Vim. + +- use Vim's :redir to output 'echo &rtp' to text file +- search Vim runtimepath (rtp) for .vim syntax definition files +- use Python os.scandir() for fast searches of directories + + +## Installation + +Copy `vimlistsyntax` to a chosen direcory in $PATH such as `$HOME/bin` or `/usr/local/bin` + + +## Usage +```bash +vimlistsyntax +``` diff --git a/vimlistsyntax b/vimlistsyntax new file mode 100755 index 0000000..7f966f6 --- /dev/null +++ b/vimlistsyntax @@ -0,0 +1,22 @@ +#!/bin/bash +# +# vimlistsyntax +# +# Script to list all available syntax hightlight styles for Vim. +# +# Credit & thanks to 'habamax' and 'm_ben' on libera.chat #vim +# +# Pico +# +# Wed, 07 Dec 2022 18:43:01 -0700 +# + +/usr/bin/vim -c 'call writefile(getcompletion("", "syntax"), "/tmp/ahw2AkoCh7figh4")' -c q 2>/dev/null + +#while read line; do +# echo "$line" +#done < "/tmp/ahw2AkoCh7figh4" + +/usr/bin/column -x /tmp/ahw2AkoCh7figh4 | less + +rm /tmp/ahw2AkoCh7figh4