Commit 07c4b91

mo khan <mo@mokhan.ca>
2021-06-25 22:43:05
copy minimal config from actual dotfiles
1 parent 416a32e
ssh/config
@@ -0,0 +1,5 @@
+Host *
+  AddKeysToAgent ask
+  ForwardX11 no
+  ServerAliveInterval 60
+  UseRoaming no
ackrc
@@ -0,0 +1,16 @@
+--sort-files
+--color
+--type-add=ruby=rake,haml
+--type-add=vim=vimrc
+--type-add=js=json,ejs
+--type-set=cucumber=feature
+--type-set=css=scss
+--type-set=MARKDOWN=md,mkd,markdown
+--type-set=RDOC=rdoc
+--type-set=coffeescript=.coffee
+--ignore-dir=log
+--ignore-dir=tmp
+--ignore-dir=doc
+--ignore-dir=coverage
+--ignore-dir=backups
+--ignore-dir=vendor
agignore
@@ -0,0 +1,2 @@
+vendor/bundle
+tmp
bashrc
@@ -0,0 +1,8 @@
+
+set -o vi
+
+shopt -s checkwinsize
+
+alias gti='git'
+
+PS1="\[\e[0;36m\]\w\[\e[0m\] \nモ "
ctags
@@ -0,0 +1,17 @@
+--recurse=yes
+--totals=yes
+--extra=+f
+--fields=+iaS
+--tag-relative=yes
+--exclude=.bundle
+--exclude=.git
+--exclude=db
+--exclude=doc
+--exclude=docs
+--exclude=log
+--exclude=*.md
+--exclude=node_modules
+--exclude=public
+--exclude=tmp
+--exclude=vendor
+--exclude='*\.min\.*'
curlrc
@@ -0,0 +1,1 @@
+-s
editrc
@@ -0,0 +1,1 @@
+bind -v
gitconfig
@@ -0,0 +1,60 @@
+[alias]
+  p = push -u origin head
+  st = status -s
+  ci = commit
+  ct = commit -m
+  co = checkout
+  di = diff -w
+  dc = diff --cached
+  cop = commit -m 'style: fix linter errors'
+  amend = commit --amend
+  b = branch
+  lga = log --graph --all --decorate --oneline
+  lg = log -p
+  lol = log --graph --decorate --oneline
+  lola = log --graph --decorate --oneline --all
+  churn = log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort -rn
+  shame = blame -w -M
+[color]
+  ui = true
+[core]
+  autocrlf = false
+  commitGraph = true
+  editor = vim
+  excludesfile = ~/.gitignore_global
+  symlinks = false
+[diff]
+  tool = vimdiff
+  compactionHeuristic = true
+  algorithm = patience
+[fetch]
+  prune = true
+[gc]
+  writeCommitGraph = true
+[github]
+  user = xlgmokha
+[help]
+  autocorrect = 1
+[init]
+  defaultBranch = main
+[log]
+  date = local
+[merge]
+  tool = vimdiff
+[protocol]
+  version = 2
+[protocol "https"]
+  allow = always
+[protocol "ssh"]
+  allow = always
+[pull]
+  ff = only
+  rebase = true
+[push]
+  default = simple
+[rerere]
+  enabled = true
+[user]
+  name = mo khan
+  email = mo@mokhan.ca
+  signingkey = 0xA26598E238F7A5D9
gitignore_global
@@ -0,0 +1,8 @@
+*.DS_Store
+*.swo
+*.swp
+.netrwhist
+node_modules
+tags
+vendor/bundle
+vendor/ruby
inputrc
@@ -0,0 +1,3 @@
+set bell-style none
+set editing-mode vi
+set keymap vi-command
install.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+set -e
+
+function dotdir()
+{
+  dir=$1
+  source="$PWD/$dir"
+  destination="$HOME/.$dir"
+  chmod 700 "$source"
+  ln -sfn "$source" "$destination"
+}
+
+function dotfile()
+{
+  file=$1
+  source=$PWD/$file
+  destination=$HOME/.$file
+  parent_dir="$(dirname "$destination")"
+  mkdir -p "$parent_dir"
+  echo "linking $source to $destination"
+  chmod 700 "$(dirname "$source")"
+  if [ "$(basename "$parent_dir")" == 'bin' ]; then
+    chmod 700 "$source"
+  else
+    chmod 600 "$source"
+  fi
+  ln -sfn "$source" "$destination"
+}
+
+mkdir -p "$HOME/.config" "$HOME/.local/bin" "$HOME/.local/share"
+
+dotfile "ackrc"
+dotfile "agignore"
+dotfile "bashrc"
+dotfile "ctags"
+dotfile "curlrc"
+dotfile "editrc"
+dotfile "gitconfig"
+dotfile "gitignore_global"
+dotfile "inputrc"
+dotfile "npmrc"
+dotfile "profile"
+dotfile "ssh/config"
+dotfile "vimrc"
+dotfile "wgetrc"
npmrc
@@ -0,0 +1,12 @@
+commit-hooks=false
+fund=false
+ignore-scripts=true
+init-author-email=mo@mokhan.ca
+init-author-name=mo khan
+init-license=MIT
+init-version=0.1.0
+registry=https://registry.npmjs.org/
+script-shell=/bin/sh
+send-metrics=false
+strict-ssl=true
+update-notifier=false
profile
@@ -0,0 +1,18 @@
+
+export DEBEMAIL=mo@mokhan.ca
+export DEBFULLNAME="mo khan"
+export DOTNET_CLI_TELEMETRY_OPTOUT='1'
+export EDITOR="vim"
+export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git'
+export HISTCONTROL=erasedups
+export HISTFILE=$HOME/.bash_history
+export HISTSIZE=100000
+export HISTTIMEFORMAT="%Y-%m-%d %T "
+export INPUTRC="$HOME/.inputrc"
+export LANG=en_US.UTF-8
+export LC_CTYPE=en_US.UTF-8
+export LESSHISTFILE='/dev/null'
+export LSCOLORS='gxfxcxdxbxegedabagacad'
+export MANPAGER=/usr/bin/less
+export PAGER=/usr/bin/less
+export VISUAL="vim"
README.md
@@ -1,3 +0,0 @@
-# dotfiles
-
-A minimal set of dotfiles to be productive in codespaces etc.
vimrc
@@ -0,0 +1,118 @@
+"" Basic Settings {{{{
+""
+
+syntax enable
+
+set autoindent
+set autoread
+set autowrite
+set backspace=indent,eol,start
+set backupdir=/tmp//
+set clipboard^=unnamed,unnamedplus
+set cmdheight=2
+set cursorline
+set directory=/tmp//
+set encoding=utf-8
+set expandtab
+set exrc
+set gdefault
+set hidden
+set hlsearch
+set ignorecase
+set incsearch
+set modelines=0
+set nobackup
+set nocompatible
+set noerrorbells
+set nojoinspaces
+set noswapfile
+set nowrap
+set nowritebackup
+set number
+set numberwidth=5
+set ruler
+set scrolloff=3
+set secure
+set shiftround
+set shiftwidth=2
+set showcmd
+set showmatch
+set showmode
+set smartcase
+set softtabstop=2
+set splitbelow
+set splitright
+set t_Co=256
+set t_vb=
+set tabstop=2
+set tags=./.git/tags,./tmp/tags,./tags,tags,._tags
+set title
+set ttyfast
+set visualbell
+
+set list
+set listchars+=extends:>
+set listchars+=nbsp:_
+set listchars+=precedes:<
+set listchars+=trail:·
+set listchars=""
+set listchars=tab:\ \
+
+set wildmenu
+set wildmode=longest,list:longest
+set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
+set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.zst
+set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
+set wildignore+=*/tmp/cache/assets/*/sprockets/*,*/tmp/cache/assets/*/sass/*
+set wildignore+=*.swp,*~,._*
+set wildignore+=*/tmp/*,*.so,*/coverage/*
+
+" }}}}
+
+"" File type-specific settings {{{{
+""
+
+filetype plugin indent on " Turn on filetype plugins (:help filetype-plugin)
+
+augroup filetype_vim
+  autocmd!
+  autocmd FileType vim setlocal foldmethod=marker
+augroup END
+
+" }}}}
+
+"" General Mappings (Normal, Visual, Operator-pending) {{{{
+""
+
+let mapleader = ","
+let localleader = "\\"
+
+inoremap jk <esc>
+nnoremap / /\v
+nnoremap ; :
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j<C-w>_
+nnoremap <C-k> <C-w>k<C-w>_
+nnoremap <C-l> <C-w>l
+nnoremap <leader><space> :noh<cr>
+nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
+nnoremap <leader>ev :vsplit $MYVIMRC<cr>
+nnoremap <leader>fef :normal! gg=G``<CR>
+nnoremap <leader>h <C-w>s<C-w>l
+nnoremap <leader>hs :set hlsearch! hlsearch?<CR>
+nnoremap <leader>p "+p
+nnoremap <leader>sv :source $MYVIMRC<cr>
+nnoremap <leader>v <C-w>v<C-w>l
+nnoremap <silent> <leader>cd :lcd %:h<CR>
+nnoremap <space> za
+nnoremap <tab> %
+nnoremap H ^
+nnoremap L $
+noremap <Down> gj
+noremap <Up> gk
+noremap <leader>= <C-w>=
+vnoremap / /\v
+vnoremap <space> zf
+vnoremap <tab> %
+
+" }}}}
wgetrc
@@ -0,0 +1,1 @@
+hsts-file=~/.cache/wget-hsts