Fix syntax for setting vim filetype in templates

main
Buddy Sandidge 2 years ago
parent aa1348fbe2
commit def01bdb01

@ -1,2 +1 @@
. "${HOME}/.bashrc" source "${HOME}/.bashrc"
# vim: filetype=bash

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=bash */}} #{{- /* vim: set filetype=bash: */ -}}
#!/usr/bin/env bash
source "${HOME}/.profile" source "${HOME}/.profile"
@ -21,6 +21,7 @@ if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then
source "$file" source "$file"
fi fi
done done
unset file
fi fi
if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then

@ -1,5 +1,5 @@
#chezmoi:template:left-delimiter=#{{ #chezmoi:template:left-delimiter=#{{
#{{- /*- vim: filetype=bash */ -}} #{{- /* vim: set filetype=bash: */ -}}
if [[ ${BASH_VERSION} != "3.2*" ]]; then if [[ ${BASH_VERSION} != "3.2*" ]]; then
shopt -s autocd shopt -s autocd
fi fi

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=bash */ -}} #{{- /* vim: set filetype=bash: */ -}}
#{{ if stat "/etc/bash_completion" -}} #{{ if stat "/etc/bash_completion" -}}
source /etc/bash_completion source /etc/bash_completion

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=sh */ -}} #{{- /* vim: set filetype=bash: */ -}}
#shellcheck disable=SC2034 #shellcheck disable=SC2034
HISTTIMEFORMAT='%y-%m-%d %T λ ' HISTTIMEFORMAT='%y-%m-%d %T λ '
QUOTING_STYLE=literal QUOTING_STYLE=literal

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=bash */ -}} #{{- /* vim: set filetype=bash: */ -}}
#{{ if not (lookPath "starship") -}} #{{ if not (lookPath "starship") -}}
#{{ if lookPath "git" -}} #{{ if lookPath "git" -}}

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=sh */ -}} #{{- /* vim: set filetype=sh: */ -}}
#{{ if lookPath "helm" -}} #{{ if lookPath "helm" -}}
eval "$(helm completion fish)" eval "$(helm completion fish)"
#{{- end }} #{{- end }}

@ -1,6 +1,6 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
# chezmoi:template:right-delimiter=}}# # chezmoi:template:right-delimiter=}}#
#{{- /* vim: filetype=gitconfig */ -}}# #{{- /* vim: set filetype=gitconfig: */ -}}#
#{{ if lookPath "git" -}}# #{{ if lookPath "git" -}}#
[core] [core]
editor = vim editor = vim

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=conf */ -}} #{{- /* vim: set filetype=gitconfig: */ -}}
#{{ if lookPath "git" -}} #{{ if lookPath "git" -}}
################################################################################ ################################################################################
## This global gitignore file is assembled based the github gitignore project: ## This global gitignore file is assembled based the github gitignore project:

@ -1,6 +1,6 @@
// chezmoi:template:left-delimiter="/*{{" // chezmoi:template:left-delimiter="/*{{"
// chezmoi:template:right-delimiter="}}*/" // chezmoi:template:right-delimiter="}}*/"
/*{{- /* vim: filetype=javascript */ -}}*/ /*{{- /* vim: set filetype=javascript: */ -}}*/
/*{{ if and .hellotech (lookPath "node") -}}*/ /*{{ if and .hellotech (lookPath "node") -}}*/
#!/usr/bin/env node #!/usr/bin/env node

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=i3config */ -}} #{{- /* vim: set filetype=i3config: */ -}}
#{{ if lookPath "i3" -}} #{{ if lookPath "i3" -}}
# This file has been auto-generated by i3-config-wizard(1). # This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like. # It will not be overwritten, so edit it as you like.

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=i3config */ -}} #{{- /* vim: set filetype=i3config: */ -}}
#{{ if lookPath "i3status" -}} #{{ if lookPath "i3status" -}}
# i3status configuration file. # i3status configuration file.
# see "man i3status" for documentation. # see "man i3status" for documentation.

@ -1,3 +1,6 @@
# chezmoi:template:left-delimiter="{{
"{{- /* vim: set filetype=vim: */ -}}
"{{ if .development -}}
set visualbell set visualbell
set noerrorbells set noerrorbells
set relativenumber set relativenumber
@ -159,3 +162,4 @@ set noerrorbells
set novisualbell set novisualbell
set t_vb= set t_vb=
set timeoutlen=500 set timeoutlen=500
"{{- end }}

@ -1,6 +1,6 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
# chezmoi:template:right-delimiter=}}# # chezmoi:template:right-delimiter=}}#
#{{- /* vim: filetype=conf */ -}}# #{{- /* vim: set filetype=conf: */ -}}#
#{{ if lookPath "lf" -}}# #{{ if lookPath "lf" -}}#
set drawbox true set drawbox true
set hidden true set hidden true

@ -1,6 +1,6 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
# chezmoi:template:right-delimiter=}}# # chezmoi:template:right-delimiter=}}#
#{{- /* vim: filetype=sh */ -}}# #{{- /* vim: set filetype=sh: */ -}}#
#shellcheck disable=SC2034 #shellcheck disable=SC2034
BROWSER=firefox BROWSER=firefox
HISTCONTROL=ignoredups:erasedups:ignorespace HISTCONTROL=ignoredups:erasedups:ignorespace

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=sh */ -}} #{{- /* vim: set filetype=sh: */ -}}
alias ll='ls -alF' alias ll='ls -alF'
alias curl='curl --proto-default https --silent ' alias curl='curl --proto-default https --silent '
alias to_lower="tr '[:upper:]' '[:lower:]'" alias to_lower="tr '[:upper:]' '[:lower:]'"

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=sh */ -}} #{{- /* vim: set filetype=sh: */ -}}
#{{- if lookPath "go" -}} #{{- if lookPath "go" -}}
#{{- if stat "/usr/local/apps/golang/current/bin" }} #{{- if stat "/usr/local/apps/golang/current/bin" }}
if [ -d /usr/local/apps/golang/current/bin ] && ! echo "${PATH}" | grep -q /usr/local/apps/golang/current/bin ; then if [ -d /usr/local/apps/golang/current/bin ] && ! echo "${PATH}" | grep -q /usr/local/apps/golang/current/bin ; then

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=sh */ -}} #{{- /* vim: set filetype=sh: */ -}}
#{{- if .hellotech -}} #{{- if .hellotech -}}
k8s_last_config () ( k8s_last_config () (

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=toml */ -}} #{{- /* vim: set filetype=toml: */ -}}
#{{- if lookPath "starship" -}} #{{- if lookPath "starship" -}}
# Get editor completions based on the config schema # Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json' "$schema" = 'https://starship.rs/config-schema.json'

@ -1,6 +1,6 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
# chezmoi:template:right-delimiter=}}# # chezmoi:template:right-delimiter=}}#
#{{- /* vim: filetype=systemd */ -}}# #{{- /* vim: set filetype=systemd: */ -}}#
#{{- if lookPath "podman" -}}# #{{- if lookPath "podman" -}}#
[Unit] [Unit]
Description=Podman service Description=Podman service

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=bash */ -}} #{{- /* vim: set filetype=bash: */ -}}
#{{- if and (lookPath "tmux") (eq .chezmoi.os "darwin") -}} #{{- if and (lookPath "tmux") (eq .chezmoi.os "darwin") -}}
#!/usr/bin/env bash #!/usr/bin/env bash

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter="# {{" # chezmoi:template:left-delimiter="# {{"
# {{- /* vim: filetype=tmux */ -}} # {{- /* vim: set filetype=tmux: */ -}}
# {{- if lookPath "tmux" -}} # {{- if lookPath "tmux" -}}
################################################################################ ################################################################################
# Base configuration # Base configuration

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: ft=sh */ -}} #{{- /* vim: set filetype=sh: */ -}}
#{{- if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") -}} #{{- if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") -}}
# If you want to change or add directories, just edit the line you're # If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run. # interested in. All local changes will be retained on the next run.

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter="{{ # chezmoi:template:left-delimiter="{{
"{{- /* vim: filetype=vim */ -}} "{{- /* vim: set filetype=vim: */ -}}
"{{- if lookPath "go" -}} "{{- if lookPath "go" -}}
set noexpandtab set noexpandtab

@ -1,5 +1,5 @@
" chezmoi:template:left-delimiter="{{ " chezmoi:template:left-delimiter="{{
"{{- /* vim: filetype=vim */ -}} "{{- /* vim: set filetype=vim: */ -}}
"{{- if lookPath "rustc" -}} "{{- if lookPath "rustc" -}}
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1
"{{- end }} "{{- end }}

@ -1,5 +1,5 @@
" chezmoi:template:left-delimiter="{{ " chezmoi:template:left-delimiter="{{
"{{- /* vim: filetype=vim */ -}} "{{- /* vim: set filetype=vim: */ -}}
"{{- if lookPath "fzf" -}} "{{- if lookPath "fzf" -}}
Plug 'junegunn/fzf', { 'tag': '0.40.0' } Plug 'junegunn/fzf', { 'tag': '0.40.0' }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'

@ -1,5 +1,5 @@
" chezmoi:template:left-delimiter="{{ " chezmoi:template:left-delimiter="{{
"{{- /* vim: filetype=vim */ -}} "{{- /* vim: set filetype=vim: */ -}}
"{{- if lookPath "go" -}} "{{- if lookPath "go" -}}
Plug 'fatih/vim-go' Plug 'fatih/vim-go'
"{{- end }} "{{- end }}

@ -1,5 +1,5 @@
" chezmoi:template:left-delimiter="{{ " chezmoi:template:left-delimiter="{{
"{{- /* vim: filetype=vim */ -}} "{{- /* vim: set filetype=vim: */ -}}
"{{- if lookPath "rustc" -}} "{{- if lookPath "rustc" -}}
Plug 'rust-lang/rust.vim', { 'for': 'rust' } Plug 'rust-lang/rust.vim', { 'for': 'rust' }
"{{- end }} "{{- end }}

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=snippets */ -}} #{{- /* vim: set filetype=snippets: */ -}}
#{{- if lookPath "go" -}} #{{- if lookPath "go" -}}
snippet ignore "ignore function" ! snippet ignore "ignore function" !
func(...any) {}(${1}) func(...any) {}(${1})

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=zsh */ -}} #{{- /* vim: set filetype=zsh: */ -}}
setopt autocd setopt autocd
setopt autopushd setopt autopushd
setopt pushdignoredups setopt pushdignoredups

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=jq */ -}} #{{- /* vim: set filetype=jq: */ -}}
#{{- if lookPath "jq" -}} #{{- if lookPath "jq" -}}
def reset: "\u001b[0m"; def reset: "\u001b[0m";
def black: "\u001b[30m"; def black: "\u001b[30m";

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=jq */ -}} #{{- /* vim: set filetype=jq: */ -}}
#{{- if lookPath "jq" -}} #{{- if lookPath "jq" -}}
def browser: env.BROWSER; def browser: env.BROWSER;
def editor: env.EDITOR; def editor: env.EDITOR;

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=jq */ -}} #{{- /* vim: set filetype=jq: */ -}}
#{{- if lookPath "jq" -}} #{{- if lookPath "jq" -}}
def by_time: sort_by(.created_at) | reverse; def by_time: sort_by(.created_at) | reverse;

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{ # chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=jq */ -}} #{{- /* vim: set filetype=jq: */ -}}
#{{- if and .hellotech (lookPath "jq") -}} #{{- if and .hellotech (lookPath "jq") -}}
import "colors" as colors; import "colors" as colors;

@ -1,7 +1,7 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=bash: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env bash #!/usr/bin/env bash
java -jar "$XDG_DATA_HOME/duck-encoder/duck-encoder.jar" $* java -jar "$XDG_DATA_HOME/duck-encoder/duck-encoder.jar" $*
#{{- end }}
# vim: ft=bash
{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=perl: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env perl #!/usr/bin/env perl
# Get sorted list files # Get sorted list files
@ -14,4 +16,4 @@ foreach my $file (@sortedFiles) {
my $fileSortedPrintCmd = "du -s \"$realFileName\""; my $fileSortedPrintCmd = "du -s \"$realFileName\"";
print `$fileSortedPrintCmd`; print `$fileSortedPrintCmd`;
} }
{{- end }} #{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=python: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env python #!/usr/bin/env python
""" """
This is a program that attempts to get all the album art from amazon This is a program that attempts to get all the album art from amazon
@ -169,5 +171,4 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
main() main()
#{{- end }}
{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=python: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env python3 #!/usr/bin/env python3
from functools import partial from functools import partial
@ -118,4 +120,4 @@ if __name__ == '__main__':
parser.add_argument('-d', '--directory', default=Path('.'), type=Path) parser.add_argument('-d', '--directory', default=Path('.'), type=Path)
args = parser.parse_args() args = parser.parse_args()
main(args.directory) main(args.directory)
{{- end }} #{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=python: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env python3 #!/usr/bin/env python3
''' '''
@ -83,4 +85,4 @@ if __name__ == "__main__":
message = "" message = ""
main(file_name=file_name, dir_name=dir_name, message=message) main(file_name=file_name, dir_name=dir_name, message=message)
{{- end }} #{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=python: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
@ -116,4 +118,4 @@ if __name__ == '__main__':
options, args = parser.parse_args() options, args = parser.parse_args()
main(options, args) main(options, args)
{{- end }} #{{- end }}

@ -1,6 +1,8 @@
{{ if .include_legacy -}} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=bash: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env bash #!/usr/bin/env bash
sudo systemctl start lego@toy.xbudex.com.service sudo systemctl start lego@toy.xbudex.com.service
scp /etc/ssl/certificates/toy.xbudex.com.crt toy.xbudex.com:AppData/Local/Syncthing/https-cert.pem scp /etc/ssl/certificates/toy.xbudex.com.crt toy.xbudex.com:AppData/Local/Syncthing/https-cert.pem
scp /etc/ssl/certificates/toy.xbudex.com.key toy.xbudex.com:AppData/Local/Syncthing/https-key.pem scp /etc/ssl/certificates/toy.xbudex.com.key toy.xbudex.com:AppData/Local/Syncthing/https-key.pem
{{- end }} #{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy }} # chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=bash: */ -}}
#{{ if .include_legacy -}}
#!/bin/bash #!/bin/bash
LINES=$(tput lines) LINES=$(tput lines)
@ -39,4 +41,4 @@ do
sleep 0.1 sleep 0.1
done done
{{- end }} #{{- end }}

@ -1,3 +1,6 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
export LANGUAGE=en_US:en export LANGUAGE=en_US:en
export LC_MESSAGES=en_US.UTF-8 export LC_MESSAGES=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8 export LC_CTYPE=en_US.UTF-8
@ -12,7 +15,7 @@ export XDG_DATA_HOME="${XDG_DATA_HOME:=$HOME/.local/share}"
export XDG_INCLUDE_HOME="${XDG_INCLUDE_HOME:=$HOME/.local/include}" export XDG_INCLUDE_HOME="${XDG_INCLUDE_HOME:=$HOME/.local/include}"
export XDG_STATE_HOME="${XDG_STATE_HOME:=$HOME/.local/state}" export XDG_STATE_HOME="${XDG_STATE_HOME:=$HOME/.local/state}"
{{- if eq .chezmoi.os "darwin" -}} #{{- if eq .chezmoi.os "darwin" }}
if [ "${XDG_RUNTIME_DIR}" = "" ]; then if [ "${XDG_RUNTIME_DIR}" = "" ]; then
__TMPDIR__= __TMPDIR__=
__LINK__=/tmp/$(id -u) __LINK__=/tmp/$(id -u)
@ -24,10 +27,9 @@ if [ "${XDG_RUNTIME_DIR}" = "" ]; then
fi fi
XDG_RUNTIME_DIR="${__TMPDIR__}" XDG_RUNTIME_DIR="${__TMPDIR__}"
unset __TMPDIR__ __LINK__ unset __TMPDIR__ __LINK__
fi
export XDG_RUNTIME_DIR export XDG_RUNTIME_DIR
{{- end }} fi
#{{- end }}
env_file () { env_file () {
if [ ! -f "${1}" ]; then if [ ! -f "${1}" ]; then
@ -47,6 +49,7 @@ if [ -d "${XDG_CONFIG_HOME}/profile/env.d" ]; then
for file in "${XDG_CONFIG_HOME}"/profile/env.d/*.env; do for file in "${XDG_CONFIG_HOME}"/profile/env.d/*.env; do
env_file "${file}" env_file "${file}"
done done
unset file
fi fi
unset env_file unset env_file
@ -58,6 +61,5 @@ if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then
. "$file" . "$file"
fi fi
done done
unset file
fi fi
# vim: ft=sh

@ -7,6 +7,7 @@ if [[ -d "${XDG_CONFIG_HOME}/zsh/env.d" ]]; then
sed 's/^/export /g' sed 's/^/export /g'
)" )"
done done
unset file
fi fi
if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then
@ -16,6 +17,7 @@ if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then
source "$file" source "$file"
fi fi
done done
unset file
fi fi
# vim: ft=zsh # vim: ft=zsh

Loading…
Cancel
Save