Skip to content

Instantly share code, notes, and snippets.

@mojaveazure
Last active June 30, 2017 16:00
Show Gist options
  • Save mojaveazure/f6bfa8af1dac410bfa09 to your computer and use it in GitHub Desktop.
Save mojaveazure/f6bfa8af1dac410bfa09 to your computer and use it in GitHub Desktop.
My settings files for things
#!/bin/bash
set -eo pipefail
read -p "Choose settings to link: " -a SETTINGS
declare -a SETTINGS=($(echo ${SETTINGS[@]} | tr -d '[:space:]' | grep -o . | sort -u | tr '\n' ' '))
declare -a SETTINGS=($(echo ${SETTINGS[@]} | tr '[:upper:]' '[:lower:]'))
for setting in ${SETTINGS[@]}; do
case "${setting}" in
'a')
echo "Updating all settings" >&2
break
;;
'c')
echo "Linking Visual Studio Code settings" >&2
;;
'v')
echo "Linking Vim settings" >&2
;;
esac
done
if [ -f '~/.vimrc' ]; then
echo "vimrc already exists!" >&2
else
ln -s "$(pwd -P)/vimrc" '~/.vimrc'
fi
VS_CODE='~/.config/Code/User/settings.json'
(set -x; mkdir -p "$(dirname ${VS_CODE})"
[ -f "${VS_CODE}" ] && echo "VSCode settings already exits!" >&2 || ln -s "$(pwd -P)/vscode.json" "${VS_CODE}"
" Set some defaults for Vim
" show line numbes
set nu
" insert 4 spaces when tab is pressed
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
" highlight tabs and trailing spaces
set listchars=tab:>-,trail:-
set list
" enable incremental searching (perform matching while typing
set incsearch
" have search wrap around file
set wrapscan
{
// Editor settings
"editor.detectIndentation": false,
"editor.roundedSelection": false,
"editor.wordWrap": "on",
"editor.wrappingIndent": "indent",
"editor.scrollBeyondLastLine": false,
"editor.fontFamily": "'Ubuntu Mono'",
"editor.fontSize": 15,
// "editor.formatOnType": true,
// "editor.formatOnPaste": true,
// "editor.formatOnSave": true,
"editor.renderWhitespace": "boundary",
"editor.renderIndentGuides": true,
"editor.minimap.enabled": false,
"editor.dragAndDrop": false,
// Worbench settings
"workbench.iconTheme": "material-icon-theme",
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
// Window settings
"window.reopenFolders": "none",
"window.openFilesInNewWindow": "on",
// File settings
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/.pyc": true,
"**/__pycache__": true,
"**/.vscode": true
},
"files.insertFinalNewline": true,
"files.hotExit": "off",
// General extensions settings
"extensions.autoUpdate": false,
// Python settings
"python.pythonPath": "/usr/bin/python3",
// "python.pythonPath": "/usr/bin/python2",
"python.formatting.formatOnSave": false,
"python.linting.pylintArgs": [
"--disable=C0413", // Imports should be placed at top of module
"--disable=C0301", // Line too long
"--disable=W0312", // Tabs instead of spaces
"--disable=C0326" // Something fucked up
],
"window.zoomLevel": 0,
"files.associations": {
"*.job": "shellscript",
".gitignore": "ini",
".bash_functions": "shellscript"
},
// Matlab settings
"matlab.lintOnSave": false,
"git.confirmSync": false,
// Julia settings
"julia.executablePath": "/usr/bin/julia",
// Material icon settings
"material-icon-theme.showUpdateMessage": false,
// Telemetry settings
"telemetry.enableTelemetry": false,
"git.enableSmartCommit": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment