On 9/21/24 1:03 AM, Oğuz wrote:
On Saturday, September 21, 2024, Koichi Murase <myoga.mur...@gmail.com <mailto:myoga.mur...@gmail.com>> wrote:Emacs has `auto-mode-alist'. VS Code has `files.associations'. I think he meant a command line option. Like something you can put in FCEDIT
I did. But if there aren't any options to select the syntax editing mode, you can use an approach like this: : ${EDITOR:=emacs} case $1 in *.bash) FN=$1 MV=':' ;; *) FN=${1}.bash MV=mv ;; esac $MV "$1" "$FN" $EDITOR "$FN" $MV "$FN" "$1" Wrap that in a script or function and assign it to FCEDIT. You could also use ln and rm instead of mv, but this works. And test it; I didn't. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature