Skip to content

Editor and Local Machine

Root-ish edited this page Jun 25, 2019 · 2 revisions

Editor

I use Atom the “hackable” editor, I tried a few different editors but Atom was the one that struck. I find the plugins and customisability very neat and the visual integration Github extremely useful. Atom is an open source editor GitHub - atom/atom: The hackable text editor It’s made in Electron by the guys form Github. ( hence the excellent Github integration )

In Atom I installed a few plugins :

  • Atom-beautify ( Adds beautifier for JS, HTML and CSS. I use this for quickly making code beautiful. )
  • File-icons ( Adds funny file icons in the file panel, I like to see the visual differences in files, instead of file extensions. )
  • Highlight-selected ( Highlights the current word selected, very useful for a quick overview in JavaScript code. )
  • Language-ejs ( Adds a different support for EJS files, I'm learning React and it was recommended I to install. )
  • Platformio-ide-terminal ( Adds a terminal to Atom, This is very useful as I no longer have to switch between the terminal and Atom. )

The linter plugins :

  • Intentions
  • Linter
  • Linter-eslint
  • Linter-ui-default

And I also changed the theme and syntax colours :

  • Atom-material-syntax
  • Atom-material-ui

In Atom you have custom keybindings. I added one I thought would be useful :

  • shift-cmd-L => atom-beautify:beautify-editor

Bash profile

I previously configured the bash profile to show the current directory followed by the hostname and a fox emoji 🦊 I had a welcoming message for a while as well : echo “Welcome Root your IP adres is : $(curl ipinfo.io/ip)” But I don’t find welcome messages very useful so I removed it. When I was working on the project I discovered I could configure this a little bit more useful. So reconfigured the Bash profile to show the current directory and the GitHub branch. For instance project-tech-team (development) My .bash_profile looks like :

#=========
# Aliases 
#=========

alias ..="cd .."
alias coffee="caffeinate"
alias dev="npm run dev"

#=========
#   Git
#=========

parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

#=========
#   PS1   
#=========

PS1="\W \[\e[32m\]\$(parse_git_branch)\[\e[00m\] " 

I used BASH Shell Change The Color of Shell Prompt on Linux or UNIX - nixCraft as a resource.

Clone this wiki locally