Unix is my IDE
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Unix is my IDE






Total Views
Views on SlideShare
Embed Views



5 Embeds 95

http://speakerrate.com 63
http://lanyrd.com 25
http://www.onlydoo.com 4
http://storycam.dev 2
https://si0.twimg.com 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Unix is my IDE Presentation Transcript

  • 1. Unix is my IDETomáš Kramár, @tkramar
  • 2. Integrated DevelopmentEnvironmentThe primary rationale for using an IDEis that it gathers all your tools in thesame place, and you can use them inconcert with roughly the same userinterface paradigm, and withouthaving to exert too much effort to makeseparate applications cooperate.
  • 3. Using UNIX as IDE● Shell tips● ZSH● Moving around● Terminal multiplexor● Composing commands● Customizing applications
  • 4. Shell tips
  • 5. #1 I need to run a longcommand I ran previouslyWrong:● lookup the parameters and type it all again● <up> <up> <up> ....● grep .bash_historyGood:● <c-r>, start typing, <c-r> to scroll results
  • 6. #2 Oops, I made a typoWrong● <left> <left> <backspace> <backspace> ....Good● <c-u> - deletes from cursor to the beginning● <c-k> - deletes from cursor to the end● <c-w> - deletes word before cursor● <c-a> - move to the beginning● <c-e> - move to the endBetter● use vi-mode
  • 7. #3 I need to switch to adifferent applicatione.g., I am in vim and want to try something inirbWrong:● open new terminal windowGood● <c-z> to suspend● fg to resume
  • 8. #4 I need to disconnectfrom remote machineWrong● Ok, Ill waitGood● <c-z> to suspend● bg to run in background● disown to ignore SIGHUP
  • 9. #5 I forgot sudoWrong● <up> <c-a> sudo <cr>Good● sudo !!● !! is alias for last commandBetter● Custom keybinding that inserts sudo
  • 10. #6 I want to change thisfiles extensionWrong● cp /opt/nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf.bakGood● cp /opt/nginx/conf/nginx.conf{,.bak}
  • 11. #7 I want to exit the shellWrong● type exit● click close buttonGood● <c-d>
  • 12. Keybindings work everywhere (readline).● mysql● psql● irb● ..● even browsers textarea
  • 13. ZSH
  • 14. Features● Autocompletion menu● Autocomplete everything ○ command line parameters ○ remote servers ○ remote filesystems ○ context-sensitive completion (e.g., dvips, git) ○ kill● Fuzzy autocompletion● Globbing ○ ls **/*.txt
  • 15. Moving around
  • 16. Stupid tricks● autocomplete● "cd" (no args) back to home● "cd -" back to previous directory
  • 17. Use the dirstack● dirs -v● pushd/popdOr● setopt auto_pushd● cd +3
  • 18. Ranger● https://github.com/hut/ranger● OSX Finder w vim keybindings● Integrates with shell easily
  • 19. Terminal multiplexor
  • 20. tmux● multiplexes several virtual terminals● sessions/windows● tile management
  • 21. Composing commands
  • 22. How do you identify yourlargest files?
  • 23. How do you identify your largest files?wc -l **/*.rb | tac | tail -n +2 | sort -n -r | head -10
  • 24. Customizing applications
  • 25. Embrace aliasesalias grep="grep --color=auto"alias lsa="ls -AahXBFov --color=auto --indicator-style=file-type --group-directories-first"alias pacman="sudo pacman"Application level aliases● git la
  • 26. dotfiles● Most applications are configurable in plain text ○ .vimrc, .zshrc, .ranger, .rvm, .ssh ... ○ Transfer between machines, backup, restore
  • 27. Resources● http://dotfiles.github.com/● https://github.com/kremso/dotfiles● https://github.com/robbyrussell/oh-my-zsh