209 Commits

Author SHA1 Message Date
48ebf0e5ca remove TERM var interfering with scp 2022-09-18 09:51:29 -07:00
1490ea1c21 add burro alias 2022-08-22 16:20:52 -07:00
63d1bc17e1 fix branch name 2022-08-21 13:00:41 -07:00
d91d611358 add pypy3 alias 2022-08-21 12:57:27 -07:00
a28af7eb6d F. U. ssh-agent F. T. F. R. O. 2022-08-21 12:57:27 -07:00
05d926fc63 update 2022-08-21 12:50:01 -07:00
d64a47bc93 add note about gpg key 2022-08-21 12:49:26 -07:00
41e0b74284 update socks alias 2022-08-21 12:47:59 -07:00
7f578c1efe update gitconfig with aptos directory-specific identity config 2022-08-14 10:20:00 -07:00
bec7226f41 smol change, my first GPG-verified commit 2022-07-21 21:56:34 -07:00
b335644b47 fix pyenv path, no install python2 2022-07-22 01:56:35 +02:00
aade520812 no go 2022-07-22 01:56:02 +02:00
54cbddffbf aptos blue 2022-07-22 01:55:54 +02:00
46368c6cb9 comment out Black formatting shortcut 2022-07-16 16:05:18 -07:00
724f7f0627 remove old seawater, bascom 2022-07-16 16:04:41 -07:00
d01be0b8ad remove bascom functin from aliases 2022-07-16 16:04:29 -07:00
b89b2b678d add local fixes from maya 2022-07-09 19:03:14 -07:00
71629a3fbb update and shuffle aliases 2022-07-09 18:45:24 -07:00
dc2d5f46ee fix a few aliases 2022-07-09 18:45:24 -07:00
Chaz Reid
7d82c219cc add git lfs to gitconfig 2022-07-09 18:45:24 -07:00
a6d9a9e78f fix git:// to git+https:// 2022-03-31 22:11:42 -07:00
ba792e5715 fix pyenv 2022-03-30 19:52:21 -07:00
Chaz Reid
32d7ecaef8 fixup nonworking stuff on bascom 2022-02-16 17:44:02 -08:00
8f07701499 fix typo 2021-12-16 19:01:00 -08:00
46487a9c4f update aliases 2021-12-16 07:13:16 -08:00
42906c49c3 update machine ssh aliases 2021-12-16 07:10:54 -08:00
bbd225e845 improve tmux keyboard shortcuts 2021-12-16 07:08:50 -08:00
24221c710f add alias to generate uuid 2021-12-16 07:08:50 -08:00
968861a4f4 use main as default git branch 2021-12-16 07:08:50 -08:00
0856cef3a4 disable colors in vimrc 2021-12-16 07:08:50 -08:00
Charles Reid
740c7ad06a fix JAVA_HOME on bascom 2021-12-08 10:42:19 -08:00
Charles Reid
0e65346e26 commit cleaned up bash profile and functions 2021-10-12 12:54:14 -07:00
Charles Reid
242a2708aa fix setwidth for different filetypes 2021-10-12 11:58:16 -07:00
Charles Reid
ccd3ae2477 clear badges alias 2021-10-12 11:55:19 -07:00
63d28954b4 fix bashrc to set FULL path, so mosh works 2021-09-13 18:48:10 -07:00
61f2200615 update tmux conf 2021-07-10 17:27:51 -07:00
cb2ab4d136 fix problem with tput shim 2021-04-28 11:31:25 -07:00
c05b142081 fix remote name 2021-04-28 11:28:58 -07:00
639ceec7ab remove functions crud 2021-04-28 11:27:56 -07:00
124e9eb519 disable stupid ssh agent which makes every shell take FOREVER 2021-01-22 21:33:23 -08:00
bf73d192ee add black shortcut 2021-01-22 20:17:43 -08:00
5e967c6fa9 turn off jedi 2021-01-22 20:08:33 -08:00
3eb9156858 add ssh-agent startup to bash profile 2020-12-05 15:09:53 -08:00
eb0f2c9815 update bash prof 2020-12-05 12:48:05 -08:00
Charles Reid
231baf1e7a fix syntax issue with tmux.conf, and switch to Control-T 2020-11-29 10:45:24 -08:00
1011549bb5 Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  minor update to include bascom
  bubble text in vimrc
  set pull option to rebase
2020-11-04 17:09:23 -08:00
Charles Reid
c441c73929 minor update to include bascom 2020-11-04 17:08:07 -08:00
Charles Reid
56dc261b3b bubble text in vimrc 2020-11-04 17:06:46 -08:00
Charles Reid
e80b39f4bb set pull option to rebase 2020-11-04 17:04:25 -08:00
7b77ebb9e6 fix vp command 2020-10-06 15:05:48 -07:00
f1cb45fc43 remove solarized theme 2020-10-02 17:09:38 -07:00
Charles Reid
de8e59f43c Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  fix ssh port
  sync up the dotfiles
  fix comment
  add bear/bespin/dorky ssh functions
2020-10-02 17:05:34 -07:00
Charles Reid
06b3875a27 add pgi command to .aliases, bascom only 2020-10-02 17:05:18 -07:00
7f80a8bc87 fix ssh port 2020-08-31 20:27:05 -07:00
8c0667164d Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  fix bash prompt
  fix PS1 dss_msg errors
2020-08-15 21:23:54 -07:00
7f1658f7a4 sync up the dotfiles 2020-08-15 21:23:38 -07:00
67954c0faa fix comment 2020-08-15 21:07:50 -07:00
cd7f7c7459 add bear/bespin/dorky ssh functions 2020-08-15 21:06:16 -07:00
aacd830693 fix bash prompt 2020-05-13 21:58:09 -07:00
603365845a fix PS1 dss_msg errors 2020-05-13 21:46:56 -07:00
1ebf856226 remove dss_msg from bash prompt except for bascom 2020-05-10 11:51:56 -07:00
11090bd91b set up git bash completion for specific machines, not universally 2020-05-10 11:51:37 -07:00
4f57e006eb remove redundant block 2020-05-10 10:33:53 -07:00
b53134dfa1 minor fixes, syncing with debian dotfiles 2020-04-25 19:24:16 -07:00
e8822cc1e0 update readme and instructions 2020-02-19 19:14:39 -08:00
Charles Reid
ce9746bd1d highlight more columns 2020-02-19 14:24:11 -08:00
Charles Reid
12459231f3 add commit alias to gitconfig 2020-02-19 14:23:29 -08:00
Charles Reid
f35f05fa8a exclude vp dir from grep commands 2020-02-19 14:23:21 -08:00
Charles Reid
73336e2361 separate seawater stuff 2020-02-19 14:22:10 -08:00
Charles Reid
eaba619804 more checkout aliases 2020-02-12 09:32:28 -08:00
Charles Reid
63c68a5de6 update seawater bash profile config 2020-02-12 09:32:14 -08:00
Charles Reid
9472391c4d aws assume-role aliases, update ip command 2020-01-27 14:31:12 -08:00
Charles Reid
e26ba6880a add lsop alias 2020-01-07 10:28:49 -08:00
Charles Reid
7b7f264ba5 add git lolo 2020-01-07 10:27:32 -08:00
Charles Reid
d185d50c42 change push pref to simple 2019-12-12 14:38:38 -08:00
Charles Reid
32cef6a0ca update the git dm alias 2019-12-12 14:36:59 -08:00
Charles Reid
b3b99ecc13 remove redundant rule specification 2019-12-03 17:20:48 -08:00
dd606a7c5e two more typo aliases 2019-12-02 14:00:11 -08:00
c740bd3866 reduce amt of syntax highlighting 2019-12-01 02:26:29 -08:00
Charles Reid
714c6f6a2d add shopt to turn off autocomplete on empty lines 2019-11-27 18:34:24 -08:00
Charles Reid
d44ed138b5 more ls fixes 2019-11-25 19:55:12 -08:00
Charles Reid
0148a12276 fix ls check 2019-11-25 19:50:47 -08:00
Charles Reid
9c7a41cfa3 add ~/bin to $PATH 2019-11-25 16:57:41 -08:00
Charles Reid
ff31d0dd9b make vp alias python 3.6 2019-11-25 16:57:24 -08:00
Charles Reid
bc6ff910dc more warn 2019-11-25 16:55:15 -08:00
Charles Reid
f2385a5265 add vp alias 2019-11-25 16:55:15 -08:00
4643d43be6 fixup aliases 2019-11-15 17:38:13 -08:00
Charles Reid
010b46d735 Merge branch 'master' of github.com:chmreid/mac-dotfiles
* 'master' of github.com:chmreid/mac-dotfiles:
  add gettext to brew install
  add go scripts to bootstrap.sh
2019-10-19 12:53:49 -07:00
Charles Reid
290193c2bd add gettext to brew install 2019-10-19 12:53:36 -07:00
Charles Reid
e9d7981e99 add go scripts to bootstrap.sh 2019-10-19 12:53:20 -07:00
Charles Reid
6cdb6c51f9 add dmf back into gitconfig 2019-10-19 12:51:35 -07:00
Charles Reid
e495c50bcb add dm aliases to gitconfig 2019-10-19 12:50:06 -07:00
a4f7de9ee8 Merge branch 'master' of github.com:chmreid/mac-dotfiles
* 'master' of github.com:chmreid/mac-dotfiles:
  add virtualenv, boto3 to python install
  no gettext.sh stuff
  use pip3 initially for python install, just in case
  improve aliases
2019-10-19 12:48:13 -07:00
Charles Reid
a5eee0ed5d add virtualenv, boto3 to python install 2019-10-19 20:17:21 +02:00
Charles Reid
48686c2941 no gettext.sh stuff 2019-10-19 20:16:56 +02:00
Charles Reid
3666d6f615 use pip3 initially for python install, just in case 2019-10-18 15:32:35 -07:00
a9c3dc192c improve aliases 2019-10-17 00:25:32 -07:00
Charles Reid
56d2460123 improve aliases 2019-10-14 12:23:14 -07:00
Charles Reid
23beba3b03 moar aliases 2019-10-14 12:18:53 -07:00
Charles Reid
e5e443a18d add typo git aliases 2019-10-14 11:50:25 -07:00
Charles Reid
ee32e58c19 whitespace fixes 2019-10-11 17:19:05 -07:00
Charles Reid
d964f14f37 selective changes to bashrc: move PATH 2019-10-11 17:18:42 -07:00
Charles Reid
83f83f73da turn on auto update for git rerere 2019-10-11 12:55:32 -07:00
Charles Reid
587f780e13 enable git rerere 2019-10-11 12:52:44 -07:00
Charles Reid
80ae1ce747 Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  add vimrc colorrrrzzzz
2019-10-09 20:59:54 -07:00
Charles Reid
7f80eb8a32 add comments to gitconfig 2019-10-09 20:59:36 -07:00
Charles Reid
125f01428d add DSS deployment stage to PS1 2019-10-09 20:59:12 -07:00
Charles Reid
47115d5b3b add custom terraform install path for seawater 2019-10-09 20:58:50 -07:00
1171691999 Merge branch 'master' of https://git.charlesreid1.com/dotfiles/mac
* 'master' of https://git.charlesreid1.com/dotfiles/mac:
  add seawater elasticsearch configuration
  add function to trim windows newlines
  add check_lambdas alias for seawater
  more shortcuts and aliases in .gitconfig
  remove crud and speed up bash profile
2019-10-07 20:31:18 -07:00
Charles Reid
3503950ef7 add seawater elasticsearch configuration 2019-09-27 11:48:18 -07:00
Charles Reid
ed8032253b add function to trim windows newlines 2019-09-27 11:46:54 -07:00
Charles Reid
473406507f Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  no brew references in PS1 plz
2019-09-19 17:18:23 -07:00
Charles Reid
b77142a190 add check_lambdas alias for seawater 2019-09-19 17:18:07 -07:00
Charles Reid
d8c5366e45 more shortcuts and aliases in .gitconfig 2019-09-16 23:25:12 -07:00
Charles Reid
b6e3747731 remove crud and speed up bash profile 2019-09-16 23:24:56 -07:00
aa9d85a5d9 add vimrc colorrrrzzzz 2019-09-08 13:57:10 -07:00
65cfbc02cc Merge branch 'master' of github.com:chmreid/mac-dotfiles
* 'master' of github.com:chmreid/mac-dotfiles:
  change order of setup/install
  make go/python skip if existing verison already found
  add copy-paste-friendly keybindings for copy mode
  make scripts executable
  add go setup/install scripts and call them from pre_bootstrap
  add script to diff two files
  update brew install with go and man replacements
  finish description
  add go stuff to bash profile and brew install
  update readme
  install jedi-vim
  turn off jedi by default
2019-09-08 13:54:40 -07:00
fd36b7b188 Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  remove relative numbering
  clean up bootstrap script
  add note on <Leader>
2019-09-08 13:54:07 -07:00
f6a8e933dd no brew references in PS1 plz 2019-09-02 07:57:10 -07:00
Charles Reid
4baa2157db change order of setup/install 2019-08-20 11:29:03 -07:00
Charles Reid
0d9ffffdb4 make go/python skip if existing verison already found 2019-08-20 11:28:47 -07:00
Charles Reid
b0cfaa9236 add copy-paste-friendly keybindings for copy mode 2019-08-20 11:20:41 -07:00
Charles Reid
3feb587fcc make scripts executable 2019-08-20 11:20:30 -07:00
Charles Reid
693d11e2b6 add go setup/install scripts and call them from pre_bootstrap 2019-08-20 11:18:39 -07:00
Charles Reid
26158cea01 add script to diff two files 2019-08-20 10:52:55 -07:00
Charles Reid
627b42d391 update brew install with go and man replacements 2019-08-20 10:52:47 -07:00
Charles Reid
480766a217 finish description 2019-08-19 21:37:57 -07:00
Charles Reid
6627155041 add go stuff to bash profile and brew install 2019-08-19 21:37:47 -07:00
Charles Reid
a195d1cae5 update readme 2019-08-19 19:51:46 -07:00
Charles Reid
2c1b3f09b9 install jedi-vim 2019-08-16 10:38:09 -07:00
Charles Reid
daeccdd14c turn off jedi by default 2019-08-16 10:35:34 -07:00
Charles Reid
43456d5b23 remove relative numbering 2019-08-14 23:21:37 -07:00
Charles Reid
f7b371daf6 Merge branch 'master' of https://git.charlesreid1.com/dotfiles/mac
* 'master' of https://git.charlesreid1.com/dotfiles/mac:
  remove s alias, too easy to mistype
2019-08-14 21:01:53 -07:00
Charles Reid
26187fa394 clean up bootstrap script 2019-08-14 20:43:34 -07:00
Charles Reid
b836c6ba85 add note on <Leader> 2019-08-14 20:15:31 -07:00
a0d65fda68 remove s alias, too easy to mistype 2019-08-13 19:18:20 -07:00
aa011663dc Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
2019-08-13 19:14:31 -07:00
9634419126 Merge branch 'master' of https://git.charlesreid1.com/dotfiles/mac
* 'master' of https://git.charlesreid1.com/dotfiles/mac:
  add pre-configured session and keyboard shortcut to tmux conf
  add scripts directory setup to pre_bootstrap
  adding scripts and scripts dir to mac dotfiles
  update tmux configuration file
  add ~/scripts to path
  use most as man pager
  add most pager
2019-08-13 19:13:44 -07:00
131927407f Merge pull request #7 from chmreid/master
More tmux changes
2019-08-13 13:41:58 -07:00
Charles Reid
b361106254 add pre-configured session and keyboard shortcut to tmux conf 2019-08-13 13:36:58 -07:00
Charles Reid
1b08664704 add scripts directory setup to pre_bootstrap 2019-08-13 13:36:37 -07:00
531fdc0285 Merge pull request #6 from chmreid/master
Improve tmux configuration
2019-08-13 13:34:41 -07:00
Charles Reid
e750c7e7bf adding scripts and scripts dir to mac dotfiles 2019-08-13 12:55:04 -07:00
Charles Reid
796d14d92d update tmux configuration file 2019-08-13 12:35:16 -07:00
Charles Reid
2cab537b2f add ~/scripts to path 2019-08-13 12:35:07 -07:00
Charles Reid
6c4ea5f89c use most as man pager 2019-08-13 12:10:03 -07:00
Charles Reid
74553e56db add most pager 2019-08-13 12:09:23 -07:00
71a1a86a5b Merge pull request #5 from chmreid/master
Generalize pre-bootstrap SSH key email, update python installation to include autofmt toolz
2019-08-07 21:13:40 -07:00
Charles Reid
3dd25efabb fix the pre-bootstrap script so it prompts for email 2019-08-07 10:53:31 -07:00
Charles Reid
8a3ba304f6 Merge branch 'seawater'
* seawater:
  update python installation script, add autofmt toolz
  install black plugin for vim
  update pre-bootstrap ssh command to use ucsc email
2019-08-07 10:49:38 -07:00
Charles Reid
cd9eed08b3 update python installation script, add autofmt toolz 2019-08-07 10:49:24 -07:00
Charles Reid
cf2916d1ad install black plugin for vim 2019-08-07 10:36:43 -07:00
ac9cd51a54 Merge pull request #4 from chmreid/master
Update python version installed by pyenv to miniconda
2019-08-07 10:15:29 -07:00
Charles Reid
4e8d246384 Merge branch 'master' into seawater
* master:
  update python version installed by pyenv to miniconda
  update vim setup script to make undo/swap dirs, and call from pre_bootstrap script
  add undo/swap dir settings back into .vimrc
2019-08-07 10:09:33 -07:00
Charles Reid
b510e28c33 update python version installed by pyenv to miniconda 2019-08-07 10:03:46 -07:00
978f9c7201 Merge pull request #3 from chmreid/master
make text whiter in vim color scheme, specify email in ssh key
2019-08-06 20:53:06 -07:00
Charles Reid
ec4a922c22 Merge branch 'master' of github.com:charlesreid1/mac-dotfiles
* 'master' of github.com:charlesreid1/mac-dotfiles:
  update vim setup script to make undo/swap dirs, and call from pre_bootstrap script
  add undo/swap dir settings back into .vimrc
2019-08-06 20:51:27 -07:00
Charles Reid
4910d5aa48 update pre-bootstrap ssh command to use ucsc email 2019-08-06 20:48:35 -07:00
Charles Reid
6b0641cba3 explicitly specify email in SSH key 2019-08-06 20:47:15 -07:00
Charles Reid
10fcf3413c make text whiter in vim color scheme 2019-08-06 10:54:07 -07:00
3df7556f1c Merge pull request #2 from charlesreid1/vim-swap-undo
Vim swap undo
2019-08-05 20:30:18 -07:00
8d0e8e5da3 Merge branch 'master' of github.com:charlesreid1/mac-dotfiles into vim-swap-undo
* 'master' of github.com:charlesreid1/mac-dotfiles:
  add pyenv install/activate commands
2019-08-05 20:23:41 -07:00
c696204052 Merge pull request #1 from chmreid/master
Update mac dotfiles for Mojave
2019-08-05 20:23:00 -07:00
efe946e4a5 add pyenv install/activate commands 2019-08-05 11:38:03 -07:00
42acaab601 update vim setup script to make undo/swap dirs, and call from pre_bootstrap script 2019-08-03 12:29:13 -07:00
acc317107d add undo/swap dir settings back into .vimrc 2019-08-03 12:28:54 -07:00
fb8954e21e fix solarized dark to use black background 2019-08-02 12:00:21 -07:00
1cd28bbc89 fix aliases that hard-coded /bin/ls 2019-08-02 09:46:28 -07:00
2971ffb3f6 fix invalid tmux config file 2019-08-01 16:04:58 -07:00
389b61e7a1 update brew install script to include tmux 2019-08-01 15:55:13 -07:00
b0eba70875 update readme with notes on steps/order 2019-07-31 17:02:04 -07:00
5cccc29c27 fix ls alias so ls path is not hard-coded 2019-07-31 16:56:46 -07:00
b729d9dfb8 fix permissions for homebrew 2019-07-31 16:56:25 -07:00
2d8e82bd53 install joplin from cask 2019-07-30 14:43:32 -07:00
68b750fbf7 remove iterm cruft from mac settings. not working. 2019-07-30 12:32:26 -07:00
22f51c4838 add software to brew install script 2019-07-30 12:32:07 -07:00
a1cd11646f remove greenfield codes script 2019-07-30 12:31:52 -07:00
3be7090127 add gnu coreutils to path 2019-07-30 11:08:39 -07:00
a97291021b use /tmp for swap files 2019-07-30 11:08:15 -07:00
5a911d6db6 install pyenv in python setup script 2019-07-30 10:59:14 -07:00
486d0b6496 remove --flags from brew install commands (deprecated) 2019-07-30 10:58:26 -07:00
f9e4792e6f fix how set machine name script handles sudo 2019-07-30 10:58:03 -07:00
185744be40 add ssh key generation to pre-bootstrap script 2019-07-30 10:50:31 -07:00
f1acb18add change hard-coded home path to $HOME 2019-07-30 10:39:58 -07:00
93c0da10cc fix shell check 2019-07-30 10:39:05 -07:00
e9845255d8 remove vim swap/undo 2019-07-30 10:32:12 -07:00
211dfb6f01 add some explanatory comments about nnoremap
nnoremap = nnore map
         = n no re map

n > normal mode only
no > don't do
re > recursive
map > mapping
2019-03-07 21:51:44 -08:00
e763143dbe add go bin in home folder to path 2019-03-07 21:51:38 -08:00
3b73777c25 add C-h and C-l to tmux for more vim-like bindings 2019-03-07 21:51:23 -08:00
95f5608272 shift+j/k: 5->7 2019-01-27 10:31:42 -08:00
ea67e3fb2c move faster 2019-01-27 03:11:19 -08:00
89ec0b96f4 Merge branch 'master' of https://git.charlesreid1.com/dotfiles/mac
* 'master' of https://git.charlesreid1.com/dotfiles/mac:
  add vim setup to bootstrap script
2019-01-06 09:39:21 -08:00
8663c388e9 add mcfly to .bashrc 2019-01-06 09:39:00 -08:00
852e2caf54 write history immediately 2019-01-06 09:38:50 -08:00
f4cfd817bb grep alias should be case insensitive 2019-01-06 09:38:32 -08:00
3a19ec3a3b add vim setup to bootstrap script 2018-12-25 17:41:12 -08:00
6ec0b5a7eb update vimrc tab chars 2018-12-25 16:13:39 -08:00
3ab464d78f remove swap files, update vim prep script 2018-12-25 14:56:25 -08:00
df5d2b92e9 add custom solarized color scheme 2018-12-25 14:54:17 -08:00
c7dfafc493 add vim setup script 2018-12-25 13:24:29 -08:00
16d496655f update vimrc (will require more vim prep) 2018-12-25 13:22:36 -08:00
d77689642b fix incorrect function name in .aliases 2018-09-08 16:38:38 -07:00
bc1156a706 update ssh aliases - add bluebear 2018-09-08 16:36:50 -07:00
cc269db172 add git fetch shortcut to gitconfig 2018-08-23 04:59:19 -07:00
af8e2c8b37 fix color scheme, desert is better 2018-08-15 09:37:17 -07:00
83536b79bb update gitconfig url schema, comment out cruft; vimrc comments 2018-08-14 04:13:38 -07:00
dfe43d8043 another one letter alias, s is for screen 2018-08-12 18:57:48 -07:00
01743845de add twiddlecase 2018-08-08 03:54:15 -07:00
0d19b1431d Merge branch 'like-debian' of dotfiles/mac into master 2018-07-23 03:34:57 +00:00
43 changed files with 3202 additions and 546 deletions

197
.aliases
View File

@@ -10,15 +10,33 @@ git() {
} }
# get rid of stupid annoying badges
# ---------------------------------
alias clearbadges='defaults write com.apple.systempreferences AttentionPrefBundleIDs 0 && killall Dock'
# lazy af # lazy af
# -------
alias mk='make' alias mk='make'
alias smk='snakemake' alias smk='snakemake'
alias smake='snakemake' alias smake='snakemake'
alias py='python3' alias py='python3'
alias ipy='ipython --pylab' alias ipy='ipython --pylab'
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias ip="curl -4 icanhazip.com"
alias ipaddr="dig +short myip.opendns.com @resolver1.opendns.com" alias ipaddr="curl -4 icanhazip.com"
# uuid generator
alias uuid="uuidgen"
# python stuff
# ------------
# https://unix.stackexchange.com/a/459586
alias vp="[ -d vp ] || virtualenv -p python3 vp && source vp/bin/activate"
if [[ "${HOSTNAME}" == "aptos" ]]; then
alias vpp="[ -d vpp ] || virtualenv --python ${HOME}/.pyenv/versions/pypy3.9-7.3.9/bin/pypy3 vpp && source vpp/bin/activate"
else
alias vpp="[ -d vpp ] || virtualenv -p pypy3 vpp && source vpp/bin/activate"
fi
# one-letter aliases # one-letter aliases
# --------------- # ---------------
@@ -37,6 +55,7 @@ alias sha1='openssl sha1'
alias du='du -kh' alias du='du -kh'
alias dh='dh -kTh' alias dh='dh -kTh'
alias pc='pelican content' alias pc='pelican content'
alias lsop='lsof -nP +c 15 | /usr/bin/grep LISTEN'
@@ -54,38 +73,40 @@ alias mv='mv -i'
# ls aliases # ls aliases
# -------------------- # --------------------
# Detect which `ls` flavor is in use # Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
LS=$(which ls)
if $LS --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color" colorflag="--color"
export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
groupflag="--group-directories-first" groupflag="--group-directories-first"
else # macOS `ls` else # macOS `ls`
colorflag="-G" colorflag="-G"
export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx' export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx'
groupflag="" groupflag="--group-directories-first"
fi fi
alias ls="/bin/ls -1 ${colorflag} ${groupflag}" alias ls="$LS -1 ${colorflag} ${groupflag}"
alias sl='ls' alias sl='ls'
# List all files colorized in long format # List all files colorized in long format
alias l="/bin/ls -lhAF ${colorflag}" alias l="$LS -lhAF ${colorflag}"
alias ll="l" alias ll="l"
# List all files colorized in long format, including dot files # List all files colorized in long format, including dot files
alias la="l -a" alias la="l -a"
# List only directories # List only directories
alias lsd="/bin/ls -lF ${colorflag} | grep --color=never '^d'" alias lsd="$LS -lF ${colorflag} | grep --color=never '^d'"
alias lr='ls -r' # reverse alias lr='ls -r' # reverse
alias llr='ll -r' # reverse alias llr='ll -r' # reverse
alias lt='/bin/ls -lhAFt -G' # time alias lt='$LS -lhAFt -G' # time
alias lt='ls -t' # time alias lt='ls -t' # time
alias llt='ll -t' # time alias llt='ll -t' # time
@@ -112,13 +133,79 @@ alias c='clear'
# socks proxy thru rojo # socks proxy thru seawater for private wiki access
# (forwards http traffic thru rojo port 8080) # (use with foxyproxy, point to localhost:5778)
# --------------- # ---------------
alias socks='ssh -fN -D 8080 charles@charlesreid1.com' alias socks='ssh -D 5778 -p 5778 charles@charlesreid1.party -f -N'
# tinc vpn
# ---------------
alias seawatervpn="seawatervpn"
function seawatervpn() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="192.168.30.1"
ssh -p 5778 -Y charles@${IP} # the actual ssh call
}
alias randalvpn="randalvpn"
function randalvpn() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="192.168.30.10"
ssh -p 5778 -Y charles@${IP} # the actual ssh call
}
alias mayavpn="mayavpn"
function mayavpn() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="192.168.30.20"
ssh -Y charles@${IP} # the actual ssh call
}
alias bearvpn="bearvpn"
function bearvpn() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="192.168.30.40"
ssh -p 5778 -Y charles@${IP} # the actual ssh call
}
alias emmettvpn="emmettvpn"
function emmettvpn() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="192.168.30.55"
ssh -p 5778 -Y charles@${IP} # the actual ssh call
}
# Local machines
# ---------------
alias randal="randal"
function randal() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="192.168.0.10"
ssh -p 5778 -Y charles@${IP} # the actual ssh call
}
# Remote machines # Remote machines
# --------------- # ---------------
@@ -129,72 +216,49 @@ function charles() {
~/ssh.file > /dev/null ~/ssh.file > /dev/null
rm -f ~/ssh.file rm -f ~/ssh.file
export IP="charlesreid1.com" export IP="charlesreid1.com"
ssh -Y charles@${IP} # the actual ssh call ssh -p 5778 -Y charles@${IP} # the actual ssh call
} }
alias blackbeard="blackbeard" alias bear="bear"
function blackbeard() { function bear() {
ssh-agent > ~/ssh.file # env vars in ssh.file ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null ~/ssh.file > /dev/null
rm -f ~/ssh.file rm -f ~/ssh.file
export IP="54.191.178.27" export IP="173.255.249.79"
ssh -Y charles@${IP} # the actual ssh call ssh -p 5778 -Y charles@${IP} # the actual ssh call
} }
alias jupiter="jupiter" alias emmett="emmett"
function jupiter() { function emmett() {
ssh-agent > ~/ssh.file # env vars in ssh.file ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null ~/ssh.file > /dev/null
rm -f ~/ssh.file rm -f ~/ssh.file
export IP="10.6.0.2" export IP="173.255.252.181"
ssh -Y charles@${IP} # the actual ssh call ssh -p 5778 -Y charles@${IP} # the actual ssh call
} }
alias maya="maya" alias seawater="seawater"
function maya() { function seawater() {
ssh-agent > ~/ssh.file # env vars in ssh.file ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null ~/ssh.file > /dev/null
rm -f ~/ssh.file rm -f ~/ssh.file
export IP="10.6.0.10" export IP="charlesreid1.party"
ssh -Y charles@${IP} # the actual ssh call ssh -p 5778 -Y charles@${IP} # the actual ssh call
} }
alias cronus="cronus" alias burro="burro"
function cronus() { function burro() {
ssh-agent > ~/ssh.file # env vars in ssh.file ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null ~/ssh.file > /dev/null
rm -f ~/ssh.file rm -f ~/ssh.file
export IP="10.6.0.20" export IP="173.255.210.178"
ssh -Y charles@${IP} # the actual ssh call ssh -p 5778 -Y charles@${IP} # the actual ssh call
} }
alias krash="krash"
function krash() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="45.56.87.232"
ssh -Y charles@${IP} # the actual ssh call
}
alias wisko="wisko"
function wisko() {
ssh-agent > ~/ssh.file # env vars in ssh.file
chmod +x ~/ssh.file # execute file
~/ssh.file > /dev/null
rm -f ~/ssh.file
export IP="159.65.75.41"
ssh -Y melo@${IP} # the actual ssh call
}
# tmux shortcuts # tmux shortcuts
# constructed with help from https://robots.thoughtbot.com/a-tmux-crash-course # constructed with help from https://robots.thoughtbot.com/a-tmux-crash-course
@@ -268,20 +332,22 @@ alias back='cd $OLDPWD'
# Easier navigation: .., ..., ...., ....., ~ and - # Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .." alias ..="cd .."
alias ...="cd ../.." alias ...="cd ../.."
### alias ....="cd ../../.." alias ....="cd ../../.."
### alias .....="cd ../../../.." alias .....="cd ../../../.."
### alias ~="cd ~" # `cd` is probably faster to type though alias ~="cd ~" # `cd` is probably faster to type though
### alias -- -="cd -" alias -- -="cd -"
# Shortcuts # Shortcuts
alias d="cd ~/Desktop" alias d="cd ~/Desktop"
alias g="git" alias g="git"
alias gs="git status"
alias h="history" alias h="history"
#alias s="screen"
# Always enable colored `grep` output # Always enable colored `grep` output
# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage. # Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage.
alias grep='grep --color=auto' alias grep='grep -i --color=auto --exclude-dir=vp'
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto' alias egrep='egrep --color=auto'
@@ -363,25 +429,6 @@ alias ifactive="ifconfig | pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active'
# Airport CLI alias # Airport CLI alias
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'
### # Intuitive map function
### # For example, to list all directories that contain a certain file:
### # find . -name .gitattributes | map dirname
### alias map="xargs -n1"
###
### # One of @janmoesens ProTip™s
### for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
### alias "${method}"="lwp-request -m '${method}'"
### done
###
###
### # Stuff I never really use but cannot delete either because of http://xkcd.com/530/
### alias stfu="osascript -e 'set volume output muted true'"
### alias pumpitup="osascript -e 'set volume output volume 100'"
###
### # Kill all the tabs in Chrome to free up memory
### # [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
### alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
# Lock the screen (when going AFK) # Lock the screen (when going AFK)
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"

View File

@@ -9,16 +9,53 @@
EDITOR="vim" EDITOR="vim"
GIT_EDITOR="vim" GIT_EDITOR="vim"
# Better man pages
PAGER="most"
# Go stuff
GOROOT=$HOME/go
GOPATH=$HOME/go
# Set $PATH here # Set $PATH here
PATH="${HOME}/scripts:${PATH}"
PATH="/usr/local/bin:$PATH" PATH="/usr/local/bin:$PATH"
PATH="/usr/local/sbin:${PATH}" # homebrew admin tools PATH="/usr/local/sbin:${PATH}" # homebrew admin tools
PATH="${PATH}:${GOROOT}/bin"
PATH="/usr/local/opt/coreutils/libexec/gnubin:${PATH}"
PATH="${HOME}/bin:${PATH}"
if [[ ("$HOSTNAME" == "seawater") || ("$HOSTNAME" == "bascom") ]]; then
PATH="${HOME}/bin/elasticsearch-5.4.2/bin:${PATH}"
# assume-role cli util:
# Add homebrew-installed ruby to path:
# (WARNING: THIS CAN CAUSE PROBLEMS!)
export PATH="/usr/local/opt/ruby/bin:$PATH"
# Add homebrew-ruby-gem-installed packages to path:
export PATH="/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"
# aws - load config file when using assume-role
export AWS_SDK_LOAD_CONFIG="1"
fi
# Tell git not to look for getext.sh
# since pyenv has trouble with that
export GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=1
if [[ "$HOSTNAME" == "bascom" ]]; then
# git tab completion
source ${HOME}/.git-completion.bash
fi
if [[ "$HOSTNAME" == "maya" ]]; then if [[ "$HOSTNAME" == "maya" ]]; then
# Setting PATH for homebrew # Setting PATH for homebrew
PATH="/Users/charles/.local/bin:$PATH" PATH="$HOME/.local/bin:$PATH"
PATH="/Users/charles/Library/Python/3.6/bin:$PATH" PATH="$HOME/Library/Python/3.6/bin:$PATH"
# pypy
# this should go after /usr/local/bin
PATH="${PATH}:/usr/local/share/pypy3"
### # some weird new homebrew thing?? ### # some weird new homebrew thing??
### # this is where python -> python3 lives now ### # this is where python -> python3 lives now
@@ -35,20 +72,38 @@ if [[ "$HOSTNAME" == "maya" ]]; then
source $F2 source $F2
fi fi
# git tab completion
source ${HOME}/.git-completion.bash
# Enable tab completion for `g` by marking it as an alias for `git`
if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
complete -o default -o nospace -F _git g;
fi;
fi fi
# goenv installer
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
# Only enable this if you are using go.
# This will add half a second every time you
# open a new shell.
#eval "$(goenv init -)"
# pyenv installer # pyenv installer
# https://github.com/pyenv/pyenv-installer # https://github.com/pyenv/pyenv-installer
export PATH="/Users/charles/.pyenv/bin:$PATH" export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)" eval "$(pyenv init -)"
#eval "$(pyenv virtualenv-init -)"
export PATH export PATH
# Just let homebrew take care of PYTHONPATH, yeah? # Just let homebrew take care of PYTHONPATH, yeah?
# But if you really needed to, you could set it here. # But if you really needed to, you could set it here.
# Bash history # Bash history
HISTFILE="$HOME/.bash_history" HISTFILE="$HOME/.bash_history"
@@ -57,12 +112,39 @@ HISTIGNORE="ls:cls:clc:clear:pwd:l:ll:[ ]*"
HISTSIZE=1000000 HISTSIZE=1000000
HISTTIMEFORMAT=': %Y-%m-%d_%H:%M:%S; ' HISTTIMEFORMAT=': %Y-%m-%d_%H:%M:%S; '
# Append to the Bash history file, rather than overwriting it
shopt -s histappend;
# Save Bash history # Save Bash history
shopt -s cmdhist; shopt -s cmdhist;
# Append to the Bash history file, rather than overwriting it
shopt -s histappend;
# Write history to .bash_history immediately.
# -a writes current/new lines to history file
# -n reloads only new commands
# https://askubuntu.com/a/673283
PROMPT_COMMAND='history -a;history -n'
# don't try to autocomplete commands when tab is pressed and line is empty
shopt -s no_empty_cmd_completion
#############################
# ssh-agent setup
### SSH_ENV="$HOME/.ssh/agent-environment"
###
### function start_agent {
### /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
### chmod 600 "${SSH_ENV}"
### . "${SSH_ENV}" > /dev/null
### /usr/bin/ssh-add;
### }
###
### # Source SSH settings, if applicable
### if [ -f "${SSH_ENV}" ]; then
### . "${SSH_ENV}" > /dev/null
### ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
### start_agent;
### }
### else
### start_agent;
### fi
############################# #############################
@@ -82,22 +164,13 @@ shopt -s nocaseglob;
# Autocorrect typos in path names when using `cd` # Autocorrect typos in path names when using `cd`
shopt -s cdspell; shopt -s cdspell;
# Enable some Bash 4 features when possible:
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
# * Recursive globbing, e.g. `echo **/*.txt`
for option in autocd globstar; do
shopt -s "$option" 2> /dev/null;
done;
if [ -f /etc/bash_completion ]; then if [ -f /etc/bash_completion ]; then
source /etc/bash_completion; source /etc/bash_completion;
fi; fi;
if [[ "$HOSTNAME" == "bascom" ]]; then
# Enable tab completion for `g` by marking it as an alias for `git` # Enable tab completion for `g` by marking it as an alias for `git`
if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
complete -o default -o nospace -F _git g; complete -o default -o nospace -F _git g;
fi; fi;
fi
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;

View File

@@ -5,77 +5,30 @@
# Heavily inspired by @necolass prompt: https://github.com/necolas/dotfiles # Heavily inspired by @necolass prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then ######### This screws up scp
export TERM='gnome-256color'; #if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
elif infocmp xterm-256color >/dev/null 2>&1; then # export TERM='gnome-256color';
export TERM='xterm-256color'; #elif infocmp xterm-256color >/dev/null 2>&1; then
fi; # export TERM='xterm-256color';
#fi;
##prompt_git() { export TPUT="/usr/bin/tput"
## local s='';
## local branchName=''; if ${TPUT} setaf 1 &> /dev/null; then
## ${TPUT} sgr0; # reset colors
## # Check if the current directory is in a Git repository. bold=$(${TPUT} bold);
## if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then reset=$(${TPUT} sgr0);
##
## # check if the current directory is in .git before running git checks
## if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then
##
## # Ensure the index is up to date.
## git update-index --really-refresh -q &>/dev/null;
##
## # Check for uncommitted changes in the index.
## if ! $(git diff --quiet --ignore-submodules --cached); then
## s+='+';
## fi;
##
## # Check for unstaged changes.
## if ! $(git diff-files --quiet --ignore-submodules --); then
## s+='!';
## fi;
##
## # Check for untracked files.
## if [ -n "$(git ls-files --others --exclude-standard)" ]; then
## s+='?';
## fi;
##
## # Check for stashed files.
## if $(git rev-parse --verify refs/stash &>/dev/null); then
## s+='$';
## fi;
##
## fi;
##
## # Get the short symbolic ref.
## # If HEAD isnt a symbolic ref, get the short SHA for the latest commit
## # Otherwise, just give up.
## branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \
## git rev-parse --short HEAD 2> /dev/null || \
## echo '(unknown)')";
##
## [ -n "${s}" ] && s=" [${s}]";
##
## echo -e "${1}${branchName}${2}${s}";
## else
## return;
## fi;
##}
##
if tput setaf 1 &> /dev/null; then
tput sgr0; # reset colors
bold=$(tput bold);
reset=$(tput sgr0);
# Solarized colors, taken from http://git.io/solarized-colors. # Solarized colors, taken from http://git.io/solarized-colors.
black=$(tput setaf 0); black=$(${TPUT} setaf 0);
blue=$(tput setaf 33); blue=$(${TPUT} setaf 33);
cyan=$(tput setaf 37); cyan=$(${TPUT} setaf 37);
green=$(tput setaf 64); green=$(${TPUT} setaf 64);
orange=$(tput setaf 166); orange=$(${TPUT} setaf 166);
purple=$(tput setaf 125); purple=$(${TPUT} setaf 125);
red=$(tput setaf 124); red=$(${TPUT} setaf 124);
violet=$(tput setaf 61); violet=$(${TPUT} setaf 61);
white=$(tput setaf 15); white=$(${TPUT} setaf 15);
yellow=$(tput setaf 136); yellow=$(${TPUT} setaf 136);
else else
bold=''; bold='';
reset="\e[0m"; reset="\e[0m";
@@ -95,6 +48,8 @@ if [[ "${HOSTNAME}" == "maya" ]]; then
userStyle="${orange}" userStyle="${orange}"
elif [[ "${HOSTNAME}" == "cronus" ]]; then elif [[ "${HOSTNAME}" == "cronus" ]]; then
userStyle="${yellow}" userStyle="${yellow}"
elif [[ "${HOSTNAME}" == "aptos" ]]; then
userStyle="${blue}"
else else
userStyle="${green}" userStyle="${green}"
fi fi
@@ -118,8 +73,8 @@ PS1+="\[${userStyle}\]\u"; # username
PS1+="\[${white}\] on "; PS1+="\[${white}\] on ";
PS1+="\[${hostStyle}\]\h"; # host PS1+="\[${hostStyle}\]\h"; # host
PS1+="\[${white}\] at "; PS1+="\[${white}\] at ";
PS1+="[ \D{%Y-%m-%d} - \t ] in "; # date and time stamp PS1+="[ \D{%Y-%m-%d} - \t ] "; # date and time stamp
#PS1+="\[${green}\]\w"; # working directory full path PS1+="in ";
PS1+="\w"; # working directory full path PS1+="\w"; # working directory full path
PS1+="\n"; PS1+="\n";
PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color) PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color)

View File

@@ -1 +1,2 @@
[ -n "$PS1" ] && source ~/.bash_profile; #[ -n "$PS1" ] && source ~/.bash_profile;
source ~/.bash_profile

View File

@@ -5,11 +5,6 @@ function mkd() {
mkdir -p "$@" && cd "$_"; mkdir -p "$@" && cd "$_";
} }
# Change working directory to the top-most Finder window location
function cdf() { # short for `cdfinder`
cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
}
# Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression
function targz() { function targz() {
local tmpFile="${@%/}.tar"; local tmpFile="${@%/}.tar";
@@ -58,14 +53,6 @@ function fs() {
fi; fi;
} }
# Use Gits colored diff when available
hash git &>/dev/null;
if [ $? -eq 0 ]; then
function diff() {
git diff --no-index --color-words "$@";
}
fi;
# Create a data URL from a file # Create a data URL from a file
function dataurl() { function dataurl() {
local mimeType=$(file -b --mime-type "$1"); local mimeType=$(file -b --mime-type "$1");
@@ -84,15 +71,6 @@ function server() {
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"; python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port";
} }
# Start a PHP server from a directory, optionally specifying the port
# (Requires PHP 5.4.0+.)
function phpserver() {
local port="${1:-4000}";
local ip=$(ipconfig getifaddr en1);
sleep 1 && open "http://${ip}:${port}/" &
php -S "${ip}:${port}";
}
# Compare original and gzipped file size # Compare original and gzipped file size
function gz() { function gz() {
local origsize=$(wc -c < "$1"); local origsize=$(wc -c < "$1");
@@ -160,16 +138,6 @@ function getcertnames() {
fi; fi;
} }
# `s` with no arguments opens the current directory in Sublime Text, otherwise
# opens the given location
function s() {
if [ $# -eq 0 ]; then
subl .;
else
subl "$@";
fi;
}
# `v` with no arguments opens the current directory in Vim, otherwise opens the # `v` with no arguments opens the current directory in Vim, otherwise opens the
# given location # given location
function v() { function v() {

View File

@@ -1,6 +1,21 @@
######################
## see bottom for url shorthands,
## but worth mentioning here:
#
## replace any git@github stuff with gh:
## replace any ssh://git@g.... with cmr:
[commit]
gpgsign = true
[user] [user]
email = charlesreid1@gmail.com email = charlesreid1@gmail.com
name = Charles Reid name = Charles Reid
signingkey = 078B7759B68B353A # aptos
[includeIf "gitdir:~/codes/"]
path = .gitconfig_charlesreid1
[includeIf "gitdir:~/golly/"]
path = .gitconfig_ch4zm
[credential] [credential]
helper = cache helper = cache
[filter "media"] [filter "media"]
@@ -20,21 +35,71 @@
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
# typo stuff
co = checkout
cehckout = checkout
ceckout = checkout
chekout = checkout
commti = commit
comimt = commit
comit = commit
# https://victorzhou.com/blog/git-aliases/
a = add
cm = commit -m
rh = reset --hard
lo = log --oneline -n 10
lolo = log --oneline -n 50
# View abbreviated SHA, description, and history graph of the latest 20 commits # View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format # View the current working tree status: short format and long format
s = status -s s = status -s
ss = status
# Just print the name of the current branch
cb = branch --show-current
# Show branches
b = branch -v b = branch -v
bv = branch -v bv = branch -v
ba = branch -a bb = branch -v
ba = branch -a
bb = branch -v -a
# Show remotes
r = remote -v r = remote -v
rv = remote -v rv = remote -v
ra = remote -v
f = fetch --all
# Show log history of commits on this branch
# that are different from master
# (these aliases are useful for rebases)
#
# dm = *Different from *Master (log)
# https://stackoverflow.com/a/59273667/463213
dm = "log --boundary --right-only --graph --oneline master..HEAD"
# dms = *Different from *Master, *Status
dms = "diff --stat master..HEAD"
# dmf = *Different from *Master, *Files
dmf = "diff --name-only master..HEAD"
# show diff of staged changes
cdiff = diff --cached cdiff = diff --cached
cd = diff --cached
# Interactive rebase with the given number of latest commits
# reb N = interactive rebase with last N commits (inclusive)
reb = "!r() { git rebase -i HEAD~$1; }; r"
# continue the rebase
rebc = "rebase --continue"
# Show the diff between the latest commit and the current state # 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" d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
@@ -42,16 +107,25 @@
# `git di $number` shows the diff between the state `$number` revisions ago and the current state # `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" di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
p = "!f() { git pull $1 $2; }; f"
# Pull in remote changes for the current repository and all its submodules # Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master" pp = !"git pull; git submodule foreach git pull origin master"
# Clone a repository including all submodules # Clone a repository including all submodules
c = clone --recursive c = clone --recursive
# Amend the currently staged files to the latest commit
amend = commit --amend --reuse-message=HEAD
# Oops
fix = commit --amend --reuse-message=HEAD --edit
# Commit all changes # Commit all changes
ca = !git add -A && git commit -av ca = !git add -A && git commit -av
# Switch to a branch, creating it if necessary # Switch to a branch, creating it
# from the current branch if necessary
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Show verbose output about tags, branches or remotes # Show verbose output about tags, branches or remotes
@@ -62,29 +136,20 @@
# List aliases # List aliases
aliases = config --get-regexp alias aliases = config --get-regexp alias
# Amend the currently staged files to the latest commit
amend = commit --amend --reuse-message=HEAD
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Remove the old tag with this name and tag the latest commit with it. # Remove the old tag with this name and tag the latest commit with it.
retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
# Find branches containing commit ### # Find branches containing commit
fb = "!f() { git branch -a --contains $1; }; f" ### fb = "!f() { git branch -a --contains $1; }; f"
# Find tags containing commit ### # Find tags containing commit
ft = "!f() { git describe --always --contains $1; }; f" ### ft = "!f() { git describe --always --contains $1; }; f"
# Find commits by source code ### # 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" ### 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 ### # 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" ### fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
# List contributors with number of commits # List contributors with number of commits
contributors = shortlog --summary --numbered contributors = shortlog --summary --numbered
@@ -96,6 +161,8 @@
[core] [core]
editor = vim
# Use custom `.gitignore` and `.gitattributes` # Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes attributesfile = ~/.gitattributes
@@ -168,6 +235,12 @@
# URL shorthands # URL shorthands
[url "ssh://git@git.charlesreid1.com:222/"]
insteadOf = "cmr:"
[url "git@github.com:"] [url "git@github.com:"]
insteadOf = "gh:" insteadOf = "gh:"
@@ -187,3 +260,17 @@
[url "git://gist.github.com/"] [url "git://gist.github.com/"]
insteadOf = "gist:" insteadOf = "gist:"
[rerere]
enabled = true
autoupdate = true
[pull]
rebase = true
[init]
defaultBranch = main
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f

View File

@@ -1,81 +1,122 @@
################### ###################
# charles # charles
#
# Useful links:
# https://github.com/mathiasbynens/dotfiles/blob/master/.tmux.conf
# https://github.com/samoshkin/tmux-config/blob/master/tmux/tmux.conf
# https://github.com/tony/tmux-config/blob/master/scripts/resize-adaptable.sh
# https://stackoverflow.com/a/40009032
#
# Basic layout:
# - .tmux.conf contains tmux configuration variables
# - .tmux.sessionX contains tmux session setup (keyboard shortcut)
# - scripts/devtmux contains tmux session setup (named sessions)
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
set-option -g default-terminal screen-256color set-option -g default-terminal screen-256color
# Use C-t instead
set-option -g prefix C-t
unbind C-t
bind C-t send-prefix
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a # Set parent terminal title to reflect current window in tmux session
unbind-key C-a set -g set-titles on
bind-key C-a send-prefix set -g set-titles-string "#I:#W"
# Start indexing of windows at 1, not 0
set -g base-index 1 set -g base-index 1
setw -g pane-base-index 1
# Easy config reload # Easy config reload
unbind r unbind r
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." bind R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vi is good # vi is good
setw -g mode-keys vi setw -g mode-keys vi
bind-key : command-prompt bind : command-prompt
bind-key r refresh-client bind r refresh-client
bind-key L clear-history
bind-key space next-window bind space next-window
bind-key bspace previous-window bind bspace previous-window
bind-key enter next-layout bind enter next-layout
# use vim-like keys for splits and windows # use vim-like keys for splits and windows
bind-key v split-window -h -c "#{pane_current_path}" #
bind-key s split-window -v -c "#{pane_current_path}" # Control-T plus:
bind-key h select-pane -L #
bind-key j select-pane -D # s = horizontal split
bind-key k select-pane -U # v = vertical split
bind-key l select-pane -R # h = pick left pane
# j = pick down pane
# k = pick up pane
# l = pick right pane
#
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# smart pane switching with awareness of vim splits # smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L" # (these interfere with the often-used Control-L shortcut
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D" # to clear the screen, so that gets really annoying.)
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U" #
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R" # Control then:
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys 'C-\\') || tmux select-pane -l" #
bind C-l send-keys 'C-l' # h = pick left pane
# j = pick down pane
# k = pick up pane
# l = pick right pane
#
# bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D"
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U"
# bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R"
bind-key C-o rotate-window # Control-T then Control-O swaps out windows in their respective positions
bind C-o rotate-window
bind-key + select-layout main-horizontal # Control-T then + makes existing windows have vertical layout
bind-key = select-layout main-vertical bind + select-layout main-vertical
set-window-option -g other-pane-height 25
set-window-option -g other-pane-width 80
bind-key a last-pane # Control-T then = makes existing windows have horizontal layout
bind-key q display-panes bind = select-layout main-horizontal
bind-key c new-window
bind-key t next-window
bind-key T previous-window
bind-key [ copy-mode # Control-T Control-N makes a new window in the path of the current pane
bind-key ] paste-buffer bind C-n new-window -c '#{pane_current_path}'
## (no idea what this does)
#set-window-option -g other-pane-height 25
#set-window-option -g other-pane-width 80
# Control-T plus [ or ] moves into copy mode or paste mode
bind [ copy-mode
bind ] paste-buffer
# (no idea)
set-window-option -g display-panes-time 1500 set-window-option -g display-panes-time 1500
# Control-T plus | or _ splits panes vertically (|) or horizontally (_)
# (this is better than using percent, but now we've got muscle memory for %)
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
# because we were using this before
bind % split-window -h -c "#{pane_current_path}"
# Status Bar # Status Bar
set-option -g status-interval 1 set-option -g status-interval 1
set-option -g status-left '' set-option -g status-left ''
set-option -g status-right '%l:%M%p' set-option -g status-right '%l:%M%p'
set-window-option -g window-status-current-fg magenta
set-option -g status-fg default set-option -g status-fg default
# Status Bar solarized-dark (default) # Status Bar solarized-dark (default)
set-option -g status-bg black set-option -g status-bg black
set-option -g pane-active-border-fg black
set-option -g pane-border-fg black
# Status Bar solarized-light
if-shell "[ \"$COLORFGBG\" = \"11;15\" ]" "set-option -g status-bg white"
if-shell "[ \"$COLORFGBG\" = \"11;15\" ]" "set-option -g pane-active-border-fg white"
if-shell "[ \"$COLORFGBG\" = \"11;15\" ]" "set-option -g pane-border-fg white"
# Set window notifications # Set window notifications
setw -g monitor-activity on setw -g monitor-activity on
@@ -84,4 +125,10 @@ set -g visual-activity on
# Allow the arrow key to be used immediately after changing windows # Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0 set-option -g repeat-time 0
# Set up easy go-to sessions with shortcuts
bind s source-file ~/.tmux.session1
# When in copy mode, v starts a selection and y finishes it
#bind-key -T copy-mode-vi 'v' send -X begin-selection
#bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind-key -T copy-mode-vi 'y' send -X copy-pipe

5
.tmux.session1 Normal file
View File

@@ -0,0 +1,5 @@
# https://stackoverflow.com/a/5753059
new-session -A -s dev -n dev
send-keys 'vim' C-m
split-window -v -p 20
select-pane -t 1

55
.vim/colors/blue.vim Normal file
View File

@@ -0,0 +1,55 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Steven Vertigan <steven@vertigan.wattle.id.au>
" Last Change: 2006 Sep 23
" Revision #5: Switch main text from white to yellow for easier contrast,
" fixed some problems with terminal backgrounds.
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "blue"
hi Normal guifg=yellow guibg=darkBlue ctermfg=yellow ctermbg=darkBlue
hi NonText guifg=magenta ctermfg=lightMagenta
hi comment guifg=gray ctermfg=gray ctermbg=darkBlue gui=bold
hi constant guifg=cyan ctermfg=cyan
hi identifier guifg=gray ctermfg=red
hi statement guifg=white ctermfg=white ctermbg=darkBlue gui=none
hi preproc guifg=green ctermfg=green
hi type guifg=orange ctermfg=lightRed ctermbg=darkBlue
hi special guifg=magenta ctermfg=lightMagenta ctermbg=darkBlue
hi Underlined guifg=cyan ctermfg=cyan gui=underline cterm=underline
hi label guifg=yellow ctermfg=yellow
hi operator guifg=orange gui=bold ctermfg=lightRed ctermbg=darkBlue
hi ErrorMsg guifg=orange guibg=darkBlue ctermfg=lightRed
hi WarningMsg guifg=cyan guibg=darkBlue ctermfg=cyan gui=bold
hi ModeMsg guifg=yellow gui=NONE ctermfg=yellow
hi MoreMsg guifg=yellow gui=NONE ctermfg=yellow
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red
hi Todo guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
hi Cursor guifg=black guibg=white ctermfg=black ctermbg=white
hi Search guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
hi IncSearch guifg=black guibg=yellow ctermfg=black ctermbg=darkYellow
hi LineNr guifg=cyan ctermfg=cyan
hi title guifg=white gui=bold cterm=bold
hi StatusLineNC gui=NONE guifg=black guibg=blue ctermfg=black ctermbg=blue
hi StatusLine gui=bold guifg=cyan guibg=blue ctermfg=cyan ctermbg=blue
hi VertSplit gui=none guifg=blue guibg=blue ctermfg=blue ctermbg=blue
hi Visual term=reverse ctermfg=black ctermbg=darkCyan guifg=black guibg=darkCyan
hi DiffChange guibg=darkGreen guifg=black ctermbg=darkGreen ctermfg=black
hi DiffText guibg=olivedrab guifg=black ctermbg=lightGreen ctermfg=black
hi DiffAdd guibg=slateblue guifg=black ctermbg=blue ctermfg=black
hi DiffDelete guibg=coral guifg=black ctermbg=cyan ctermfg=black
hi Folded guibg=orange guifg=black ctermbg=yellow ctermfg=black
hi FoldColumn guibg=gray30 guifg=black ctermbg=gray ctermfg=black
hi cIf0 guifg=gray ctermfg=gray

66
.vim/colors/darkblue.vim Normal file
View File

@@ -0,0 +1,66 @@
" Vim color file
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua>
" Last Change: 2008 Jul 18
" darkblue -- for those who prefer dark background
" [note: looks bit uglier with come terminal palettes,
" but is fine on default linux console palette.]
set bg=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "darkblue"
hi Normal guifg=#c0c0c0 guibg=#000040 ctermfg=gray ctermbg=black
hi ErrorMsg guifg=#ffffff guibg=#287eff ctermfg=white ctermbg=lightblue
hi Visual guifg=#8080ff guibg=fg gui=reverse ctermfg=lightblue ctermbg=fg cterm=reverse
hi VisualNOS guifg=#8080ff guibg=fg gui=reverse,underline ctermfg=lightblue ctermbg=fg cterm=reverse,underline
hi Todo guifg=#d14a14 guibg=#1248d1 ctermfg=red ctermbg=darkblue
hi Search guifg=#90fff0 guibg=#2050d0 ctermfg=white ctermbg=darkblue cterm=underline term=underline
hi IncSearch guifg=#b0ffff guibg=#2050d0 ctermfg=darkblue ctermbg=gray
hi SpecialKey guifg=cyan ctermfg=darkcyan
hi Directory guifg=cyan ctermfg=cyan
hi Title guifg=magenta gui=none ctermfg=magenta cterm=bold
hi WarningMsg guifg=red ctermfg=red
hi WildMenu guifg=yellow guibg=black ctermfg=yellow ctermbg=black cterm=none term=none
hi ModeMsg guifg=#22cce2 ctermfg=lightblue
hi MoreMsg ctermfg=darkgreen ctermfg=darkgreen
hi Question guifg=green gui=none ctermfg=green cterm=none
hi NonText guifg=#0030ff ctermfg=darkblue
hi StatusLine guifg=blue guibg=darkgray gui=none ctermfg=blue ctermbg=gray term=none cterm=none
hi StatusLineNC guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=gray term=none cterm=none
hi VertSplit guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=gray term=none cterm=none
hi Folded guifg=#808080 guibg=#000040 ctermfg=darkgrey ctermbg=black cterm=bold term=bold
hi FoldColumn guifg=#808080 guibg=#000040 ctermfg=darkgrey ctermbg=black cterm=bold term=bold
hi LineNr guifg=#90f020 ctermfg=green cterm=none
hi DiffAdd guibg=darkblue ctermbg=darkblue term=none cterm=none
hi DiffChange guibg=darkmagenta ctermbg=magenta cterm=none
hi DiffDelete ctermfg=blue ctermbg=cyan gui=bold guifg=Blue guibg=DarkCyan
hi DiffText cterm=bold ctermbg=red gui=bold guibg=Red
hi Cursor guifg=black guibg=yellow ctermfg=black ctermbg=yellow
hi lCursor guifg=black guibg=white ctermfg=black ctermbg=white
hi Comment guifg=#80a0ff ctermfg=darkred
hi Constant ctermfg=magenta guifg=#ffa0a0 cterm=none
hi Special ctermfg=brown guifg=Orange cterm=none gui=none
hi Identifier ctermfg=cyan guifg=#40ffff cterm=none
hi Statement ctermfg=yellow cterm=none guifg=#ffff60 gui=none
hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none
hi type ctermfg=green guifg=#60ff60 gui=none cterm=none
hi Underlined cterm=underline term=underline
hi Ignore guifg=bg ctermfg=bg
" suggested by tigmoid, 2008 Jul 18
hi Pmenu guifg=#c0c0c0 guibg=#404080
hi PmenuSel guifg=#c0c0c0 guibg=#2050d0
hi PmenuSbar guifg=blue guibg=darkgray
hi PmenuThumb guifg=#c0c0c0

23
.vim/colors/default.vim Normal file
View File

@@ -0,0 +1,23 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 Jul 23
" This is the default color scheme. It doesn't define the Normal
" highlighting, it uses whatever the colors used to be.
" Set 'background' back to the default. The value can't always be estimated
" and is then guessed.
hi clear Normal
set bg&
" Remove all existing highlighting and set the defaults.
hi clear
" Load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif
let colors_name = "default"
" vim: sw=2

55
.vim/colors/delek.vim Normal file
View File

@@ -0,0 +1,55 @@
" Vim color file
" Maintainer: David Schweikert <david@schweikert.ch>
" Last Change: 2014 Mar 19
hi clear
let g:colors_name = "delek"
" Normal should come first
hi Normal guifg=Black guibg=White
hi Cursor guifg=bg guibg=fg
hi lCursor guifg=NONE guibg=Cyan
" Note: we never set 'term' because the defaults for B&W terminals are OK
hi DiffAdd ctermbg=LightBlue guibg=LightBlue
hi DiffChange ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi DiffText ctermbg=Red cterm=bold gui=bold guibg=Red
hi Directory ctermfg=DarkBlue guifg=Blue
hi ErrorMsg ctermfg=White ctermbg=DarkRed guibg=Red guifg=White
hi FoldColumn ctermfg=DarkBlue ctermbg=Grey guibg=Grey guifg=DarkBlue
hi Folded ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi IncSearch cterm=reverse gui=reverse
hi LineNr ctermfg=Brown guifg=Brown
hi ModeMsg cterm=bold gui=bold
hi MoreMsg ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi NonText ctermfg=Blue gui=bold guifg=gray guibg=white
hi Pmenu guibg=LightBlue
hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
hi Question ctermfg=DarkGreen gui=bold guifg=SeaGreen
if &background == "light"
hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE
else
hi Search ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
endif
hi SpecialKey ctermfg=DarkBlue guifg=Blue
hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue
hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
hi Title ctermfg=DarkMagenta gui=bold guifg=Magenta
hi VertSplit cterm=reverse gui=reverse
hi Visual ctermbg=NONE cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS cterm=underline,bold gui=underline,bold
hi WarningMsg ctermfg=DarkRed guifg=Red
hi WildMenu ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
" syntax highlighting
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
hi Constant cterm=NONE ctermfg=DarkGreen gui=NONE guifg=green3
hi Identifier cterm=NONE ctermfg=DarkCyan gui=NONE guifg=cyan4
hi PreProc cterm=NONE ctermfg=DarkMagenta gui=NONE guifg=magenta3
hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=deeppink
hi Statement cterm=bold ctermfg=Blue gui=bold guifg=blue
hi Type cterm=NONE ctermfg=Blue gui=bold guifg=blue
" vim: sw=2

108
.vim/colors/desert.vim Normal file
View File

@@ -0,0 +1,108 @@
" Vim color file
" Maintainer: Hans Fugal <hans@fugal.net>
" Last Change: $Date: 2004/06/13 19:30:30 $
" Last Change: $Date: 2004/06/13 19:30:30 $
" URL: http://hans.fugal.net/vim/colors/desert.vim
" Version: $Id: desert.vim,v 1.1 2004/06/13 19:30:30 vimboss Exp $
" cool help screens
" :he group-name
" :he highlight-groups
" :he cterm-colors
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="desert"
hi Normal guifg=White guibg=grey20
" highlight groups
hi Cursor guibg=khaki guifg=slategrey
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=grey30 guifg=gold
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guifg=slategrey guibg=khaki
"hi LineNr
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guifg=LightBlue guibg=grey30
hi Question guifg=springgreen
hi Search guibg=peru guifg=wheat
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=#c2bfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none
hi Title guifg=indianred
hi Visual gui=none guifg=khaki guibg=olivedrab
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
"hi Scrollbar
"hi Tooltip
" syntax highlighting groups
hi Comment guifg=SkyBlue
hi Constant guifg=#ffa0a0
hi Identifier guifg=palegreen
hi Statement guifg=khaki
hi PreProc guifg=indianred
hi Type guifg=darkkhaki
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2
" color terminal definitions
hi SpecialKey ctermfg=darkgreen
hi NonText cterm=bold ctermfg=darkblue
hi Directory ctermfg=darkcyan
hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
hi Search cterm=NONE ctermfg=grey ctermbg=blue
hi MoreMsg ctermfg=darkgreen
hi ModeMsg cterm=NONE ctermfg=brown
hi LineNr ctermfg=3
hi Question ctermfg=green
hi StatusLine cterm=bold,reverse
hi StatusLineNC cterm=reverse
hi VertSplit cterm=reverse
hi Title ctermfg=5
hi Visual cterm=reverse
hi VisualNOS cterm=bold,underline
hi WarningMsg ctermfg=1
hi WildMenu ctermfg=0 ctermbg=3
hi Folded ctermfg=darkgrey ctermbg=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
hi DiffAdd ctermbg=4
hi DiffChange ctermbg=5
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
hi DiffText cterm=bold ctermbg=1
hi Comment ctermfg=darkcyan
hi Constant ctermfg=brown
hi Special ctermfg=5
hi Identifier ctermfg=6
hi Statement ctermfg=3
hi PreProc ctermfg=5
hi Type ctermfg=2
hi Underlined cterm=underline ctermfg=5
hi Ignore cterm=bold ctermfg=7
hi Ignore ctermfg=darkgrey
hi Error cterm=bold ctermfg=7 ctermbg=1
"vim: sw=4

50
.vim/colors/elflord.vim Normal file
View File

@@ -0,0 +1,50 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "elflord"
hi Normal guifg=cyan guibg=black
hi Comment term=bold ctermfg=DarkCyan guifg=#80a0ff
hi Constant term=underline ctermfg=Magenta guifg=Magenta
hi Special term=bold ctermfg=DarkMagenta guifg=Red
hi Identifier term=underline cterm=bold ctermfg=Cyan guifg=#40ffff
hi Statement term=bold ctermfg=Yellow gui=bold guifg=#aa4444
hi PreProc term=underline ctermfg=LightBlue guifg=#ff80ff
hi Type term=underline ctermfg=LightGreen guifg=#60ff60 gui=bold
hi Function term=bold ctermfg=White guifg=White
hi Repeat term=underline ctermfg=White guifg=white
hi Operator ctermfg=Red guifg=Red
hi Ignore ctermfg=black guifg=bg
hi Error term=reverse ctermbg=Red ctermfg=White guibg=Red guifg=White
hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow
" Common groups that link to default highlighting.
" You can specify other highlighting easily.
hi link String Constant
hi link Character Constant
hi link Number Constant
hi link Boolean Constant
hi link Float Number
hi link Conditional Repeat
hi link Label Statement
hi link Keyword Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link Tag Special
hi link SpecialChar Special
hi link Delimiter Special
hi link SpecialComment Special
hi link Debug Special

56
.vim/colors/evening.vim Normal file
View File

@@ -0,0 +1,56 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Oct 10
" This color scheme uses a dark grey background.
" First remove all existing highlighting.
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "evening"
hi Normal ctermbg=DarkGrey ctermfg=White guifg=White guibg=grey20
" Groups used in the 'highlight' and 'guicursor' options default value.
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
hi IncSearch term=reverse cterm=reverse gui=reverse
hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse ctermbg=black guibg=grey60
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=Black
hi lCursor guibg=Cyan guifg=Black
hi Directory term=bold ctermfg=LightCyan guifg=Cyan
hi LineNr term=underline ctermfg=Yellow guifg=Yellow
hi MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen
hi NonText term=bold ctermfg=LightBlue gui=bold guifg=LightBlue guibg=grey30
hi Question term=standout ctermfg=LightGreen gui=bold guifg=Green
hi Search term=reverse ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi SpecialKey term=bold ctermfg=LightBlue guifg=Cyan
hi Title term=bold ctermfg=LightMagenta gui=bold guifg=Magenta
hi WarningMsg term=standout ctermfg=LightRed guifg=Red
hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi Folded term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi FoldColumn term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
hi DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue
hi DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan
hi CursorColumn term=reverse ctermbg=Black guibg=grey40
hi CursorLine term=underline cterm=underline guibg=grey40
" Groups for syntax highlighting
hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0
hi Special term=bold ctermfg=LightRed guifg=Orange
if &t_Co > 8
hi Statement term=bold cterm=bold ctermfg=Yellow guifg=#ffff60 gui=bold
endif
hi Ignore ctermfg=DarkGrey guifg=grey20
" vim: sw=2

40
.vim/colors/industry.vim Normal file
View File

@@ -0,0 +1,40 @@
" Vim color file
" Maintainer: Shian Lee
" Last Change: 2014 Mar 6 (for vim 7.4)
" Remark: "industry" stands for 'industrial' color scheme. In industrial
" HMI (Human-Machine-Interface) programming, using a standard color
" scheme is mandatory in many cases (in traffic-lights for example):
" LIGHT_RED is 'Warning'
" LIGHT_YELLOW is 'Attention'
" LIGHT_GREEN is 'Normal'
" LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW)
" LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN).
" BLACK is Dark-High-Contrast Background for maximum safety.
" BLUE is Shade of BLACK (not supposed to get attention).
"
" Industrial color scheme is by nature clear, safe and productive.
" Yet, depends on the file type's syntax, it might appear incorrect.
" Reset to dark background, then reset everything to defaults:
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "industry"
" First set Normal to regular white on black text colors:
hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black
" Syntax highlighting (other color-groups using default, see :help group-name):
hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa
hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff
hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff
hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00
hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff
hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00
hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00
hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000
hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00

73
.vim/colors/koehler.vim Normal file
View File

@@ -0,0 +1,73 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2016 Sep 04
hi clear
set background=dark
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "koehler"
hi Normal guifg=white guibg=black
hi Scrollbar guifg=darkcyan guibg=cyan
hi Menu guifg=black guibg=cyan
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=#cc0000
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=#cc0000
hi Directory term=bold cterm=bold ctermfg=brown guifg=#cc8000
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=red guifg=White guibg=Red
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
hi MoreMsg term=bold cterm=bold ctermfg=darkgreen gui=bold guifg=SeaGreen
hi ModeMsg term=bold cterm=bold gui=bold guifg=White guibg=Blue
hi LineNr term=underline cterm=bold ctermfg=darkcyan guifg=Yellow
hi Question term=standout cterm=bold ctermfg=darkgreen gui=bold guifg=Green
hi StatusLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi StatusLineNC term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
hi Title term=bold cterm=bold ctermfg=darkmagenta gui=bold guifg=Magenta
hi Visual term=reverse cterm=reverse gui=reverse
hi WarningMsg term=standout cterm=bold ctermfg=darkred guifg=Red
hi Cursor guifg=bg guibg=Green
hi Comment term=bold cterm=bold ctermfg=cyan guifg=#80a0ff
hi Constant term=underline cterm=bold ctermfg=magenta guifg=#ffa0a0
hi Special term=bold cterm=bold ctermfg=red guifg=Orange
hi Identifier term=underline ctermfg=brown guifg=#40ffff
hi Statement term=bold cterm=bold ctermfg=yellow gui=bold guifg=#ffff60
hi PreProc term=underline ctermfg=darkmagenta guifg=#ff80ff
hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#60ff60
hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black
hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow
hi CursorLine term=underline guibg=#555555 cterm=underline
hi CursorColumn term=underline guibg=#555555 cterm=underline
hi MatchParen term=reverse ctermfg=blue guibg=Blue
hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
hi Underlined term=underline cterm=bold,underline ctermfg=lightblue guifg=lightblue gui=bold,underline
hi Ignore ctermfg=black ctermbg=black guifg=black guibg=black
hi EndOfBuffer term=bold cterm=bold ctermfg=darkred guifg=#cc0000 gui=bold
hi link IncSearch Visual
hi link String Constant
hi link Character Constant
hi link Number Constant
hi link Boolean Constant
hi link Float Number
hi link Function Identifier
hi link Conditional Statement
hi link Repeat Statement
hi link Label Statement
hi link Operator Statement
hi link Keyword Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link Tag Special
hi link SpecialChar Special
hi link Delimiter Special
hi link SpecialComment Special
hi link Debug Special

56
.vim/colors/morning.vim Normal file
View File

@@ -0,0 +1,56 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Apr 15
" This color scheme uses a light grey background.
" First remove all existing highlighting.
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "morning"
hi Normal ctermfg=Black ctermbg=LightGrey guifg=Black guibg=grey90
" Groups used in the 'highlight' and 'guicursor' options default value.
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
hi IncSearch term=reverse cterm=reverse gui=reverse
hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse ctermbg=grey guibg=grey80
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=NONE
hi lCursor guibg=Cyan guifg=NONE
hi Directory term=bold ctermfg=DarkBlue guifg=Blue
hi LineNr term=underline ctermfg=Brown guifg=Brown
hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi NonText term=bold ctermfg=Blue gui=bold guifg=Blue guibg=grey80
hi Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE
hi SpecialKey term=bold ctermfg=DarkBlue guifg=Blue
hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta
hi WarningMsg term=standout ctermfg=DarkRed guifg=Red
hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue
hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi CursorLine term=underline cterm=underline guibg=grey80
hi CursorColumn term=reverse ctermbg=grey guibg=grey80
" Colors for syntax highlighting
hi Constant term=underline ctermfg=DarkRed guifg=Magenta guibg=grey95
hi Special term=bold ctermfg=DarkMagenta guifg=SlateBlue guibg=grey95
if &t_Co > 8
hi Statement term=bold cterm=bold ctermfg=Brown gui=bold guifg=Brown
endif
hi Ignore ctermfg=LightGrey guifg=grey90
" vim: sw=2

41
.vim/colors/murphy.vim Normal file
View File

@@ -0,0 +1,41 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02
hi clear
set background=dark
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "murphy"
hi Normal ctermbg=Black ctermfg=lightgreen guibg=Black guifg=lightgreen
hi Comment term=bold ctermfg=LightRed guifg=Orange
hi Constant term=underline ctermfg=LightGreen guifg=White gui=NONE
hi Identifier term=underline ctermfg=LightCyan guifg=#00ffff
hi Ignore ctermfg=black guifg=bg
hi PreProc term=underline ctermfg=LightBlue guifg=Wheat
hi Search term=reverse guifg=white guibg=Blue
hi Special term=bold ctermfg=LightRed guifg=magenta
hi Statement term=bold ctermfg=Yellow guifg=#ffff00 gui=NONE
hi Type ctermfg=LightGreen guifg=grey gui=none
hi Error term=reverse ctermbg=Red ctermfg=White guibg=Red guifg=White
hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow
" From the source:
hi Cursor guifg=Orchid guibg=fg
hi Directory term=bold ctermfg=LightCyan guifg=Cyan
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
hi IncSearch term=reverse cterm=reverse gui=reverse
hi LineNr term=underline ctermfg=Yellow guifg=Yellow
hi ModeMsg term=bold cterm=bold gui=bold
hi MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen
hi NonText term=bold ctermfg=Blue gui=bold guifg=Blue
hi Question term=standout ctermfg=LightGreen gui=bold guifg=Cyan
hi SpecialKey term=bold ctermfg=LightBlue guifg=Cyan
hi StatusLine term=reverse,bold cterm=reverse gui=NONE guifg=White guibg=darkblue
hi StatusLineNC term=reverse cterm=reverse gui=NONE guifg=white guibg=#333333
hi Title term=bold ctermfg=LightMagenta gui=bold guifg=Pink
hi WarningMsg term=standout ctermfg=LightRed guifg=Red
hi Visual term=reverse cterm=reverse gui=NONE guifg=white guibg=darkgreen

26
.vim/colors/pablo.vim Normal file
View File

@@ -0,0 +1,26 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02
hi clear
set background=dark
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "pablo"
highlight Comment ctermfg=8 guifg=#808080
highlight Constant ctermfg=14 cterm=none guifg=#00ffff gui=none
highlight Identifier ctermfg=6 guifg=#00c0c0
highlight Statement ctermfg=3 cterm=bold guifg=#c0c000 gui=bold
highlight PreProc ctermfg=10 guifg=#00ff00
highlight Type ctermfg=2 guifg=#00c000
highlight Special ctermfg=12 guifg=#0000ff
highlight Error ctermbg=9 guibg=#ff0000
highlight Todo ctermfg=4 ctermbg=3 guifg=#000080 guibg=#c0c000
highlight Directory ctermfg=2 guifg=#00c000
highlight StatusLine ctermfg=11 ctermbg=12 cterm=none guifg=#ffff00 guibg=#0000ff gui=none
highlight Normal guifg=#ffffff guibg=#000000
highlight Search ctermbg=3 guibg=#c0c000

60
.vim/colors/peachpuff.vim Normal file
View File

@@ -0,0 +1,60 @@
" Vim color file
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2003-04-23
" URL: http://trific.ath.cx/Ftp/vim/colors/peachpuff.vim
" This color scheme uses a peachpuff background (what you've expected when it's
" called peachpuff?).
"
" Note: Only GUI colors differ from default, on terminal it's just `light'.
" First remove all existing highlighting.
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "peachpuff"
hi Normal guibg=PeachPuff guifg=Black
hi SpecialKey term=bold ctermfg=4 guifg=Blue
hi NonText term=bold cterm=bold ctermfg=4 gui=bold guifg=Blue
hi Directory term=bold ctermfg=4 guifg=Blue
hi ErrorMsg term=standout cterm=bold ctermfg=7 ctermbg=1 gui=bold guifg=White guibg=Red
hi IncSearch term=reverse cterm=reverse gui=reverse
hi Search term=reverse ctermbg=3 guibg=Gold2
hi MoreMsg term=bold ctermfg=2 gui=bold guifg=SeaGreen
hi ModeMsg term=bold cterm=bold gui=bold
hi LineNr term=underline ctermfg=3 guifg=Red3
hi Question term=standout ctermfg=2 gui=bold guifg=SeaGreen
hi StatusLine term=bold,reverse cterm=bold,reverse gui=bold guifg=White guibg=Black
hi StatusLineNC term=reverse cterm=reverse gui=bold guifg=PeachPuff guibg=Gray45
hi VertSplit term=reverse cterm=reverse gui=bold guifg=White guibg=Gray45
hi Title term=bold ctermfg=5 gui=bold guifg=DeepPink3
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey80 guibg=fg
hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline
hi WarningMsg term=standout ctermfg=1 gui=bold guifg=Red
hi WildMenu term=standout ctermfg=0 ctermbg=3 guifg=Black guibg=Yellow
hi Folded term=standout ctermfg=4 ctermbg=7 guifg=Black guibg=#e3c1a5
hi FoldColumn term=standout ctermfg=4 ctermbg=7 guifg=DarkBlue guibg=Gray80
hi DiffAdd term=bold ctermbg=4 guibg=White
hi DiffChange term=bold ctermbg=5 guibg=#edb5cd
hi DiffDelete term=bold cterm=bold ctermfg=4 ctermbg=6 gui=bold guifg=LightBlue guibg=#f6e8d0
hi DiffText term=reverse cterm=bold ctermbg=1 gui=bold guibg=#ff8060
hi Cursor guifg=bg guibg=fg
hi lCursor guifg=bg guibg=fg
" Colors for syntax highlighting
hi Comment term=bold ctermfg=4 guifg=#406090
hi Constant term=underline ctermfg=1 guifg=#c00058
hi Special term=bold ctermfg=5 guifg=SlateBlue
hi Identifier term=underline ctermfg=6 guifg=DarkCyan
hi Statement term=bold ctermfg=3 gui=bold guifg=Brown
hi PreProc term=underline ctermfg=5 guifg=Magenta3
hi Type term=underline ctermfg=2 gui=bold guifg=SeaGreen
hi Ignore cterm=bold ctermfg=7 guifg=bg
hi Error term=reverse cterm=bold ctermfg=7 ctermbg=1 gui=bold guifg=White guibg=Red
hi Todo term=standout ctermfg=0 ctermbg=3 guifg=Blue guibg=Yellow

45
.vim/colors/ron.vim Normal file
View File

@@ -0,0 +1,45 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2013 May 24
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "ron"
hi Normal guifg=cyan guibg=black
hi NonText guifg=yellow guibg=#303030
hi comment guifg=green
hi constant guifg=cyan gui=bold
hi identifier guifg=cyan gui=NONE
hi statement guifg=lightblue gui=NONE
hi preproc guifg=Pink2
hi type guifg=seagreen gui=bold
hi special guifg=yellow
hi ErrorMsg guifg=Black guibg=Red
hi WarningMsg guifg=Black guibg=Green
hi Error guibg=Red
hi Todo guifg=Black guibg=orange
hi Cursor guibg=#60a060 guifg=#00ff00
hi Search guibg=darkgray guifg=black gui=bold
hi IncSearch gui=NONE guibg=steelblue
hi LineNr guifg=darkgrey
hi title guifg=darkgrey
hi ShowMarksHL ctermfg=cyan ctermbg=lightblue cterm=bold guifg=yellow guibg=black gui=bold
hi StatusLineNC gui=NONE guifg=lightblue guibg=darkblue
hi StatusLine gui=bold guifg=cyan guibg=blue
hi label guifg=gold2
hi operator guifg=orange
hi clear Visual
hi Visual term=reverse cterm=reverse gui=reverse
hi DiffChange guibg=darkgreen
hi DiffText guibg=olivedrab
hi DiffAdd guibg=slateblue
hi DiffDelete guibg=coral
hi Folded guibg=gray30
hi FoldColumn guibg=gray30 guifg=white
hi cIf0 guifg=gray
hi diffOnly guifg=red gui=bold

60
.vim/colors/shine.vim Normal file
View File

@@ -0,0 +1,60 @@
" Vim color file
" Maintainer: Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
" Last Change: 2001 May 25
" This look like normal text editor.
" This color scheme uses a light background.
" First remove all existing highlighting.
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "shine"
hi Normal ctermbg=White ctermfg=Black guifg=Black guibg=White
" Groups used in the 'highlight' and 'guicursor' options default value.
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
hi IncSearch term=reverse cterm=reverse gui=reverse
hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor ctermbg=Green guibg=Green guifg=Black
hi lCursor guibg=Cyan guifg=Black
hi Directory term=bold ctermfg=LightRed guifg=Red
hi LineNr term=underline ctermfg=Yellow guifg=Yellow
hi MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen
hi NonText term=bold ctermfg=LightBlue gui=bold guifg=LightBlue guibg=grey90
hi Question term=standout ctermfg=LightGreen gui=bold guifg=Green
hi Search term=reverse ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi SpecialKey term=bold ctermfg=LightBlue guifg=Blue
hi Title term=bold ctermfg=LightMagenta gui=bold guifg=Magenta
hi WarningMsg term=standout ctermfg=LightRed guifg=Red
hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi Folded term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi FoldColumn term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
hi DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue
hi DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan
hi Comment ctermfg=DarkGrey ctermbg=White guifg=DarkGrey gui=bold
hi SpecialChar ctermfg=DarkGrey ctermbg=White guifg=DarkGrey gui=bold
hi StorageClass ctermfg=Red ctermbg=White guifg=Red gui=bold
hi Number ctermfg=LightRed ctermbg=White guifg=LightRed gui=bold
" Groups for syntax highlighting
hi Constant term=underline ctermfg=Magenta guifg=#a07070 guibg=grey80
hi Special term=bold ctermfg=LightRed guifg=DarkOrange guibg=grey80
if &t_Co > 8
hi Statement term=bold cterm=bold ctermfg=DarkGreen ctermbg=White guifg=#ffff60 gui=bold
endif
hi Ignore ctermfg=LightGrey guifg=grey90
" vim: sw=2

56
.vim/colors/slate.vim Normal file
View File

@@ -0,0 +1,56 @@
"%% SiSU Vim color file
" Slate Maintainer: Ralph Amissah <ralph@amissah.com>
" (originally looked at desert Hans Fugal <hans@fugal.net> http://hans.fugal.net/vim/colors/desert.vim (2003/05/06)
:set background=dark
:highlight clear
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let colors_name = "slate"
:hi Normal guifg=White guibg=grey15
:hi Cursor guibg=khaki guifg=slategrey
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
:hi Folded guibg=black guifg=grey40 ctermfg=grey ctermbg=darkgrey
:hi FoldColumn guibg=black guifg=grey20 ctermfg=4 ctermbg=7
:hi IncSearch guifg=green guibg=black cterm=none ctermfg=yellow ctermbg=green
:hi ModeMsg guifg=goldenrod cterm=none ctermfg=brown
:hi MoreMsg guifg=SeaGreen ctermfg=darkgreen
:hi NonText guifg=RoyalBlue guibg=grey15 cterm=bold ctermfg=blue
:hi Question guifg=springgreen ctermfg=green
:hi Search guibg=peru guifg=wheat cterm=none ctermfg=grey ctermbg=blue
:hi SpecialKey guifg=yellowgreen ctermfg=darkgreen
:hi StatusLine guibg=#c2bfa5 guifg=black gui=none cterm=bold,reverse
:hi StatusLineNC guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
:hi Title guifg=gold gui=bold cterm=bold ctermfg=yellow
:hi Statement guifg=CornflowerBlue ctermfg=lightblue
:hi Visual gui=none guifg=khaki guibg=olivedrab cterm=reverse
:hi WarningMsg guifg=salmon ctermfg=1
:hi String guifg=SkyBlue ctermfg=darkcyan
:hi Comment term=bold ctermfg=11 guifg=grey40
:hi Constant guifg=#ffa0a0 ctermfg=brown
:hi Special guifg=darkkhaki ctermfg=brown
:hi Identifier guifg=salmon ctermfg=red
:hi Include guifg=red ctermfg=red
:hi PreProc guifg=red guibg=white ctermfg=red
:hi Operator guifg=Red ctermfg=Red
:hi Define guifg=gold gui=bold ctermfg=yellow
:hi Type guifg=CornflowerBlue ctermfg=2
:hi Function guifg=navajowhite ctermfg=brown
:hi Structure guifg=green ctermfg=green
:hi LineNr guifg=grey50 ctermfg=3
:hi Ignore guifg=grey40 cterm=bold ctermfg=7
:hi Todo guifg=orangered guibg=yellow2
:hi Directory ctermfg=darkcyan
:hi ErrorMsg cterm=bold guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
:hi VisualNOS cterm=bold,underline
:hi WildMenu ctermfg=0 ctermbg=3
:hi DiffAdd ctermbg=4
:hi DiffChange ctermbg=5
:hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
:hi DiffText cterm=bold ctermbg=1
:hi Underlined cterm=underline ctermfg=5
:hi Error guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
:hi SpellErrors guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1

1172
.vim/colors/solarized.vim Normal file

File diff suppressed because it is too large Load Diff

50
.vim/colors/torte.vim Normal file
View File

@@ -0,0 +1,50 @@
" Vim color file
" Maintainer: Thorsten Maerz <info@netztorte.de>
" Last Change: 2006 Dec 07
" grey on black
" optimized for TFT panels
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
"colorscheme default
let g:colors_name = "torte"
" hardcoded colors :
" GUI Comment : #80a0ff = Light blue
" GUI
highlight Normal guifg=Grey80 guibg=Black
highlight Search guifg=Black guibg=Red gui=bold
highlight Visual guifg=#404040 gui=bold
highlight Cursor guifg=Black guibg=Green gui=bold
highlight Special guifg=Orange
highlight Comment guifg=#80a0ff
highlight StatusLine guifg=blue guibg=white
highlight Statement guifg=Yellow gui=NONE
highlight Type gui=NONE
" Console
highlight Normal ctermfg=LightGrey ctermbg=Black
highlight Search ctermfg=Black ctermbg=Red cterm=NONE
highlight Visual cterm=reverse
highlight Cursor ctermfg=Black ctermbg=Green cterm=bold
highlight Special ctermfg=Brown
highlight Comment ctermfg=Blue
highlight StatusLine ctermfg=blue ctermbg=white
highlight Statement ctermfg=Yellow cterm=NONE
highlight Type cterm=NONE
" only for vim 5
if has("unix")
if v:version<600
highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE
highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold
highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE
highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE
endif
endif

54
.vim/colors/zellner.vim Normal file
View File

@@ -0,0 +1,54 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "zellner"
hi Comment term=bold ctermfg=Red guifg=Red
hi Normal guifg=black guibg=white
hi Constant term=underline ctermfg=Magenta guifg=Magenta
hi Special term=bold ctermfg=Magenta guifg=Magenta
hi Identifier term=underline ctermfg=Blue guifg=Blue
hi Statement term=bold ctermfg=DarkRed gui=NONE guifg=Brown
hi PreProc term=underline ctermfg=Magenta guifg=Purple
hi Type term=underline ctermfg=Blue gui=NONE guifg=Blue
hi Visual term=reverse ctermfg=Yellow ctermbg=Red gui=NONE guifg=Black guibg=Yellow
hi Search term=reverse ctermfg=Black ctermbg=Cyan gui=NONE guifg=Black guibg=Cyan
hi Tag term=bold ctermfg=DarkGreen guifg=DarkGreen
hi Error term=reverse ctermfg=15 ctermbg=9 guibg=Red guifg=White
hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow
hi StatusLine term=bold,reverse cterm=NONE ctermfg=Yellow ctermbg=DarkGray gui=NONE guifg=Yellow guibg=DarkGray
hi! link MoreMsg Comment
hi! link ErrorMsg Visual
hi! link WarningMsg ErrorMsg
hi! link Question Comment
hi link String Constant
hi link Character Constant
hi link Number Constant
hi link Boolean Constant
hi link Float Number
hi link Function Identifier
hi link Conditional Statement
hi link Repeat Statement
hi link Label Statement
hi link Operator Statement
hi link Keyword Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link SpecialChar Special
hi link Delimiter Special
hi link SpecialComment Special
hi link Debug Special

414
.vimrc
View File

@@ -4,49 +4,78 @@
set nocompatible " iMproved set nocompatible " iMproved
filetype off " required filetype off " required
filetype plugin indent on filetype plugin indent on
setlocal spell spelllang=en_us "setlocal spell spelllang=en_us
set nofoldenable " disable folding set nofoldenable " disable folding
" ----------------------------------
" Extremely Important Fix
" ----------------------------------
" Turn off Esc+O key sequences (eliminates one-second delay when pressing O): " Turn off Esc+O key sequences (eliminates one-second delay when pressing O):
" https://superuser.com/questions/161178/why-does-vim-delay-for-a-second-whenever-i-use-the-o-command-open-a-new-line#161216 " https://superuser.com/questions/161178/why-does-vim-delay-for-a-second-whenever-i-use-the-o-command-open-a-new-line#161216
" if this is re-enabled i may stab someone. " if this is re-enabled i may stab someone.
set noesckeys set noesckeys
set ttimeoutlen=5 set ttimeoutlen=5
" you have to do this a second time " now you have to do this a second time
" (after the above lines)
set nocompatible set nocompatible
" ------------------------
" Lazy stuffs
" -----------------------
" https://spf13.com/post/perfect-vimrc-vim-config-file/
"
" make ; work like : to save us from Shift
" nnoremap --> extra n means normal mode only,
" nore means no recursive
nnoremap ; :
"
"""" Remove trailing whitespaces and \^M chars
"""autocmd FileType c,cpp,java,php,js,python,twig,xml,yml autocmd
"""BufWritePre <buffer> :call
"""setline(1,map(getline(1,"$"),'substitute(v:val,"\\\\s\\\\+$","","")'))
" ----------------------------------------
" fix latex highlighting in markdown
" ----------------------------------------
function! MathAndLiquid()
"" Define certain regions
" Block math. Look for "$$[anything]$$"
syn region math start=/\$\$/ end=/\$\$/
" inline math. Look for "$[not $][anything]$"
syn match math_block '\$[^$].\{-}\$'
" Fenced code blocks, used in GitHub Flavored Markdown (GFM) " -----------------------------------
syn region highlight_block start='```' end='```' " TwiddleCase function
" -----------------------------------
"" Actually highlight those regions. " TwiddleCase cycles a visual selection through
hi link math Statement " lower case/UPPER CASE/Capital Case
hi link math_block Function "
hi link highlight_block Function " Originallly mapped to ~
" Switched to Control+P
" b/c it was not doing anything useful
function! TwiddleCase(str)
if a:str ==# toupper(a:str)
let result = tolower(a:str)
elseif a:str ==# tolower(a:str)
let result = substitute(a:str,'\(\<\w\+\>\)', '\u\1', 'g')
else
let result = toupper(a:str)
endif
return result
endfunction endfunction
"" Map twiddle to ~
" Call everytime we open a Markdown file "vnoremap ~ y:call setreg('', TwiddleCase(@"), getregtype(''))<CR>gv""Pgv
autocmd BufRead,BufNewFile,BufEnter *.md,*.markdown call MathAndLiquid() " Map twiddle to C-p
" (You have to have a visual selection first!!!)
" (This is complete black magic, no idea where this comes from)
vnoremap <C-p> y:call setreg('', TwiddleCase(@"), getregtype(''))<CR>gv""Pgv
" ----------------------------------------
" insert new line without leaving normal mode
" by literally typing ,o or ,O
" (this still sucks.)
" https://vi.stackexchange.com/a/3877
" ----------------------------------------
nnoremap <Leader>o o<Esc>
nnoremap <Leader>O O<Esc>
@@ -78,21 +107,12 @@ if has("autocmd")
\ exe "normal g`\"" | \ exe "normal g`\"" |
\ endif \ endif
endif " has("autocmd") endif " has("autocmd")
" in Python, don't move comment hashtag to first column.
" smartindent unnecessary for python anyway.
" http://stackoverflow.com/questions/2063175/vim-insert-mode-comments-go-to-start-of-line
au! FileType python setl nosmartindent
" allow visual mode to go to blank space at end of lines " allow visual mode to go to blank space at end of lines
set virtualedit=block set virtualedit=block
" put horz./vert. splits in the right place " put horz./vert. splits in the right place
set splitbelow set splitbelow
set splitright set splitright
" ------------------------
" End Vim Annoyances
" -----------------------
" ------------------------ " ------------------------
@@ -101,6 +121,7 @@ set splitright
" this turns on syntax highlighting " this turns on syntax highlighting
syntax on syntax on
set synmaxcol=200 " don't syntax highlight past this many chars
set ic set ic
" this highlights search items " this highlights search items
set hls set hls
@@ -120,34 +141,89 @@ set backspace=indent,eol,start
" murder that cursed blinking cursor " murder that cursed blinking cursor
let &guicursor = &guicursor . ",a:blinkon0" let &guicursor = &guicursor . ",a:blinkon0"
" ------------------------
" End For Sanity " --------------------------
" ----------------------- " Pathogen
" --------------------------
"
" to install vim pathogen plugin:
" mkdir -p ~/.vim/autoload ~/.vim/bundle && \
" curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
"
" now you need to "infect" yourself
" (questionable word choices...)
execute pathogen#infect()
" --------------------------
" Go settings
" --------------------------
"
" https://github.com/paulswanson/congo/blob/master/congo.sh
"
filetype indent plugin on
"set number
"set mouse=a
"
" to install vim-go plugin:
" git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go
"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_fmt_command = "goimports"
" ------------------------ " ------------------------
" Filetype Settings " Filetype Settings
" ----------------------- " -----------------------
" python
" ------------------------
" don't move comment hashtag to the first column.
" smartindent is unnecessary for python anyway.
" http://stackoverflow.com/questions/2063175/vim-insert-mode-comments-go-to-start-of-line
au! FileType python setl textwidth=0 nosmartindent
" golang
" see https://github.com/paulswanson/congo/blob/master/congo.sh
" ------------------------
au BufRead,BufNewFile *.go set textwidth=0 noexpandtab
" Makefiles " Makefiles
au BufRead,BufNewFile Makefile*,*.make,*.mk set noexpandtab " ------------------------
au BufRead,BufNewFile Makefile*,*.make,*.mk set textwidth=0 noexpandtab
" C++ " C++
au BufRead,BufNewFile *.cpp,*.cxx,*.cc,*.c,*.h,*.hpp,*.hxx,*.hh set tabstop=4 shiftwidth=4 softtabstop=4 nowrap " ------------------------
au BufRead,BufNewFile *.cpp,*.cxx,*.cc,*.c,*.h,*.hpp,*.hxx,*.hh set textwidth=0 tabstop=4 shiftwidth=4 softtabstop=4 nowrap
" shell scripts
" ------------------------
au BufRead,BufNewFile *.sh set textwidth=0 noexpandtab
" Snakemake files: Snakefile, .rule, .snake, .settings, .smk " Snakemake files: Snakefile, .rule, .snake, .settings, .smk
au BufNewFile,BufRead Snakefile set syntax=snakemake " ------------------------
au BufNewFile,BufRead *rule set syntax=snakemake au BufNewFile,BufRead set syntax=snakemake
au BufNewFile,BufRead *.snake set syntax=snakemake au BufNewFile,BufRead Snakefile*,*.rule,*.snake,*.smk set syntax=snakemake
au BufNewFile,BufRead *.settings set syntax=snakemake
au BufNewFile,BufRead *.smk set syntax=snakemake
" Yaml " Yaml
" ------------------------
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" don't autoindent yaml files
filetype plugin indent on
au filetype yaml call DisableIndentY()
function! DisableIndentY()
set autoindent&
set cindent&
set smartindent&
set indentexpr&
endfunction
" Javascript
" -------------------------
au BufRead,BufNewFile *.js,*.javascript set textwidth=0 tabstop=2 shiftwidth=2 softtabstop=2 nowrap
@@ -165,18 +241,18 @@ set nowrap
set tabstop=4 shiftwidth=4 expandtab set tabstop=4 shiftwidth=4 expandtab
set nosmartindent " die die die set nosmartindent " die die die
" color scheme stuff " set the text width at
"colorscheme desert
"colorscheme solarized
"
"
" 80 or 88, whatever " 80 or 88, whatever
set textwidth=80 set textwidth=115
" " IMPORTANT -
" if you're curious about the reasoning behind B950, " above directive will auto-wrap
" Bugbear's documentation explains it. The tl;dr is " your text as you type it, and may
" "it's like highway speed limits, we won't bother " end up driving you mad.
" you if you overdo it by a few km/h". " Set textwidth to 0 or a different number for known (code) filetypes.
" > Bugbear's documentation explains 88 vs 80:
" > "it's like highway speed limits, we won't bother
" > you if you overdo it by a few km/h".
" "
" Turn character 80/88 red " Turn character 80/88 red
" (for visibility conforming to " (for visibility conforming to
@@ -186,16 +262,6 @@ hi Bang ctermfg=red guifg=red
"match Bang /\%>87v.*\%<89v/ "match Bang /\%>87v.*\%<89v/
match Bang /\%>79v.*\%<81v/ match Bang /\%>79v.*\%<81v/
" ------------------------
" End Lines & Tabs
" ------------------------
" --------------------------- " ---------------------------
@@ -210,14 +276,11 @@ abbreviate recomend recommend
abbreviate slef self abbreviate slef self
abbreviate paramters parameters abbreviate paramters parameters
abbreviate exmaple example abbreviate exmaple example
abbreviate improt import
" ------------------------ abbreviate impot import
" End Lines & Tabs abbreviate imrpot import
" ----------------------- abbreviate surpress suppress
abbreviate supress suppress
@@ -234,11 +297,6 @@ endif
" Running command :CD will change to current file's directory " Running command :CD will change to current file's directory
com! CD cd %:p:h com! CD cd %:p:h
" ------------------------
" End Tab Wild Mode
" -----------------------
" ------------------------ " ------------------------
@@ -266,15 +324,6 @@ if has("user_commands")
command! -bang Qa qa<bang> command! -bang Qa qa<bang>
endif endif
" ------------------------
" End Fat Fingers
" -----------------------
" ------------------------ " ------------------------
@@ -291,11 +340,25 @@ function! DisableIndent()
set indentexpr& set indentexpr&
endfunction endfunction
" ------------------------ " fix latex highlighting in markdown
" End Markdown function! MathAndLiquid()
" ----------------------- "" Define certain regions
" Block math. Look for "$$[anything]$$"
syn region math start=/\$\$/ end=/\$\$/
" inline math. Look for "$[not $][anything]$"
syn match math_block '\$[^$].\{-}\$'
" Fenced code blocks, used in GitHub Flavored Markdown (GFM)
syn region highlight_block start='```' end='```'
"" Actually highlight those regions.
hi link math Statement
hi link math_block Function
hi link highlight_block Function
endfunction
" Call everytime we open a Markdown file
autocmd BufRead,BufNewFile,BufEnter *.md,*.markdown call MathAndLiquid()
@@ -309,19 +372,19 @@ if has("persistent_undo")
set undofile set undofile
endif endif
" ------------------------
" End Reddit
" -----------------------
" ------------------------ " ------------------------
" Github Maximum Awesome " Github Maximum Awesome
" ----------------------- " -----------------------
" "
" By default, <Leader> is \
" but that's hard to reach,
" and no one uses , anyway
let mapleader = ','
" now shortcuts are as easy as
" ,A ,B ,C
" Shift+Tab should de-indent " Shift+Tab should de-indent
" Control + D is de-indent " Control + D is de-indent
inoremap <S-Tab> <C-d> inoremap <S-Tab> <C-d>
@@ -333,8 +396,6 @@ set ruler " show where you ar
set showcmd set showcmd
set smartcase " case-sensitive search if any caps set smartcase " case-sensitive search if any caps
set wildignore=log/**,node_modules/**,target/**,tmp/**,*.pyc set wildignore=log/**,node_modules/**,target/**,tmp/**,*.pyc
" keyboard shortcuts
let mapleader = ','
noremap <C-h> <C-w>h noremap <C-h> <C-w>h
noremap <C-j> <C-w>j noremap <C-j> <C-w>j
noremap <C-k> <C-w>k noremap <C-k> <C-w>k
@@ -354,14 +415,6 @@ endif
" Don't copy the contents of an overwritten selection. " Don't copy the contents of an overwritten selection.
vnoremap p "_dP vnoremap p "_dP
" -----------------------------
" End Github Maximum Awesome
" -----------------------------
"
" ==================== " ====================
@@ -369,11 +422,6 @@ vnoremap p "_dP
" ==================== " ====================
" " (woah.) " " (woah.)
" Use the Solarized Dark theme
set background=dark
colorscheme solarized
let g:solarized_termtrans=1
" Enhance command-line completion " Enhance command-line completion
set wildmenu set wildmenu
" Allow backspace in insert mode " Allow backspace in insert mode
@@ -386,8 +434,7 @@ set ttyfast
"""""""""""""""""""""""" """"""""""""""""""""""""
" Dont add empty newlines at the end of files " Dont add empty newlines at the end of files
set noeol set noeol
" Centralize backups, swapfiles and undo history " Set swap file dir
set backupdir=~/.vim/backups
set directory=~/.vim/swap set directory=~/.vim/swap
if exists("&undodir") if exists("&undodir")
set undodir=~/.vim/undo set undodir=~/.vim/undo
@@ -402,8 +449,8 @@ set modelines=4
"""set secure """set secure
" Enable line numbers " Enable line numbers
set number set number
" Enable syntax highlighting """""""""""""" Enable syntax highlighting
syntax on """""""""""""syntax on
" Highlight current line " Highlight current line
set cursorline set cursorline
" Highlight searches " Highlight searches
@@ -431,23 +478,13 @@ set title
" Show the (partial) command as its being typed " Show the (partial) command as its being typed
set showcmd set showcmd
" Use relative line numbers " Use relative line numbers
if exists("&relativenumber") """ if exists("&relativenumber")
set relativenumber """ set relativenumber
au BufReadPost * set relativenumber """ au BufReadPost * set relativenumber
endif """ endif
" Start scrolling N lines before the horizontal window border " Start scrolling N lines before the horizontal window border
set scrolloff=5 set scrolloff=5
" Strip trailing whitespace (,ss)
function! StripWhitespace()
let save_cursor = getpos(".")
let old_query = getreg('/')
:%s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
" Save a file as root (,W)
noremap <leader>W :w !sudo tee % > /dev/null<CR>
" Automatic commands " Automatic commands
if has("autocmd") if has("autocmd")
" Enable file type detection " Enable file type detection
@@ -459,5 +496,116 @@ if has("autocmd")
endif endif
" Mark special characters " Mark special characters
"set listchars=nbsp:☠,tab:▸␣ "set listchars=nbsp:☠,tab:▸␣
set listchars=tab:▸␣ "set listchars=tab:▸␣
"set list "set list
" ---------------------------
" <leader> is set to , above
" and gives us a whole namespace
" of shortcuts to work with.
"
" Can map things to:
" - custom functions
" - system comands
" Show leader in bottom right
set showcmd
" Strip whitespace - trailing whitespace - with (,ss)
function! StripWhitespace()
let save_cursor = getpos(".")
let old_query = getreg('/')
:%s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfunction
noremap <Leader>ss :call StripWhitespace()<cr>
" Strip annoying windows newline characters ^M
function! StripWinLineBreaks()
let save_cursor = getpos(".")
let old_query = getreg('/')
:%s/
//g
call setpos('.', save_cursor)
call setreg('/', old_query)
endfunction
noremap <Leader>sn :call StripWinLineBreaks()<cr>
" Save a file as root (,W)
noremap <Leader>W :w !sudo tee % > /dev/null<cr>
" ----------------------------
" colorrrzzzzz
" ----------------------------
""" set background=dark
"""
""" set t_Co=256
"""
""" function! BgToggle()
""" if &background == "light"
""" execute ":set background=dark"
""" else
""" execute ":set background=light"
""" endif
""" endfunction
""" nnoremap <F5> :call BgToggle()<cr>
" more color schemes:
"colorscheme blue
"colorscheme darkblue
"colorscheme default
"colorscheme delek
"colorscheme desert " <-- old standby
"colorscheme elflord
"colorscheme evening
"colorscheme industry
"colorscheme koehler
"colorscheme macvim
"colorscheme morning
"colorscheme murphy
"colorscheme pablo
"colorscheme peachpuff " <-- not bad
"colorscheme ron
"colorscheme shine
"colorscheme slate
"colorscheme solarized
"colorscheme torte
"colorscheme zellner
" ------------------------
" Move Faster
" ------------------------
" (these MUST go at the end)
"
" default shift + j (combines lines)
" moves to shift + L
nnoremap <S-L> :join<CR>
" shift + j and shift + k
" move up and down n lines
map <S-j> 7j
map <S-k> 7k
" Bubble text up/down
" Single line:
nmap <C-k> ddkP
nmap <C-j> ddp
" Multiple lines:
vmap <C-k> xkP`[V`]
vmap <C-j> xp`[V`]
" -----------------------------
" Jedi Autocomplete Plugin
" -----------------------------
"let g:jedi#auto_initialization = 0
"" -----------------------
"" Black shortcut
"" -----------------------

View File

@@ -2,3 +2,74 @@
Repository containing dotfiles appropriate for use on Mac laptops. Repository containing dotfiles appropriate for use on Mac laptops.
# Quick Start
Before you begin, you should review all of the
steps in this quick start, so that you understand
what will happen when you run these scripts.
Otherwise, you may lose your dotfiles!
## Step 1: Pre-Bootstrap
Step 1: Run pre bootstrap script:
```
./pre_bootstrap.sh
```
This script does the following:
* Creates an SSH key
* Installs scripts to the `~/scripts` directory
* Installs vim plugins and creates the `~/.vim` directory structure
* Changes Mac settings and defaults
* Installs and configures python (we use [pyenv](https://github.com/pyenv/pyenv)
to install and manage multiple versions of Python
side-by-side)
* Installs Homebrew (the Mac package manager)
* Installs useful packages using Homebrew
* Sets bash as the default shell (happens after
the Homebrew version of bash has been installed)
It is recommended you review the settings that will
be changed on your Mac (`mac_settings.sh`) and the
software that will be installed (`brew_install.sh`)
before you run any scripts.
## Step 2: Bootstrap
The bootstrap script will do a diff between your
dotfiles and the new dotfiles, so you can see
all the changes that you will lose (in red) and
all of the new content (in green).
If there are many changes, do the diff manually by
running the script:
./diff_dotfiles.sh
Otherwise, run the bootstrap script, review the
changes, and type "y" or "yes":
./bootstrap.sh
Again, the bootstrap script will ask you for your
confirmation before overwriting your files,
but **you _will_ lose unsaved changes in your
existing dotfiles**!
# How Does This Repo Work?
This repository contains dotfiles in the top
level of the repository. These dotfiles are
installed using the `bootstrap.sh` script.
That's the main purpose of the repository.
But because there are a lot of supplementary
things to do when customizing a new or existing
Mac, we have the `pre_boostrap.sh` script to
perform those tasks.
We recommend you open the scripts and read them
to see what they do.

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
git pull origin master; git pull gh main;
function doIt() { function doIt() {
rsync \ rsync \
@@ -9,12 +9,16 @@ function doIt() {
--exclude ".DS_Store" \ --exclude ".DS_Store" \
--exclude "bootstrap.sh" \ --exclude "bootstrap.sh" \
--exclude "brew_install.sh" \ --exclude "brew_install.sh" \
--exclude "greenfield_codes.sh" \ --exclude "diff_dotfiles.sh" \
--exclude "go_install.sh" \
--exclude "go_setup.sh" \
--exclude "mac_settings.sh" \ --exclude "mac_settings.sh" \
--exclude "pre_bootstrap.sh" \ --exclude "pre_bootstrap.sh" \
--exclude "python_install.sh" \ --exclude "python_install.sh" \
--exclude "python_setup.sh" \ --exclude "python_setup.sh" \
--exclude "scripts_setup.sh" \
--exclude "set_machine_name.sh" \ --exclude "set_machine_name.sh" \
--exclude "vim_setup.sh" \
--exclude "README.md" \ --exclude "README.md" \
--exclude "LICENSE" \ --exclude "LICENSE" \
-avh --no-perms . ~; -avh --no-perms . ~;
@@ -24,6 +28,9 @@ function doIt() {
if [ "$1" == "--force" -o "$1" == "-f" ]; then if [ "$1" == "--force" -o "$1" == "-f" ]; then
doIt; doIt;
else else
./diff_dotfiles.sh
echo "The changes in RED will DISAPPEAR FOREVER FROM YOUR DOTFILES."
echo "The changes in GREEN will be ADDED TO YOUR DOTFILES."
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo ""; echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then

View File

@@ -2,6 +2,9 @@
# #
# Homebrew setup/install # Homebrew setup/install
sudo chown -R $(whoami) /usr/local/var/homebrew
sudo chmod -R g+rwx /usr/local
brew update brew update
# Install command-line tools using Homebrew. # Install command-line tools using Homebrew.
@@ -16,6 +19,10 @@ brew upgrade
# Dont forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. # Dont forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils brew install coreutils
# gettext, envsubst, and other utils
brew install gettext
brew link --force gettext
# Install some other useful utilities like `sponge`. # Install some other useful utilities like `sponge`.
brew install moreutils brew install moreutils
@@ -23,7 +30,7 @@ brew install moreutils
brew install findutils brew install findutils
# Install GNU `sed`, overwriting the built-in `sed`. # Install GNU `sed`, overwriting the built-in `sed`.
brew install gnu-sed --with-default-names brew install gnu-sed
# Install Bash 4. # Install Bash 4.
# Note: dont forget to add `/usr/local/bin/bash` to `/etc/shells` before # Note: dont forget to add `/usr/local/bin/bash` to `/etc/shells` before
@@ -37,18 +44,28 @@ if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then
chsh -s /usr/local/bin/bash; chsh -s /usr/local/bin/bash;
fi; fi;
# Install `wget` with IRI support. # Install wget
brew install wget --with-iri brew install wget
# Install GnuPG to enable PGP-signing commits. # Install GnuPG to enable PGP-signing commits.
brew install gnupg brew install gnupg
# Install joplin for note-taking
brew cask install joplin
# Install aws cli
brew install awscli
# Install more recent versions of some macOS tools. # Install more recent versions of some macOS tools.
brew install vim --with-override-system-vi brew install vim
brew install grep brew install grep
brew install openssh brew install openssh
brew install screen brew install screen
brew install homebrew/php/php56 --with-gmp brew install tmux
brew install most
# Install openjdk
brew cask install adoptopenjdk
# Install font tools. # Install font tools.
brew tap bramstein/webfonttools brew tap bramstein/webfonttools
@@ -87,7 +104,7 @@ brew install sqlmap
# Install other useful binaries. # Install other useful binaries.
brew install ack brew install ack
brew install git brew install git
brew install imagemagick --with-webp brew install imagemagick
brew install speedtest_cli brew install speedtest_cli
brew install tree brew install tree
@@ -107,6 +124,14 @@ brew install tree
#brew install webkit2png #brew install webkit2png
#brew install zopfli #brew install zopfli
# man pages SUUUUCK
brew install tldr
brew install cheat
# Install go stuff
brew install go
brew install goenv
# Remove outdated versions from the cellar. # Remove outdated versions from the cellar.
brew cleanup brew cleanup

15
diff_dotfiles.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
## The short version:
#find . -type f -maxdepth 1 -name ".*" | xargs -t -n1 -I% diff % ~/%
# The (more careful) loop version:
for file in $(find . -type f -maxdepth 1 -name ".*"); do
if [[ -f ~/$file ]]; then
echo "------------"
echo "$file exists in home directory, calculating diff..."
$(which git) diff --no-index --exit-code ~/$file $file && echo "No differences in $file!"
# order is important - home file first, shows changes to be deleted in red
fi
done

3
go_install.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
#
# install go packages

11
go_setup.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
brew install go
git clone https://github.com/syndbg/goenv.git ~/.goenv
VERSION="1.11.13"
#VERSION="1.12.9"
goenv install -s $VERSION
goenv global $VERSION

View File

@@ -1,20 +0,0 @@
#!/bin/bash
#
# Prepare a codes directory,
# or, whatever you want to call it
NAME="codes"
DIR="${HOME}/${NAME}"
# Make it
mkdir -p ${DIR}
cd ${DIR}
git clone --recursive https://charlesreid1.com:3000/charlesreid1/bot-master.git bots
git clone --recursive https://charlesreid1.com:3000/charlesreid1/charlesreid1-master.git charlesreid1
git clone --recursive https://charlesreid1.com:3000/cs/cs-master.git cs
git clone --recursive https://charlesreid1.com:3000/dotfiles/dotfiles-master.git dotfiles
git clone --recursive https://charlesreid1.com:3000/kali/kali-master.git kali
git clone --recursive https://charlesreid1.com:3000/charlesreid1/pelican-master.git pelican
git clone --recursive https://charlesreid1.com:3000/rpi/pi-master.git rpi

View File

@@ -599,53 +599,6 @@ defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true
# Only use UTF-8 in Terminal.app # Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4 defaults write com.apple.terminal StringEncodings -array 4
# Use a modified version of the Solarized Dark theme by default in Terminal.app
osascript <<EOD
tell application "Terminal"
local allOpenedWindows
local initialOpenedWindows
local windowID
set themeName to "Solarized Dark xterm-256color"
(* Store the IDs of all the open terminal windows. *)
set initialOpenedWindows to id of every window
(* Open the custom theme so that it gets added to the list
of available terminal themes (note: this will open two
additional terminal windows). *)
do shell script "open '$HOME/init/" & themeName & ".terminal'"
(* Wait a little bit to ensure that the custom theme is added. *)
delay 1
(* Set the custom theme as the default terminal theme. *)
set default settings to settings set themeName
(* Get the IDs of all the currently opened terminal windows. *)
set allOpenedWindows to id of every window
repeat with windowID in allOpenedWindows
(* Close the additional windows that were opened in order
to add the custom theme to the list of terminal themes. *)
if initialOpenedWindows does not contain windowID then
close (every window whose id is windowID)
(* Change the theme for the initial opened terminal windows
to remove the need to close them in order for the custom
theme to be applied. *)
else
set current settings of tabs of (every window whose id is windowID) to settings set themeName
end if
end repeat
end tell
EOD
# Enable “focus follows mouse” for Terminal.app and all X11 apps # Enable “focus follows mouse” for Terminal.app and all X11 apps
# i.e. hover over a window and start typing in it without clicking first # i.e. hover over a window and start typing in it without clicking first
#defaults write com.apple.terminal FocusFollowsMouse -bool true #defaults write com.apple.terminal FocusFollowsMouse -bool true
@@ -658,9 +611,6 @@ defaults write com.apple.terminal SecureKeyboardEntry -bool true
# Disable the annoying line marks # Disable the annoying line marks
defaults write com.apple.Terminal ShowLineMarks -int 0 defaults write com.apple.Terminal ShowLineMarks -int 0
# Install the Solarized Dark theme for iTerm
open "${HOME}/init/Solarized Dark.itermcolors"
# Dont display the annoying prompt when quitting iTerm # Dont display the annoying prompt when quitting iTerm
defaults write com.googlecode.iterm2 PromptOnQuit -bool false defaults write com.googlecode.iterm2 PromptOnQuit -bool false

View File

@@ -1,11 +1,53 @@
#!/bin/sh #!/bin/sh
# Actually make the swap directory vim is going to use echo "Type the email that you would like to associate with the SSH key, then press [ENTER]:"
mkdir -p ~/.vim/swap read SSH_EMAIL
mkdir -p ~/.vim/undo
# Change shell to homebrew bash echo "About to generate SSH keys"
sleep 2
if [ -f "$HOME/.ssh/id_rsa" ]; then
echo "Keys already exist"
else
yes | ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -C "${SSH_EMAIL}" -N ''
chmod 700 $HOME/.ssh
touch $HOME/.ssh/authorized_keys
chmod 600 $HOME/.ssh/authorized_keys
echo "Done generating keys"
fi
echo "About to set up scripts directory."
sleep 2
./scripts_setup.sh
echo "About to set up vim."
sleep 2
./vim_setup.sh
echo "About to change Mac settings"
sleep 2
./mac_settings.sh
echo "About to install and set up python"
sleep 2
./python_setup.sh
./python_install.sh
#echo "About to install and set up go"
#sleep 2
#./go_setup.sh
#./go_install.sh
echo "About to run brew installation script"
sleep 2
./brew_install.sh
echo "About to set shell to bash"
if [ -f "/usr/local/bin/bash" ]; then
BASH="/usr/local/bin/bash" BASH="/usr/local/bin/bash"
echo "About to set shell to ${BASH}" else
BASH="/bin/bash"
fi
echo "Found ${BASH}"
sleep 2
chsh -s ${BASH} chsh -s ${BASH}

View File

@@ -1,22 +1,17 @@
#!/bin/bash #!/bin/bash
#
# install python packages
if [ "$(id -u)" == "0" ]; then if [ "$(id -u)" == "0" ]; then
echo "DO NOT RUN THIS AS ROOT" 1>&2 echo "DO NOT RUN THIS AS ROOT" 1>&2
exit 1; exit 1;
fi fi
pip2 install -U --user numpy scipy pandas PKG="virtualenv boto3"
pip3 install -U --user numpy scipy pandas PKG="$PKG numpy scipy pandas"
PKG="$PKG matplotlib seaborn jupyter ipython"
PKG="$PKG tornado pyzmq pygments pillow pelican"
PKG="$PKG flake8 black yapf pep8ify"
pip2 install -U --user matplotlib seaborn pip3 install ${PKG}
pip3 install -U --user matplotlib seaborn
pip2 install -U --user jupyter ipython
pip3 install -U --user jupyter ipython
pip2 install -U --user tornado pyzmq pygments
pip3 install -U --user tornado pyzmq pygments
pip2 install -U --user pygments pillow pelican
pip3 install -U --user pygments pillow pelican

View File

@@ -1,4 +1,15 @@
#!/bin/bash #!/bin/bash
brew install python2 python3 brew install python3
rm -fr ${HOME}/.pyenv
curl https://pyenv.run | bash
PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
#VERSION="miniconda3-4.3.30"
VERSION="3.9.13"
pyenv install -s ${VERSION}
pyenv global ${VERSION}

26
scripts/devtmux Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
if [ -z "$TMUX" ] && [ ${UID} != 0 ]
then
# Adding -A and -s 'dev' means that
# we will try and reconnect to session
# named "dev" if it exists, and will
# only start a new "dev" session if
# an existing one is not found.
tmux new-session -A -s 'dev' \; \
send-keys 'vim' C-m \; \
\
split-window -v -p 20 \; \
\
select-pane -t 1 \;
## Example: ipython (80%) + top (20%)
#tmux new-session -A -s 'dev' \; \
# send-keys 'ipython' C-m \; \
# \
# split-window -v -p 20 \; \
# send-keys 'top' C-m \; \
# \
# select-pane -t 1 \;
fi

3
scripts_setup.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
ln -fs ${PWD}/scripts ${HOME}/scripts

View File

@@ -6,16 +6,25 @@
# #
# It will prompt you for the hostname you want to set. # It will prompt you for the hostname you want to set.
if [ "$(id -u)" != "0" ]; then
echo ""
echo ""
echo "This script should be run as root!"
echo ""
echo ""
exit 1;
fi
# darwin # darwin
echo "The current hostname is ${HOSTNAME}" echo "The current hostname is ${HOSTNAME}"
echo "Type the new hostname you want for your machine, then press [ENTER]:" echo "Type the new hostname you want for your machine, then press [ENTER]:"
read newhostname read newhostname
sudo scutil --set ComputerName "${newhostname}" scutil --set ComputerName "${newhostname}"
sudo scutil --set HostName "${newhostname}" scutil --set HostName "${newhostname}"
sudo scutil --set LocalHostName "${newhostname}" scutil --set LocalHostName "${newhostname}"
sudo echo "127.0.0.1 ${newhostname}" >> /etc/hosts echo "127.0.0.1 ${newhostname}" >> /etc/hosts
echo "The new hostname is ${newhostname}" echo "The new hostname is ${newhostname}"
echo "Try logging out and back in." echo "Try logging out and back in."

31
vim_setup.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
echo "Making vim undo and swap dirs"
mkdir -p ~/.vim/swap \
~/.vim/undo
echo "Installing solarized color scheme ..."
mkdir -p ~/.vim/colors \
&& cp .vim/colors/* ~/.vim/colors/.
echo "Installing vim-pathogen ..."
mkdir -p \
~/.vim/autoload \
~/.vim/bundle \
&& curl -LSso \
~/.vim/autoload/pathogen.vim \
https://tpo.pe/pathogen.vim
echo "Installing vim-go ..."
git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go || echo "Existing vim-go folder already found, skipping this step ..."
echo "Installing black for vim..."
mkdir -p \
~/.vim/plugin \
&& curl -LSso \
~/.vim/plugin/black.vim \
https://raw.githubusercontent.com/psf/black/master/plugin/black.vim
echo "Installing jedi autocomplete for vim..."
git clone --recursive https://github.com/davidhalter/jedi-vim.git ~/.vim/bundle/jedi-vim || echo "Existing jedi-vim folder already found, skipping this step..."