Unix is my IDETomáš Kramár, @tkramar
Integrated DevelopmentEnvironmentThe primary rationale for using an IDEis that it gathers all your tools in thesame place,...
Using UNIX as IDE●   Shell tips●   ZSH●   Moving around●   Terminal multiplexor●   Composing commands●   Customizing appli...
Shell tips
#1 I need to run a longcommand I ran previouslyWrong:● lookup the parameters and type it all again● <up> <up> <up> ....● g...
#2 Oops, I made a typoWrong● <left> <left> <backspace> <backspace> ....Good● <c-u> - deletes from cursor to the beginning●...
#3 I need to switch to adifferent applicatione.g., I am in vim and want to try something inirbWrong:● open new terminal wi...
#4 I need to disconnectfrom remote machineWrong● Ok, Ill waitGood● <c-z> to suspend● bg to run in background● disown to ig...
#5 I forgot sudoWrong● <up> <c-a> sudo <cr>Good● sudo !!● !! is alias for last commandBetter● Custom keybinding that inser...
#6 I want to change thisfiles extensionWrong● cp /opt/nginx/conf/nginx.conf  /opt/nginx/conf/nginx.conf.bakGood● cp /opt/n...
#7 I want to exit the shellWrong● type exit● click close buttonGood● <c-d>
Keybindings work everywhere (readline).● mysql● psql● irb● ..● even browsers textarea
ZSH
Features● Autocompletion menu● Autocomplete everything  ○   command line parameters  ○   remote servers  ○   remote filesy...
Moving around
Stupid tricks● autocomplete● "cd" (no args) back to home● "cd -" back to previous directory
Use the dirstack● dirs -v● pushd/popdOr● setopt auto_pushd● cd +3
Ranger● https://github.com/hut/ranger● OSX Finder w vim keybindings● Integrates with shell easily
Terminal multiplexor
tmux● multiplexes several virtual terminals● sessions/windows● tile management
Composing commands
How do you identify yourlargest files?
How do you identify your largest files?wc -l **/*.rb | tac | tail -n +2 | sort -n -r | head -10
Customizing applications
Embrace aliasesalias grep="grep --color=auto"alias lsa="ls -AahXBFov --color=auto --indicator-style=file-type --group-dire...
dotfiles● Most applications are configurable in plain  text  ○ .vimrc, .zshrc, .ranger, .rvm, .ssh ...  ○ Transfer between...
Resources● http://dotfiles.github.com/● https://github.com/kremso/dotfiles● https://github.com/robbyrussell/oh-my-zsh
Unix is my IDE
Unix is my IDE
Upcoming SlideShare
Loading in …5
×

Unix is my IDE

6,468 views

Published on

Published in: Technology
1 Comment
6 Likes
Statistics
Notes
No Downloads
Views
Total views
6,468
On SlideShare
0
From Embeds
0
Number of Embeds
109
Actions
Shares
0
Downloads
50
Comments
1
Likes
6
Embeds 0
No embeds

No notes for slide

Unix is my IDE

  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

×