Giter VIP home page Giter VIP logo

keymaps_and_settings's Introduction

Atom Settings (and some extra aliases)

This is a list of all the atom settings/packages that I use & strongly recommend. The atom settings file is very self-explanatory, so the below is all about the aliases. Read the below if you want some mad terminal shortcuts.

Aliases for the shortcut addict

Aliases: what are they?

On the App Academy computers, running dt in terminal will bring you to the desktop. This is because dt is an alias for cd ~/Desktop. Aliases map commands to shortcuts. I included a list of aliases that I use on a regular basis (in the context of App Academy work).

Aliases: initial setup

As part of the App Academy initial setup, you were probably instructed to do a few things in your native directory that you might not recall.

Run atom ~/.bash_profile to open the bash profile. You should see something like this.

# Do not place configuration here.
#
# Because .bash_profile has precedence over .bashrc in Apple computers,
# this file is necessary to guard against creating a .bash_profile and
# accidentally overrideing all of the configuration in .bashrc
#
# All it should do is load .bashrc
###

# NB: save all aliases in .aliases!

source "$HOME/.bashrc"

(Just to show how this is all linked:) When you run atom ~/.bashrc, you should see on lines 29/30:

# load aliases
[[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases"

The ~/.aliases is where all the aliases will live. Paste the contents of the aliases file into there.

An explanation of the aliases

Editing aliases

alias nb="atom ~/.aliases"
alias sb="source ~/.bash_profile"

This is for when you want to make your own aliases OR look back at what aliases you have. nb ('nano bash') or sb ('source bash') will open and reload the aliases file, respectively. You will no longer need to use atom ~/.aliases to access the aliases. Note that you need to source (reload) the bash profile in every terminal tab that is already open (but it will obviously apply to all future tabs)

Special Notes on Aliases

alias rm="rmtrash"

The native rm command will non-recursively delete an item without sending it to trash, and rm -rf will forcibly & recursively delete a folder (recipe for disaster). Installing rmtrash will allow you to recursively move an item or a folder to the trash bin, a much safer way to delete things. (No need to use the -rf flag with rmtrash!). I have an alias mapping rm to rmtrash to overwrite the native rm command. To use this particular alias, you have to install rmtrash.

Run brew install rmtrash. If this doesn't work after two tries, check the rmtrash docs. (Also ensure that you have homebrew installed).

#KILL SERVER
alias rk="kill -9 $(lsof -i tcp:3000 -t)"

In the rare event that the server is disconnected improperly and I get a "something is already running on :3000" error when I rails s, I have to run this to fix it. Sometimes, the alias itself doesn't work but copy-pasting this code into terminal works. Weird stuff.

Making a commit is as simple as chaining gs-ga.-gs-gcm "message"-gp.

The author alias is a shortcut for fixing the authorship history of a git. Replace my name and email with your name and emails. Or you could make me the author of your repos, that's fine too.

keymaps_and_settings's People

Contributors

hanhee-song avatar

Stargazers

Taegook Song avatar Jake Brady avatar David Veytsman avatar

Watchers

James Cloos avatar

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.