-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Most of the work was put into the Vim colorscheme, which is designed from scratch. It is not yet finished, so #4 is still kept open. zsh's and git's configs where revisited and have some minor changes. - close #2 - close #3
- Loading branch information
Showing
8 changed files
with
737 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "vim/vimfiles/bundle/Vundle.vim"] | ||
path = vim/vimfiles/bundle/Vundle.vim | ||
url = https://github.com/gmarik/Vundle.vim.git | ||
url = https://github.com/VundleVim/Vundle.vim.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
[core] | ||
editor = vim | ||
autocrlf = input | ||
|
||
[user] | ||
name = Mischback | ||
email = [email protected] | ||
name = Mischback | ||
email = [email protected] | ||
|
||
[merge] | ||
ff = false | ||
[core] | ||
editor = vim | ||
excludesFile = ~/.gitignore | ||
autocrlf = input | ||
|
||
[color] | ||
ui = true | ||
ui = auto | ||
|
||
[color "status"] | ||
added = "green normal bold" | ||
|
@@ -24,13 +22,36 @@ | |
remote = "cyan normal dim" | ||
|
||
[color "grep"] | ||
linenumber = "green normal dim" | ||
filename = "magenta normal dim" | ||
linenumber = "green normal dim" | ||
match = "red normal bold" | ||
|
||
[diff] | ||
mnemonicPrefix = true | ||
renames = true | ||
|
||
[fetch] | ||
prune = true | ||
|
||
[grep] | ||
break = true | ||
heading = true | ||
lineNumber = true | ||
|
||
[merge] | ||
ff = false | ||
|
||
[push] | ||
followTags = true | ||
|
||
[status] | ||
showUntrackedFiles = all | ||
|
||
[alias] | ||
s = status | ||
m = merge | ||
ca = commit -a | ||
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | ||
k = log --oneline --graph --decorate --all | ||
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'" | ||
ca = "commit -a" | ||
k = "log --oneline --graph --decorate --all" | ||
l = "log -25 --oneline --graph --decorate --all" | ||
pull = "pull --ff-only" | ||
s = "status" | ||
uncommit = "reset --soft HEAD~1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#!/bin/bash | ||
|
||
dotfilesDir=$(pwd) | ||
dateStr=$(date +%Y-%m-%d-%H%M) | ||
|
||
|
||
# Check if the current user is ROOT. | ||
# | ||
# This function is POSIX-compliant, see | ||
# https://stackoverflow.com/a/52586842 | ||
function is_user_root { | ||
[ "${EUID:-$(id -u)}" -eq 0 ]; | ||
} | ||
|
||
|
||
# Check the availability of an executable. | ||
# | ||
# @param The executable | ||
# | ||
# This function is POSIX-compliant, see | ||
# https://stackoverflow.com/a/677212 | ||
function check_executable { | ||
if ! command -v $1 &> /dev/null 2>&1; then | ||
return 1 | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
|
||
# Add a package to the list of missing executables. | ||
# | ||
# @param The executable to be checked. | ||
# @param The package that is required. | ||
function match_executable_with_package { | ||
check_executable $1 | ||
if [ $? -eq 1 ]; then | ||
missingExecutables="$missingExecutables $2" | ||
fi | ||
} | ||
|
||
|
||
# Create a symlink from the user's home directory to the dotfile. | ||
# | ||
# @param The name of the dotfile as required in the user's home. | ||
# @param The name of the dotfile, as provided in this repository. | ||
# | ||
# The function will remove existing symlinks and backup existing files and | ||
# directories before creating the actual symlink. | ||
function link_dotfile { | ||
local dst="${HOME}/$1" | ||
local src="$dotfilesDir/$2" | ||
|
||
if [ -h $dst ]; then | ||
#echo "Removing existing symlink!" | ||
rm $dst | ||
|
||
# check if $dst already exists and is a regular file | ||
elif [ -f $dst ]; then | ||
echo "Backing up existing file!" | ||
mv $dst{,.$dateStr} | ||
|
||
# check if $dst already exists and is a directory | ||
elif [ -d $dst ]; then | ||
echo "Backing up existing dir!" | ||
mv $dst{,.$dateStr} | ||
fi | ||
|
||
echo "Creating symlink!" | ||
ln -s $src $dst | ||
} | ||
|
||
|
||
# Track the missing executables. These may be used to install the required | ||
# packages later. | ||
missingExecutables="" | ||
|
||
match_executable_with_package "git" "git" | ||
match_executable_with_package "vim" "vim" | ||
match_executable_with_package "zsh" "zsh" | ||
|
||
|
||
# if there are missing executables, try to install them | ||
if [ $missingExecutables -ne "" ]; then | ||
if is_user_root; then | ||
apt-get install --no-install-recommends --yes $missingExecutables | ||
else | ||
echo "Missing executables, but you're not 'root', not attempting to install" | ||
echo "Missing: $missingExecutables" | ||
exit 1; | ||
fi | ||
fi | ||
|
||
# actually link the dotfiles to the user's home directory | ||
echo "Linking dotfiles to ~/" | ||
link_dotfile ".gitconfig" "git/gitconfig" | ||
link_dotfile ".vim" "vim/vimfiles" | ||
link_dotfile ".vimrc" "vim/vimrc" | ||
link_dotfile ".zshrc" "shells/zshrc" | ||
link_dotfile ".zshrc.local" "shells/zshrc.local" | ||
|
||
# setup Vim | ||
if [ ! -d "$dotfilesDir/vim/vimfiles/bundle/Vundle.vim/autoload" ]; then | ||
echo "Fetching Vundle!" | ||
git submodule update --init | ||
fi | ||
|
||
echo "Installing/updating vim plugins!" | ||
vim +PluginInstall! +qall | ||
|
||
echo "Successfully completed setup!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
alias gitba='git branch -a' | ||
alias gitf='git fetch --prune' | ||
alias gitk='git k' | ||
alias gits='git status' | ||
alias tree='find . -iname "*.pyc" -delete && find . -type d -iname "__pycache__" -delete && tree -I ".git|.tox"' | ||
alias todo='grep --include=\*.{py,html,js,tex} -rinw . -e "TODO"' | ||
alias gitl='git l' | ||
alias gits='git s' | ||
alias todo='git grep --line-number --column --ignore-case --full-name -e "TODO" -e "FIXME" -I' | ||
alias tree='tree -I ".git|.tox"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
" SPDX-FileCopyrightText: 2022 Mischback | ||
" SPDX-License-Identifier: MIT | ||
" SPDX-FileType: SOURCE | ||
|
||
" Provide a common and coherent color palette. | ||
" | ||
" This is placed in vim's ``autoload``, as the palette will be used by the | ||
" actual colorscheme and to style other vim plugins (e.g. ``airline``). | ||
|
||
|
||
" Define the color palette of the colorscheme. | ||
" TODO: Remove unused colors when finalizing the colorscheme! | ||
" TODO: Document all colors as constructed, even if they get removed! | ||
let s:colors = { | ||
\ "dark_grey_base": { "gui": "#1c1c1c", "cterm": "234", "cterm16": "0" }, | ||
\ "dark_grey_dark": { "gui": "#080808", "cterm": "232", "cterm16": "0" }, | ||
\ "dark_grey_light": { "gui": "#3a3a3a", "cterm": "237", "cterm16": "0" }, | ||
\ "medium_grey_base": { "gui": "#767676", "cterm": "243", "cterm16": "8" }, | ||
\ "medium_grey_dark": { "gui": "#585858", "cterm": "240", "cterm16": "8" }, | ||
\ "medium_grey_light": { "gui": "#949494", "cterm": "246", "cterm16": "8" }, | ||
\ "light_grey_base": { "gui": "#b2b2b2", "cterm": "249", "cterm16": "7" }, | ||
\ "light_grey_dark": { "gui": "#949494", "cterm": "246", "cterm16": "7" }, | ||
\ "light_grey_light": { "gui": "#d0d0d0", "cterm": "252", "cterm16": "15" }, | ||
\ "green_base": { "gui": "#87af00", "cterm": "106", "cterm16": "2" }, | ||
\ "green_dark": { "gui": "#878700", "cterm": "100", "cterm16": "2" }, | ||
\ "green_light": { "gui": "#5fd700", "cterm": "148", "cterm16": "2" }, | ||
\ "blue_base": { "gui": "#5fafff", "cterm": "75", "cterm16": "12" }, | ||
\ "blue_light": { "gui": "#87d7ff", "cterm": "117", "cterm16": "12" }, | ||
\ "purple_base": { "gui": "#af5fd7", "cterm": "134", "cterm16": "5" }, | ||
\ "purple_dark": { "gui": "#5f5fd7", "cterm": "62", "cterm16": "5" }, | ||
\ "purple_light": { "gui": "#af87d7", "cterm": "140", "cterm16": "5" }, | ||
\ "teal_base": { "gui": "#00af87", "cterm": "36", "cterm16": "6" }, | ||
\ "teal_dark": { "gui": "#005f00", "cterm": "22", "cterm16": "6" }, | ||
\ "teal_light": { "gui": "#5fffaf", "cterm": "85", "cterm16": "6" }, | ||
\ "red_base": { "gui": "#af0000", "cterm": "124", "cterm16": "1" }, | ||
\ "orange_base": { "gui": "#ff8700", "cterm": "208", "cterm16": "2" }, | ||
\ "orange_dark": { "gui": "#ff5f00", "cterm": "202", "cterm16": "2" }, | ||
\ "orange_light": { "gui": "#ffaf00", "cterm": "214", "cterm16": "2" }, | ||
\ "yellow_base": { "gui": "#ffd700", "cterm": "220", "cterm16": "11" }, | ||
\ "yellow_light": { "gui": "#ffff87", "cterm": "228", "cterm16": "11" }, | ||
\ "work_pink": { "gui": "#ff00ff", "cterm": "201", "cterm16": "13" }, | ||
\} | ||
|
||
" Return the color palette | ||
function! allnightlong#GetColors() | ||
return s:colors | ||
endfunction |
Submodule Vundle.vim
updated
13 files
+7 −7 | CONTRIBUTING.md | |
+52 −35 | README.md | |
+164 −0 | README_KR.md | |
+162 −0 | README_ZH_CN.md | |
+162 −0 | README_ZH_TW.md | |
+19 −12 | autoload/vundle.vim | |
+17 −14 | autoload/vundle/config.vim | |
+33 −20 | autoload/vundle/installer.vim | |
+57 −34 | autoload/vundle/scripts.vim | |
+21 −7 | doc/vundle.txt | |
+15 −0 | ftplugin/vundlelog.vim | |
+36 −0 | syntax/vundlelog.vim | |
+3 −2 | test/minirc.vim |
Oops, something went wrong.