GithubHelp home page GithubHelp logo

gabebw / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
229.0 22.0 23.0 6.28 MB

:tulip:

Home Page: https://gabebw.com

Shell 27.86% Ruby 5.60% Python 0.22% Elixir 0.03% JavaScript 2.73% Vim Script 63.56%
zsh dotfiles rcm shell ruby homebrew vim rust

dotfiles's Introduction

dotfiles

Gabriel Berke-Williams' dotfiles for Fish, ruby, git, and more.

They assume you're using OSX.

Questions? Comments? Open an issue!

Installation

$ git clone https://github.com/gabebw/dotfiles.git ~/.dotfiles
$ cd ~/.dotfiles
$ ./install.sh

It will install rcm and use that to safely symlink the dotfiles, prompting you if a file already exists.

Organization

rcm will symlink all files into place, keeping the folder structure relative to the tag root. However, non-configuration files and folders like system/, Brewfile, README.md, etc will not be linked because they are in the EXCLUDES section of the rcrc file.

Tags

rcm has the concept of tags: items under tag-git/ are in the git tag, and so on. I'm using it for organization.

Fish

All of the Fish configuration is in config/fish.

Attribution

Many scripts and configurations have been inspired by or outright stolen from my colleagues at thoughtbot. Of special note, I've stolen many things from Chris Toomey, Gordon Fontenot, and Teo Ljungberg, among others that I'm sure I'm forgetting.

dotfiles's People

Contributors

gabebw avatar jjb avatar smharley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotfiles's Issues

Rewrite `icopy` and `upload-image` in Ruby

  • The whole thing is a complex house of cards
  • Sometimes it doesn't rm the image it downloaded, leaving behind icopy-1314.image, and I don't know why because it's a complex house of cards

.curlrc breaks vagrant

Hi, nice dotfiles but maybe you can add a comment line in the .curlrc file that the user-agent line will break vagrant (https://www.vagrantup.com/), took me some time to discover this file (that looked very handy) was the problem.

Vagrant downloads boxes metadata with curl and uses a custom user-agent, else it doesn't return json but text/html and then you get some strange error's :( Will also create an issue for vagrant so they can handle the error a bit better.

vim-lastplace isn't working

Doesn't work for:

  • vim ~/.vimrc
  • vim + <Leader>ev
  • vim Gemfile

Seems to be somehow totally broken? Must be some weird plugin interaction.

Switch to asdf version manager?

I only manage Ruby versions right now, and rbenv is great for that. But if I need lots of different versions of Elixir, Haskell, etc in the future, I may want to try asdf.

"Nested session error" (with reproduction instructions!)

Using my t script:

  • From the terminal, run just t to open a new session. Let's call this session one.
  • Inside one, run t and select a directory. Now you're in two.
  • Inside two, run t and select one. Now you get an error:

sessions should be nested with care, unset $TMUX to force

Something must be going wrong when connecting to existing sessions, because t works fine if there isn't a session already with the name you're connecting to.

FZF's Ag with preview window?

If I learn how to page through these results without filtering (Is this built-in? Do I need to add something to fzf-action or something) then it might 100% replace my workflow of paging through results just to see what's there.

Fix `t`

Right now, t does a lot of junk.

I think my ideal is:

  • t metis starts a session called metis, or attaches to existing metis session
  • t by itself starts a new, unnamed tmux session (Or require an argument?)

Then, just use j to navigate once the session is open. This will rip out a lot of complicated logic, which is good.

Tmux starting function should parse a project specific config file

This isn't actually an issue with your dotfiles, I just wanted to share an idea (and also have you tell me if something already does this). I have a few projects where my tmux setup involves project specific windows (an ngrok window for example). It would be great to include a file in the project's root directory like:

code: vim
server: foreman start
console: rails c
ngrok: ngrok http 3000

and have the script parse it as:

  1. Each line is a new window
  2. Key is the name of the window
  3. Value is the command to run in that window on startup

Does something already do this? If not, is it a terrible idea?

Make GitHub-aware `gx`?

It'd be cool for gx to go to the GitHub project in Plug 'junegunn/vim-plug'. Shouldn't be TOO hard with a function that gets items within surrounding single or double quotes.

As a reminder, the default gx behavior (which should be the fallback in this function):

:map gx
v  gx            <Plug>NetrwBrowseXVis                                                                                                                                                                                                                                                                                       
n  gx            <Plug>NetrwBrowseX      

Which you can mimic with (straight from :e $VIM/vim80/plugin/netrwPlugin.vim):

nmap <unique> gx <Plug>NetrwBrowseX
vmap <unique> gx <Plug>NetrwBrowseXVis

Add a Vim snippets plugin

Vimcasts has some content on Ultisnips, but UltiSnipsEdit only detect filetype sometimes, I think.

How about snipmate?

Enable every single possible language inside fenced Markdown blocks

I have this, but keep having to add languages to it:

" Syntax-highlight languages inside fenced markdown blocks
let g:markdown_fenced_languages = [
      \ 'ruby',
      \ 'sh',
      \ 'javascript',
      \ 'lisp',
      \ 'scheme',
      \ 'haskell',
      \ 'vim',
      \ 'html',
      \ 'sql',
      \ 'diff',
      \ 'scss'
      \ ]

It'd be really great if I could do something like this instead:

let g:markdown_fenced_languages = g:all_known_languages
" or
" let g:markdown_fenced_languages = s:all_known_languages()

Automatically add PULL_REQUEST_TEMPLATE under commit message

PULL_REQUEST_TEMPLATE is a special file that GitHub uses to pre-fill the commit message description. It'd be cool if git pr automatically added it (if it exists).

Bonus for Hired specifically - add the commit message description in the appropriate place.

Auto-pbcopy pull request URL with `hub pull-request`

hub pull-request pops open Vim, prints out some debugging git output, then prints the GitHub PR URL. I want to copy that URL.

hub pull-request | pbcopy doesn't work, because Vim really doesn't like being piped to another process.

One idea:

$ vim /tmp/commitmsg && hub pull-request -m $(cat /tmp/commitmsg) | pbcopy
$ rm /tmp/commitmsg

Wrinkle:

hub pull-request shows a helpful commit message template that includes commit messages since master. I'd like to keep that. It uses this code to do that.

According to the git.Log() code, this should replicate that template:

git log --format="%h (%aN, %ar)%n%w(78,3,3)%s%n%+b" | sed 's/^/# /'

Please help: why is `gc` autocompletion failing?

$ gc <TAB>
zsh:12: command not found: __git-checkout_main

I have the following lines in my zshrc, and they've been working for a while:

# Complete `g` like `git`, etc
alias __git-checkout_main=_git_checkout
compdef g=git
compdef _git gc=git-checkout
compdef _git ga=git-add

g checkout does not error, so compdef g=_git seems to be working, and ga seems to autocomplete correctly. Removing the alias line doesn't help.


Versions

Zsh: zsh 5.4.1 (x86_64-apple-darwin16.7.0)
Git: 2.14.1

Improve git-create-pull-request for Hired

  • Insert first commit's subject at the very top (send it to the file before sending the PR template)
  • Don't show commit hash
  • Put commits 2 through N right below first line of PR template, not at end of file (currently only does this when there's 1 commit)
  • Replace ## Markdown headers with ------underlined headers
  • Change paragraphs in git commit bodies to be all one line (might need to process subject and bodies separately, but might not if I only change single line breaks since the subject is only one line). Helpful links: link, reflow

Add `f` alias to automatically choose a good port for foreman

Maybe it uses forego instead? Anyway:

  • If there's a .foreman, try that port
  • If there isn't, see if 4/5/6/7/8/9000 are available, then fail if none of them are. Possibly, just do foreman || foreman -p 4000 || foreman -p 5000 || foreman -p 6000 || foreman -p 7000 || ....

List of open ports:

lsof -iTCP -sTCP:LISTEN -n -P -F n | egrep '^n' | sed -E -e 's/^n//' -e 's/^.*:([0-9]+)$/\1/' | sort | uniq | sort -n

git-prompt

Copy this file from Homebrew-installed git into your dotfiles (it changes infrequently): https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh

Then use it:

source ~/.dotfiles/git/prompt.sh

GIT_PS1_DESCRIBE_STYLE=branch
GIT_PS1_SHOWUPSTREAM="auto git"
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWSTASHSTATE=1
precmd () {
  if git rev-parse --git-dir > /dev/null 2>&1; then
    psvar[1]=$(basename `pwd`)
  else
    psvar[1]=`pwd`
  fi
  __git_ps1 "%v" " ❯ " "(%s)"
}

Consolidate all prompt info into prompt.zsh

So colors, vcs_info, all in a neat package that can be shared with others.

Note that moving autoload -Uz colors && colors into prompt.zsh makes vcs_info uncolored since it uses fg[color], so I need to move it all at once or load colors.zsh before vcs.zsh.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.