From 1d611d9ab9591c28946295241dca9b95cd594a17 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Thu, 19 Jan 2017 12:58:34 +0100 Subject: [PATCH] Update git config --- .config/bash/aliases | 183 ++++++------ .config/git/attributes | 36 +-- .config/git/config | 205 +++++++------ .config/git/config_local | 3 + .config/profile/environ.sh | 92 +++--- .minttyrc | 36 +-- .vimrc | 587 +++++++++++++++++++------------------ bin/build-vim.sh | 36 +-- bin/build.cmd | 1 - bin/genilog.cmd | 4 +- bin/msbuild.cmd | 1 - bin/rte.cmd | 14 +- exe/usdk-hhkb.ahk | 48 +-- 13 files changed, 633 insertions(+), 613 deletions(-) create mode 100644 .config/git/config_local delete mode 100644 bin/build.cmd delete mode 100644 bin/msbuild.cmd diff --git a/.config/bash/aliases b/.config/bash/aliases index 9f4c943..bf0c21b 100644 --- a/.config/bash/aliases +++ b/.config/bash/aliases @@ -1,93 +1,90 @@ -alias sl=ls -alias la='ls -A' -alias ll='ls -Al' -alias l1='ls -1' -alias l.='ls -d .[a-z]*' - -lsflags="-hF" -# Detect which `ls` flavor is in use -if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls` - eval $(dircolors -b $HOME/.dir_colors) - colorflag="--color=auto" - lsflags="$lsflags -I NTUSER.\* -I ntuser.\*" -else # OS X `ls` - export CLICOLOR=1 - colorflag="-G" -fi - -alias ls="ls $colorflag $lsflags" -alias grep='grep --color=auto' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' - -if [ -e /usr/bin/vimx ]; then alias vim='/usr/bin/vimx'; fi - -# Shortcuts -alias g='git' -alias h='history' -alias j='jobs' -alias v='vim' -alias q='exit' -alias c='clear' -alias cls='clear' - -alias edit="$EDITOR" -alias pager="$PAGER" - -# Easier navigation: .., ..., ...., ....., ~ and - -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ~="cd ~" # `cd` is probably faster to type though -alias -- -="cd -" -alias cd=cd_func -alias -- --="cd --" -alias -- -0="cd -0" -alias -- -1="cd -1" -alias -- -2="cd -2" -alias -- -3="cd -3" -alias -- -4="cd -4" -alias -- -5="cd -5" -alias -- -6="cd -6" -alias -- -7="cd -7" -alias -- -8="cd -8" -alias -- -9="cd -9" - -# Secure settings -alias rm='rm -i' -alias cp='cp -i' -alias mv='mv -i' -alias md='mkdir -p' -alias rd='rmdir' -alias mkdate='mkdir "$(date +'%Y%m%d')"' - -if [ ! -x "$(which tree 2>/dev/null)" ] -then - alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" -fi - -alias info='info --vi-keys' -#alias less='less -rX' # raw control characters, don't clear the screen after quitting - -# Enable aliases to be sudo'ed -alias sudo='sudo ' -alias _="sudo" - -# Get week number -alias week='date +%V' - -# Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Reload the shell (i.e. invoke as a login shell) -alias reload="exec $SHELL -l" - -# alias bashhere='chere -il -t mintty -s bash' -alias gtypist='gtypist -wi' -alias startxwin='run /usr/bin/bash.exe -l -c "/usr/bin/startxwin -- -nolock -unixkill"' -alias startvnc='vncserver -geometry 1870x980 -depth 24' -alias startvnc4='vnc4server -geometry 1870x980 -depth 24' -alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' -alias genilog='$HOME/repos/genilog/genilog.py' -alias msbuild='winpty "c:/program files (x86)/msbuild/12.0/bin/msbuild.exe"' +alias sl=ls +alias la='ls -A' +alias ll='ls -Al' +alias l1='ls -1' +alias l.='ls -d .[a-z]*' + +lsflags="-hF" +# Detect which `ls` flavor is in use +if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls` + eval $(dircolors -b $HOME/.dir_colors) + colorflag="--color=auto" + lsflags="$lsflags -I NTUSER.\* -I ntuser.\*" +else # OS X `ls` + export CLICOLOR=1 + colorflag="-G" +fi + +alias ls="ls $colorflag $lsflags" +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + +if [ -e /usr/bin/vimx ]; then alias vim='/usr/bin/vimx'; fi + +# Shortcuts +alias g='git' +alias h='history' +alias j='jobs' +alias v='vim' +alias q='exit' +alias c='clear' +alias cls='clear' + +alias edit="$EDITOR" +alias pager="$PAGER" + +# Easier navigation: .., ..., ...., ....., ~ and - +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias ~="cd ~" # `cd` is probably faster to type though +alias -- -="cd -" +alias cd=cd_func +alias -- --="cd --" +alias -- -0="cd -0" +alias -- -1="cd -1" +alias -- -2="cd -2" +alias -- -3="cd -3" +alias -- -4="cd -4" +alias -- -5="cd -5" +alias -- -6="cd -6" +alias -- -7="cd -7" +alias -- -8="cd -8" +alias -- -9="cd -9" + +# Secure settings +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' +alias md='mkdir -p' +alias rd='rmdir' +alias mkdate='mkdir "$(date +'%Y%m%d')"' + +if [ ! -x "$(which tree 2>/dev/null)" ] +then + alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" +fi + +alias info='info --vi-keys' +#alias less='less -rX' # raw control characters, don't clear the screen after quitting + +# Enable aliases to be sudo'ed +alias sudo='sudo ' +alias _="sudo" + +# Get week number +alias week='date +%V' + +# Stopwatch +alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' + +# Reload the shell (i.e. invoke as a login shell) +alias reload="exec $SHELL -l" +alias gtypist='gtypist -wi' +alias startxwin='run /usr/bin/bash.exe -l -c "/usr/bin/startxwin -- -nolock -unixkill"' +alias startvnc='vncserver -geometry 1870x980 -depth 24' +alias startvnc4='vnc4server -geometry 1870x980 -depth 24' +alias dot='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' +alias genilog='$HOME/repos/genilog/genilog.py' diff --git a/.config/git/attributes b/.config/git/attributes index 2cbeb8d..0034fed 100644 --- a/.config/git/attributes +++ b/.config/git/attributes @@ -1,18 +1,18 @@ -# Default -* text=auto - -# Text files that should be normalized (CRLF => LF) -#*.c text -#*.h text - -# Text files with fixed EOL=LF -*.sh text eol=LF - -# Text files with fixed EOL=CRLF$ -*.bat text eol=CRLF -*.ahk text eol=crlf -#*.vcproj text eol=crlf - -# Binary files -*.reg binary -*.exe binary +# Default +#* text=auto + +# Text files that should be normalized (CRLF => LF) +#*.c text +#*.h text + +# Text files with fixed EOL=LF +#*.sh text eol=LF + +# Text files with fixed EOL=CRLF$ +#*.bat text eol=CRLF +#*.ahk text eol=crlf +#*.vcproj text eol=crlf + +# Binary files +#*.reg binary +#*.exe binary diff --git a/.config/git/config b/.config/git/config index 932f23c..e817487 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,104 +1,103 @@ -# ~/.config/git/config - -[github] - user = jannikz -[alias] - a = add - una = reset HEAD -- - uha = checkout HEAD -- - unaa = reset HEAD - uhaa = reset --hard HEAD - br = branch - brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" - co = checkout - go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" - ci = commit - amend = commit --amend - unci = reset --soft HEAD~ - diff = diff --word-diff - dt = difftool - mt = mergetool - # dont pull without rebase, and dont push without pull (fetch & merge) - p = pull --rebase - pp = "!git pull --rebase && git push" - # avoid merge commits - mf = merge --ff-only - cp = cherry-pick - wc = whatchanged -p - ch = cherry -v - s = status -sb - fs = "!git fetch && git status" - rb = rebase - ec = config --global -e - l = log --oneline --decorate - lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph - last = log -1 HEAD - ls = ls-files - lt = tag -l - type = cat-file -t - dump = cat-file -p - who = shortlog -s -- - remotes = remote -v - root = rev-parse --show-toplevel - cl = clone --recursive - - # Show the diff between the latest commit and the current state - d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" - # `git di $number` shows the diff between the state `$number` revisions ago and the current state - di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" - - # Find branches containing commit - fb = "!f() { git branch -a --contains $1; }; f" - # Find tags containing commit - ft = "!f() { git describe --always --contains $1; }; f" - # Find commits by source code - fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" - # Find commits by commit message - fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" - -# Credit an author on the latest commit - credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" - # List contributors with number of commits - contributors = shortlog --summary --numbered - - k = !gitk - visual = !gitk - - ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags" - gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags" - cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope" - -[help] - autocorrect = 10 -[branch] - autosetupmerge = always - autosetuprebase = always -[rebase] - autosquash = true - autostash = true -[pull] - rebase = true -[push] - default = simple -[diff] - tool = vimdiff -[difftool] - prompt = false -[merge] - tool = vimdiff - conflictstyle = diff3 -[mergetool] - prompt = false -[init] - templatedir = ~/.config/git/templates -[core] - excludesfile = ~/.config/git/ignore - attributesFile = ~/.config/git/attributes - editor = vim - autocrlf = false - safecrlf = true +# ~/.config/git/config +[github] + user = jannikz +[alias] + a = add + una = reset HEAD -- + uha = checkout HEAD -- + unaa = reset HEAD + uhaa = reset --hard HEAD + br = branch + brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" + co = checkout + go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + ci = commit + amend = commit --amend + unci = reset --soft HEAD~ + diff = diff --word-diff + dt = difftool + mt = mergetool + # dont pull without rebase, and dont push without pull (fetch & merge) + p = pull --rebase + pp = "!git pull --rebase && git push" + # avoid merge commits + mf = merge --ff-only + cp = cherry-pick + wc = whatchanged -p + ch = cherry -v + s = status -sb + fs = "!git fetch && git status" + rb = rebase + ec = config --global -e + l = log --oneline --decorate + lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph + last = log -1 HEAD + ls = ls-files + lt = tag -l + type = cat-file -t + dump = cat-file -p + who = shortlog -s -- + remotes = remote -v + root = rev-parse --show-toplevel + cl = clone --recursive + + # Show the diff between the latest commit and the current state + d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" + # `git di $number` shows the diff between the state `$number` revisions ago and the current state + di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" + + # Find branches containing commit + fb = "!f() { git branch -a --contains $1; }; f" + # Find tags containing commit + ft = "!f() { git describe --always --contains $1; }; f" + # Find commits by source code + fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" + # Find commits by commit message + fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" + + #Credit an author on the latest commit + credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" + # List contributors with number of commits + contributors = shortlog --summary --numbered + + k = !gitk + visual = !gitk + + ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags" + gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags" + cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope" + +[help] + autocorrect = 10 +[branch] + autosetupmerge = always + autosetuprebase = always +[rebase] + autosquash = true + autostash = true +[pull] + rebase = true +[push] + default = simple +[diff] + tool = vimdiff +[difftool] + prompt = false +[merge] + tool = vimdiff + conflictstyle = diff3 +[mergetool] + prompt = false +[init] + templatedir = ~/.config/git/templates +[core] + excludesfile = ~/.config/git/ignore + attributesFile = ~/.config/git/attributes + editor = vim + eol = native +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + required = true [include] - path = ~/.config/git/config_local -[user] - name = Jannik Zander - email = jannikz@gmail.com + path = ~/.config/git/config_local diff --git a/.config/git/config_local b/.config/git/config_local new file mode 100644 index 0000000..132c93e --- /dev/null +++ b/.config/git/config_local @@ -0,0 +1,3 @@ +[user] + name = Jannik ZANDER + email = jzander@grundfos.com diff --git a/.config/profile/environ.sh b/.config/profile/environ.sh index 308b036..6ffcf4a 100644 --- a/.config/profile/environ.sh +++ b/.config/profile/environ.sh @@ -1,45 +1,47 @@ -export USERNAME=$LOGNAME -export HOSTNAME=`hostname` -#echo Welcome $USERNAME. You are on Server: $HOSTNAME !!! - -# Set defaults -export SHELL='bash' -export EDITOR='vim' -export VISUAL='vim' -export PAGER='less -eFRX' -export MANPAGER="less -eFRX" -export BROWSER='lynx -vikeys -use_mouse' - - -# Prefer US language and UTF-8 -export LANG="en_US.UTF-8"; -export LC_ALL="en_US.UTF-8"; -#export LC_ALL="en_DK.UTF-8"; -#export LC_NUMERIC=en_DK.UTF-8 -#export LC_TIME=en_DK.UTF-8 -#export LC_MONETARY=en_DK.UTF-8 -#export LC_PAPER=en_DK.UTF-8 -#export LC_MEASUREMENT=en_DK.UTF-8 -export KEYMAP=us -# Highlight section titles in manual pages -export LESS_TERMCAP_md="${yellow}"; - -# Always enable colored `grep` output -#export GREP_OPTIONS="--color=auto"; - -# Set up syntax highlighting for 'less' (requires source-highlight package) -# See http://www.gnu.org/software/src-highlite/source-highlight.html -# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" -export LESS=-eFRX - -export GTEST_DIR='c:/users/59698/repos/googletest/googletest' -export CPPUNITDIR='c:/users/59698/repos/cppunit' -export VIRTUALENVWRAPPER_PYTHON=/mingw64/bin/python3 - -#export XDG_CONFIG_HOME = ~/.config/ -#export XDG_DATA_HOME = ~/.local/share/ -#export XDG_DATA_DIRS = /usr/local/share/:/usr/share/ -if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then - . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs - export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR -fi +export USERNAME=$LOGNAME +export HOSTNAME=`hostname` +#echo Welcome $USERNAME. You are on Server: $HOSTNAME !!! + +# Set defaults +export SHELL='bash' +export EDITOR='vim' +export VISUAL='vim' +export PAGER='less -eFRX' +export MANPAGER="less -eFRX" +export BROWSER='lynx -vikeys -use_mouse' + + +# Prefer US language and UTF-8 +export LANG="en_US.UTF-8"; +export LC_ALL="en_US.UTF-8"; +#export LC_ALL="en_DK.UTF-8"; +#export LC_NUMERIC=en_DK.UTF-8 +#export LC_TIME=en_DK.UTF-8 +#export LC_MONETARY=en_DK.UTF-8 +#export LC_PAPER=en_DK.UTF-8 +#export LC_MEASUREMENT=en_DK.UTF-8 +export KEYMAP=us +# Highlight section titles in manual pages +export LESS_TERMCAP_md="${yellow}"; + +# Always enable colored `grep` output +#export GREP_OPTIONS="--color=auto"; + +# Set up syntax highlighting for 'less' (requires source-highlight package) +# See http://www.gnu.org/software/src-highlite/source-highlight.html +# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" +export LESS=-eFRX + +#export GTEST_DIR='c:/googletest-release-1.7.0' +#export GTEST_DIR='c:/googletest-release-1.8.0' +export CPPUNITDIR='c:/cppunit-1.12.1' +#export CPPUNITDIR='c:/cppunit-1.13.2' +export VIRTUALENVWRAPPER_PYTHON=/mingw64/bin/python3 + +#export XDG_CONFIG_HOME = ~/.config/ +#export XDG_DATA_HOME = ~/.local/share/ +#export XDG_DATA_DIRS = /usr/local/share/:/usr/share/ +if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then + . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs + export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR +fi diff --git a/.minttyrc b/.minttyrc index 7e80038..644ac08 100644 --- a/.minttyrc +++ b/.minttyrc @@ -5,21 +5,21 @@ FontHeight=11 Term=xterm-256color BoldAsColour=no Charset=UTF-8 -Locale= en_US - -Black= 7, 54, 66 -BoldBlack= 0, 43, 54 -Red= 220, 50, 47 -BoldRed= 203, 75, 22 -Green= 133, 153, 0 -BoldGreen= 88, 110, 117 -Yellow= 181, 137, 0 -BoldYellow= 101, 123, 131 -Blue= 38, 139, 210 -BoldBlue= 131, 148, 150 -Magenta= 211, 54, 130 -BoldMagenta= 108, 113, 196 -Cyan= 42, 161, 152 -BoldCyan= 147, 161, 161 -White= 238, 232, 213 -BoldWhite= 253, 246, 227 +Locale=en_US +Black=7,54,66 +BoldBlack=0,43,54 +Red=220,50,47 +BoldRed=203,75,22 +Green=133,153,0 +BoldGreen=88,110,117 +Yellow=181,137,0 +BoldYellow=101,123,131 +Blue=38,139,210 +BoldBlue=131,148,150 +Magenta=211,54,130 +BoldMagenta=108,113,196 +Cyan=42,161,152 +BoldCyan=147,161,161 +White=238,232,213 +BoldWhite=253,246,227 +ScrollbackLines=100000 diff --git a/.vimrc b/.vimrc index 51295f6..ef01a5a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,284 +1,303 @@ -" section: environment {{{1 -" --------------------- - -if (empty(glob('~/.cache/vim/autoload/plug.vim')) || - \ empty(glob('~/.local/share/vim/viminfo'))) - cd ~ - silent !mkdir -p .local/share/vim/{swap,backup,undo} - silent !mkdir -p .cache/vim/autoload - silent !curl -fLo .cache/vim/autoload/plug.vim - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall | source $MYVIMRC - cd - -endif - -set directory=~/.local/share/vim/swap -set backupdir=~/.local/share/vim/backup -set undodir=~/.local/share/vim/undo -set viminfo+=n~/.local/share/vim/viminfo -set runtimepath+=~/.cache/vim - -" section: plugins {{{1 -" --------------------- -silent call plug#begin('~/.cache/vim/bundle') -Plug 'tpope/vim-repeat' -Plug 'tpope/vim-surround' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-commentary' -Plug 'tpope/vim-dispatch' -Plug 'tpope/vim-vinager' -Plug 'scrooloose/syntastic' -Plug 'ctrlpvim/ctrlp.vim' -Plug 'brandonbloom/csearch.vim' -Plug 'chazy/cscope_maps' -Plug 'altercation/vim-colors-solarized' -Plug 'editorconfig/editorconfig-vim' -Plug 'fholgado/minibufexpl.vim' -Plug 'a.vim' -"Plug 'L9' -"Plug 'FuzzyFinder' -call plug#end() - -" section: options {{{1 -" --------------------- - -"set autoindent -set autoread -set autowrite " automatically save before commands like :next and :make -set background=dark -set backspace=2 -if exists('+breakindent') - set breakindent showbreak=\ + -endif -set cmdheight=2 -setglobal commentstring=#\ %s -set complete-=i " searching includes can be slow -"if has("win32") || has("win64") -" does not work for msys2 -set clipboard=unnamed -"else -"set clipboard=unnamedplus -"endif -set fileformats=unix,dos,mac -"set foldlevel=99 -"set foldmethod=indent -set foldmethod=marker -set foldopen+=jump -set guioptions+=a -set history=200 -set incsearch " incremental search -set laststatus=2 " always show status line -set lazyredraw -set linebreak -set mouse=nvi -set mousemodel=popup -set number -"set pastetoggle= -set printoptions=paper:letter -set scrolloff=1 -set shiftround -set shortmess=aoOtI -"set showcmd " show (partial) command in status line. -set showmatch " show matching brackets. -set sidescrolloff=5 -set smartcase " case insensitive searches become sensitive with capitals -"setglobal tags=./tags; -set timeoutlen=500 " leader key timeout -set ttimeoutlen=50 " make esc work faster -set visualbell -if exists('+undofile') - set undofile -endif -set virtualedit=block -set wildmenu -set wildmode=longest:full,full -set wildignore+=tags,.*.un~,*.pyc -set winaltkeys=no - -"if !has("gui_running") && $display == '' || !has("gui") -" set mouse= -"endif - -set errorformat=\ %#%f(%l):\ %m -"set makeprg=msbuild.exe\ -nologo\ -v:q\ -property:GenerateFullPaths=true\ -set makeprg=build.cmd - -" plugin settings {{{2 -let g:netrw_liststyle=3 -let g:netrw_banner = 0 -let g:netrw_sort_sequence = '[\/]$,*' - -let g:solarized_menu=0 -let g:markdown_fenced_languages = ['html', 'python', 'bash=sh'] -let g:markdown_syntax_conceal = 0 - -" %s is replaced with fzf command -"let g:fzf_launcher = 'xterm -e bash -ic %s' -"let g:fzf_launcher = "in_a_new_term_function %s" - -"for airline -"let g:airline#extensions#tabline#enabled = 1 - -let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] -let g:editorconfig_verbose=1 -"let g:editorconfig_exec_path = 'Path to your EditorConfig Core executable' - -set colorcolumn=80 -highlight ColorColumn ctermbg=9 - -" block cursor in normal mode -let &t_ti.="\e[1 q" -let &t_SI.="\e[5 q" -let &t_EI.="\e[1 q" -let &t_te.="\e[0 q" - -" }}}2 -" section: commands {{{1 -"----------------------- - -if has("cscope") - set nocscopetag - set cscopequickfix=s-,c-,d-,i-,t-,e- - set nocscopeverbose - if filereadable(".git/cscope.out") - cscope add .git/cscope.out - endif - set cscopeverbose - - function! Cscoperebuild() - cscope kill .git/cscope.out - silent execute "!./.git/hooks/cscope" - if v:shell_error - redraw! - echohl errormsg | echo "unable to run cscope command." | echohl none - else - if filereadable(".git/cscope.out") - redraw! - cscope add .git/cscope.out - else - redraw! - echohl errormsg | echo "unable to read cscope database." | echohl none - endif - endif - endfunction - - command! Cscope call Cscoperebuild() -endif" - - -" section: mappings {{{1 -" ---------------------- -" -let mapleader = "\" - -" explorer -nnoremap e :Lexplore . -" cd to same directory as file -nnoremap cd :cd %:p:h:pwd -" source .vimrc -nnoremap v :so ~/.vimrc - -" copy/paste from system clipboard -if has("win32") -vnoremap y "*y -vnoremap d "*d -nnoremap p "*p -nnoremap P "*P -vnoremap p "*p -Hvnoremap P "*P -else -" nnoremap y "*y -" nnoremap p "*p -" nnoremap Y "+y -" nnoremap P "+p -" nnoremap y "*y -" nnoremap yy "*yy -" noremap p "*p -" noremap P "*P -endif - -if has("cscope") - cnoreabbrev csa - \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs add' : 'csa') - cnoreabbrev csf - \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs find' : 'csf') - cnoreabbrev csk - \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs kill' : 'csk') - cnoreabbrev csr - \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs reset' : 'csr') - cnoreabbrev css - \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs show' : 'css') - cnoreabbrev csh - \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs help' : 'csh') - - nnoremap fs :cscope find s =expand(""):botright cwindow - nnoremap fg :cscope find g =expand(""):botright cwindow - nnoremap fc :cscope find c =expand(""):botright cwindow - nnoremap ft :cscope find t =expand(""):botright cwindow - nnoremap fe :cscope find e =expand(""):botright cwindow - nnoremap ff :cscope find f =expand(""):botright cwindow - nnoremap fd :cscope find d =expand(""):botright cwindow - nnoremap fi :cscope find i ^=expand("")$:botright cwindow - "todo: figure out how to get cstag output in quickfix or a popup menu. - map :cstag =expand("") -endif - -" Maps leader-[h,j,k,l] to windows split navigations -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -" Maps Ctrl-[h,j,k,l] to resizing a window split -nnoremap < -nnoremap - -nnoremap + -nnoremap > - -"exit insert mode -inoremap jj -inoremap j j -" folding -noremap za -" In the quickfix window, is used to jump to the error under the -" cursor, so undefine the mapping there. -autocmd BufReadPost quickfix nnoremap - -" section: autocommands {{{1 -" -------------------------- -if has("autocmd") - filetype plugin indent on - autocmd bufnewfile,bufread *.md set filetype=markdown - autocmd bufnewfile,bufread *.gradle set filetype=groovy -endif " has("autocmd") -" }}}1 -" section: visual {{{1 -" -------------------- - -" switch syntax highlighting on, when the terminal has colors -if (&t_Co > 2 || has("gui_running")) && has("syntax") - if exists("&guifont") - if has("mac") - set guifont=monaco:h11 - elseif has("unix") - set guifont=inconsolata\ 11 - elseif has("win32") - set guifont=consolas:h11,courier\ new:h10 - endif - endif - - - if exists("syntax_on") || exists("syntax_manual") - else - syntax on - endif - set list - if !exists('g:colors_name') - silent! colorscheme solarized - endif -endif -" }}}1 - -if filereadable(expand('~/.vimrc_local')) - source ~/.vimrc_local -endif +" section: environment {{{1 +" --------------------- + +if (empty(glob('~/.cache/vim/autoload/plug.vim')) || + \ empty(glob('~/.local/share/vim/viminfo'))) + cd ~ + silent !mkdir -p .local/share/vim/{swap,backup,undo} + silent !mkdir -p .cache/vim/autoload + silent !curl -fLo .cache/vim/autoload/plug.vim + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall | source $MYVIMRC + cd - +endif + +set directory=~/.local/share/vim/swap +set backupdir=~/.local/share/vim/backup +set undodir=~/.local/share/vim/undo +set viminfo+=n~/.local/share/vim/viminfo +set runtimepath+=~/.cache/vim + +" section: plugins {{{1 +" --------------------- +silent call plug#begin('~/.cache/vim/bundle') +Plug 'tpope/vim-repeat' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-dispatch' +"Plug 'tpope/vim-vinager' +Plug 'scrooloose/syntastic' +Plug 'ctrlpvim/ctrlp.vim' +Plug 'brandonbloom/csearch.vim' +Plug 'chazy/cscope_maps' +Plug 'altercation/vim-colors-solarized' +"Plug 'editorconfig/editorconfig-vim' +Plug 'fholgado/minibufexpl.vim' +Plug 'a.vim' +Plug 'heaths/vim-msbuild' +Plug 'klen/python-mode' +"Plug 'jalcine/cmake.vim' +call plug#end() + +" section: options {{{1 +" --------------------- + +"set autoindent +set autoread +set autowrite " automatically save before commands like :next and :make +set background=dark +set backspace=2 +if exists('+breakindent') + set breakindent showbreak=\ + +endif +set cmdheight=2 +setglobal commentstring=#\ %s +set complete-=i " searching includes can be slow +"if has("win32") || has("win64") +" does not work for msys2 +set clipboard=unnamed +"else +"set clipboard=unnamedplus +"endif +set fileformats=unix,dos,mac +"set foldmethod=indent +"set foldlevel=99 +"set foldmethod=marker +"set foldopen+=jump +set guioptions+=a +set history=200 +set incsearch " incremental search +set laststatus=2 " always show status line +set lazyredraw +set linebreak +set mouse=nvi +set mousemodel=popup +set number +"set pastetoggle= +set path=** +set printoptions=paper:letter +set scrolloff=1 +set shiftround +set shortmess=aoOtI +"set showcmd " show (partial) command in status line. +set showmatch " show matching brackets. +set sidescrolloff=5 +set smartcase " case insensitive searches become sensitive with capitals +"setglobal tags=./tags; +set timeoutlen=500 " leader key timeout +set ttimeoutlen=50 " make esc work faster +set visualbell +if exists('+undofile') + set undofile +endif +set virtualedit=block +set wildmenu +set wildmode=longest:full,full +set wildignore+=tags,.*.un~,*.pyc +set winaltkeys=no + +"if !has("gui_running") && $display == '' || !has("gui") +" set mouse= +"endif + +set makeprg=cmake\ --build\ . +" Visual studio 2013 +"set errorformat=\ %#%f(%l):\ %m +" Visual studio 2008 +set errorformat=%.%#>\ %#%f(%l)\ :\ %m + +let g:syntastic_quiet_messages = { "type": "style" } + +" plugin settings {{{1 +let g:netrw_liststyle=3 +let g:netrw_banner = 0 +let g:netrw_sort_sequence = '[\/]$,*' + +let g:solarized_menu=0 +let g:markdown_fenced_languages = ['html', 'python', 'bash=sh'] +let g:markdown_syntax_conceal = 0 + +" %s is replaced with fzf command +"let g:fzf_launcher = 'xterm -e bash -ic %s' +"let g:fzf_launcher = "in_a_new_term_function %s" + +"for airline +"let g:airline#extensions#tabline#enabled = 1 + +let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] +let g:editorconfig_verbose = 1 + +if has("win32") + let g:EditorConfig_exec_path = "C:\programs\editorconfig\bin\editorconfig.exe" +else + let g:editorconfig_core_mode = "python_builtin" +endif + +set colorcolumn=80 +highlight ColorColumn ctermbg=9 + +" block cursor in normal mode +let &t_ti.="\e[1 q" +let &t_SI.="\e[5 q" +let &t_EI.="\e[1 q" +let &t_te.="\e[0 q" + +" }}}2 +" section: commands {{{1 +"----------------------- + +if has("cscope") + set nocscopetag + set cscopequickfix=s-,c-,d-,i-,t-,e- + set nocscopeverbose + if filereadable(".git/cscope.out") + cscope add .git/cscope.out + endif + set cscopeverbose + + function! Cscoperebuild() + cscope kill .git/cscope.out + silent execute "!./.git/hooks/cscope" + if v:shell_error + redraw! + echohl errormsg | echo "unable to run cscope command." | echohl none + else + if filereadable(".git/cscope.out") + redraw! + cscope add .git/cscope.out + else + redraw! + echohl errormsg | echo "unable to read cscope database." | echohl none + endif + endif + endfunction + + command! Cscope call Cscoperebuild() +endif" + + +" section: mappings {{{1 +" ---------------------- +" +let mapleader = "," + +" Quickly edit/reload the vimrc file +nmap ev :e $MYVIMRC +nmap sv :so $MYVIMRC + +" Minibufferexplorer +nnoremap b :MBEToggle +"let g:miniBufExplMapWindowNavVim = 1 +"let g:miniBufExplMapCTabSwitchBufs = 1 + +" copy/paste from system clipboard +if has("win32") +vnoremap y "*y +vnoremap d "*d +nnoremap p "*p +nnoremap P "*P +vnoremap p "*p +vnoremap P "*P +else +" nnoremap y "*y +" nnoremap p "*p +" nnoremap Y "+y +" nnoremap P "+p +" nnoremap y "*y +" nnoremap yy "*yy +" noremap p "*p +" noremap P "*P +endif + +if has("cscope") + cnoreabbrev csa + \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs add' : 'csa') + cnoreabbrev csf + \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs find' : 'csf') + cnoreabbrev csk + \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs kill' : 'csk') + cnoreabbrev csr + \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs reset' : 'csr') + cnoreabbrev css + \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs show' : 'css') + cnoreabbrev csh + \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs help' : 'csh') + + nnoremap fs :cscope find s =expand(""):botright cwindow + nnoremap fg :cscope find g =expand(""):botright cwindow + nnoremap fc :cscope find c =expand(""):botright cwindow + nnoremap ft :cscope find t =expand(""):botright cwindow + nnoremap fe :cscope find e =expand(""):botright cwindow + nnoremap ff :cscope find f =expand(""):botright cwindow + nnoremap fd :cscope find d =expand(""):botright cwindow + nnoremap fi :cscope find i ^=expand("")$:botright cwindow + "todo: figure out how to get cstag output in quickfix or a popup menu. + map :cstag =expand("") +endif + +" Maps Ctrl-[h,j,k,l] to windows split navigations +nnoremap +nnoremap +nnoremap +nnoremap + +" Maps leader-[h,j,k,l] to windows split navigations +"nnoremap h +"nnoremap j +"nnoremap k +"nnoremap l +" +"" Maps Ctrl-[h,j,k,l] to resizing a window split +"nnoremap < +"nnoremap - +"nnoremap + +"nnoremap > + +"exit insert mode +inoremap jj +inoremap j j +" folding +noremap za +" In the quickfix window, is used to jump to the error under the +" cursor, so undefine the mapping there. +autocmd BufReadPost quickfix nnoremap + +" section: autocommands {{{1 +" -------------------------- +if has("autocmd") + filetype plugin indent on + autocmd bufnewfile,bufread *.md set filetype=markdown + autocmd bufnewfile,bufread *.gradle set filetype=groovy +endif " has("autocmd") +" }}}1 +" section: visual {{{1 +" -------------------- + +" switch syntax highlighting on, when the terminal has colors +if (&t_Co > 2 || has("gui_running")) && has("syntax") + if exists("&guifont") + if has("mac") + set guifont=monaco:h11 + elseif has("unix") + set guifont=inconsolata\ 11 + elseif has("win32") + set guifont=consolas:h11,courier\ new:h10 + endif + endif + + + if exists("syntax_on") || exists("syntax_manual") + else + syntax on + endif + set list + if !exists('g:colors_name') + silent! colorscheme solarized + endif +endif +" }}}1 + +if filereadable(expand('~/.vimrc_local')) + source ~/.vimrc_local +endif diff --git a/bin/build-vim.sh b/bin/build-vim.sh index 09274d0..b0938cc 100644 --- a/bin/build-vim.sh +++ b/bin/build-vim.sh @@ -1,18 +1,18 @@ -#!/bin/sh - -./configure \ ---prefix=$PREFIX \ ---with-features=huge \ ---with-compiledby="ejannza" \ ---enable-multibyte \ ---enable-gui=gtk2 \ ---enable-luainterp \ ---with-lua-prefix=$PREFIX --with-luajit \ ---enable-gpm \ ---enable-cscope \ ---enable-fontset \ ---enable-fail-if-missing - - -make -make install prefix=$PREFIX/apps/vim +#!/bin/sh + +./configure \ +--prefix=$PREFIX \ +--with-features=huge \ +--with-compiledby="ejannza" \ +--enable-multibyte \ +--enable-gui=gtk2 \ +--enable-luainterp \ +--with-lua-prefix=$PREFIX --with-luajit \ +--enable-gpm \ +--enable-cscope \ +--enable-fontset \ +--enable-fail-if-missing + + +make +make install prefix=$PREFIX/apps/vim diff --git a/bin/build.cmd b/bin/build.cmd deleted file mode 100644 index a72a87d..0000000 --- a/bin/build.cmd +++ /dev/null @@ -1 +0,0 @@ -@call "c:\program files (x86)\msbuild\12.0\bin\msbuild.exe" -m -nologo -v:q -property:GenerateFullPaths=true %* diff --git a/bin/genilog.cmd b/bin/genilog.cmd index 98afd21..b015974 100644 --- a/bin/genilog.cmd +++ b/bin/genilog.cmd @@ -1,2 +1,2 @@ -@rem @call python %~dp0\genilog.py %* -@call "c:\program files (x86)\python35-32\python.exe" c:\users\59698\repos\genilog\genilog.py %* +:@call python %~dp0\genilog.py %* +@call "c:\program files (x86)\python35-32\python.exe" c:\users\59698\repos\genilog\genilog.py %* diff --git a/bin/msbuild.cmd b/bin/msbuild.cmd deleted file mode 100644 index a72a87d..0000000 --- a/bin/msbuild.cmd +++ /dev/null @@ -1 +0,0 @@ -@call "c:\program files (x86)\msbuild\12.0\bin\msbuild.exe" -m -nologo -v:q -property:GenerateFullPaths=true %* diff --git a/bin/rte.cmd b/bin/rte.cmd index 39bb5bb..e87ab42 100644 --- a/bin/rte.cmd +++ b/bin/rte.cmd @@ -1,6 +1,8 @@ -@if "%1" == "-C" pushd "%2" -@call "c:\program files (x86)\python35-32\python.exe" bbrte_release\rte_release\rtepreproc.py --dryrun --testsonly --o _appbuild -pushd _appbuild\alltestcases -@call "c:\programs\cmake\bin\cmake.exe" -G "Visual Studio 12 2013" -@popd -@popd +@echo off +if "%1" == "-C" pushd "%2" +call "c:\program files (x86)\python35-32\python.exe" bbrte_release\rte_release\rtepreproc.py --dryrun --testsonly --o _appbuild +pushd _appbuild\alltestcases +call "c:\programs\cmake\bin\cmake.exe" -G "Visual Studio 12 2013" +popd +popd +pause diff --git a/exe/usdk-hhkb.ahk b/exe/usdk-hhkb.ahk index 04954a7..6a681a2 100644 --- a/exe/usdk-hhkb.ahk +++ b/exe/usdk-hhkb.ahk @@ -1,24 +1,24 @@ -; Use caps and rwin as ctrl (HHKB alike) -Capslock::LCtrl -RWin::RCtrl -LWin::return - -; Letter a -> skandinavian å -:*?:``a::å -:*?:``A::Å - -; Letter o -> danish/norwegen ø -:*?:``o::ø -:*?:``O::Ø - -; Letter ' -> danish/norwegen æ -:*?:``'::æ -:*?:``"::Æ - -; Letter u -> swedish/finish ö -:*?:``u::ö -:*?:``U::Ö - -; Letter e -> swedish/finish ä -:*?:``e::ä -:*?:``E::Ä +; Use caps and rwin as ctrl (HHKB alike) +Capslock::LCtrl +RWin::RCtrl +LWin::return + +; Letter a -> skandinavian Ã¥ +:*?:``a::Ã¥ +:*?:``A::Å + +; Letter o -> danish/norwegen ø +:*?:``o::ø +:*?:``O::Ø + +; Letter e -> danish/norwegen æ +:*?:``e::æ +:*?:``E::Æ + +; Letter u -> swedish/finish ö +:*?:``u::ö +:*?:``U::Ö + +; Letter ' -> swedish/finish ä +:*?:``'::ä +:*?:``"::Ä -- 2.43.0