Compare commits

...

6 Commits

Author SHA1 Message Date
Joe 7fd8f90215 Add reference to simple bash prompt project 2021-05-21 17:57:51 -05:00
Joe 20b7e8e9bf Add .vimrc 2021-05-21 15:39:13 -05:00
Joe 44dd4e3f8e Add .functions 2021-05-21 15:38:37 -05:00
Joe bf99173940 Add .exports 2021-05-21 15:26:33 -05:00
Joe fd145831a6 Add sources to README 2021-05-21 15:23:28 -05:00
Joe 2538629b9e Clean up .bashrc 2021-05-21 15:21:40 -05:00
6 changed files with 57 additions and 9 deletions

View File

@ -1,7 +1,3 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
@ -23,10 +19,6 @@ HISTFILESIZE=2000
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

2
.exports Normal file
View File

@ -0,0 +1,2 @@
export EDITOR="vim"

13
.functions Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
function ssh_setup {
mkdir -p ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/config
chmod 600 ~/.ssh/config
}
function ssh_key {
ssh-keygen -t ed25519 -C "${1?"Usage: $0 EMAIL"}"
}

4
.gitignore vendored
View File

@ -3,5 +3,9 @@
!README.md
!.gitignore
!.aliases
!.exports
!.functions
!.vimrc
!.bashrc

30
.vimrc Normal file
View File

@ -0,0 +1,30 @@
set nocompatible
filetype plugin indent on
set nofoldenable
set foldmethod=syntax
set foldnestmax=1
au FileType sh let g:sh_fold_enabled=1
au FileType sh let g:is_bash=1
au FileType sh set foldmethod=syntax
syntax on
set number " Show line numbers
set showmatch " Highlight matching brace
set visualbell " Use visual bell (no beeping)
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
"set shiftwidth=4 " Number of auto-indent spaces
"set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=4 " Number of spaces per Tab
set ruler " Show row and column ruler information
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour

View File

@ -1,6 +1,6 @@
# Home directory
Initialize
# Setup
* Clone this repo `git clone --bare [repo-url] ~/.dotfiles`
* Checkout files into home dir `git checkout --repo "$HOME/.dotfiles" --workdir "$HOME" .`
* `soruce .bashrc`
@ -9,4 +9,11 @@ Initialize
* Use `dotfiles` git alias to interact with dotfiles repo. E.g. `dotfiles status`
* Add files you want to track as exceptions to `.gitignore` (or `dotfiles add --force`)
# See also
https://github.com/kalkayan/dotfiles / https://news.ycombinator.com/item?id=27134249
https://github.com/nickjj/dotfiles
https://github.com/brujoand/sbp