Fix syntax for setting vim filetype in templates

main
Buddy Sandidge 2 years ago
parent aa1348fbe2
commit def01bdb01

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=sh */ -}}
#{{- /* vim: set filetype=sh: */ -}}
#{{- if lookPath "go" -}}
#{{- 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

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

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

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

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

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

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: ft=sh */ -}}
#{{- /* vim: set filetype=sh: */ -}}
#{{- if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") -}}
# 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.

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

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

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

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: filetype=jq */ -}}
#{{- /* vim: set filetype=jq: */ -}}
#{{- if and .hellotech (lookPath "jq") -}}
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
java -jar "$XDG_DATA_HOME/duck-encoder/duck-encoder.jar" $*
# vim: ft=bash
{{- end }}
#{{- end }}

@ -1,4 +1,6 @@
{{ if .include_legacy -}}
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=perl: */ -}}
#{{ if .include_legacy -}}
#!/usr/bin/env perl
# Get sorted list files
@ -14,4 +16,4 @@ foreach my $file (@sortedFiles) {
my $fileSortedPrintCmd = "du -s \"$realFileName\"";
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
"""
This is a program that attempts to get all the album art from amazon
@ -169,5 +171,4 @@ def main():
if __name__ == "__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
from functools import partial
@ -118,4 +120,4 @@ if __name__ == '__main__':
parser.add_argument('-d', '--directory', default=Path('.'), type=Path)
args = parser.parse_args()
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
'''
@ -83,4 +85,4 @@ if __name__ == "__main__":
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
import os
@ -116,4 +118,4 @@ if __name__ == '__main__':
options, args = parser.parse_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
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.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
LINES=$(tput lines)
@ -39,4 +41,4 @@ do
sleep 0.1
done
{{- end }}
#{{- end }}

@ -1,3 +1,6 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
export LANGUAGE=en_US:en
export LC_MESSAGES=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_STATE_HOME="${XDG_STATE_HOME:=$HOME/.local/state}"
{{- if eq .chezmoi.os "darwin" -}}
#{{- if eq .chezmoi.os "darwin" }}
if [ "${XDG_RUNTIME_DIR}" = "" ]; then
__TMPDIR__=
__LINK__=/tmp/$(id -u)
@ -24,10 +27,9 @@ if [ "${XDG_RUNTIME_DIR}" = "" ]; then
fi
XDG_RUNTIME_DIR="${__TMPDIR__}"
unset __TMPDIR__ __LINK__
export XDG_RUNTIME_DIR
fi
export XDG_RUNTIME_DIR
{{- end }}
#{{- end }}
env_file () {
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
env_file "${file}"
done
unset file
fi
unset env_file
@ -58,6 +61,5 @@ if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then
. "$file"
fi
done
unset file
fi
# vim: ft=sh

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

Loading…
Cancel
Save