unix is my ide
DESCRIPTION
TRANSCRIPT
![Page 1: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/1.jpg)
Unix is my IDETomáš Kramár, @tkramar
![Page 2: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/2.jpg)
![Page 3: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/3.jpg)
![Page 4: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/4.jpg)
Integrated Development EnvironmentThe primary rationale for using an IDE is that it gathers all your tools in the same place, and you can use them in concert with roughly the same user interface paradigm, and without having to exert too much effort to make separate applications cooperate.
![Page 5: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/5.jpg)
Using UNIX as IDE● Shell tips● ZSH● Moving around● Terminal multiplexor● Composing commands● Customizing applications
![Page 6: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/6.jpg)
Shell tips
![Page 7: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/7.jpg)
#1 I need to run a long command I ran previouslyWrong:● lookup the parameters and type it all again● <up> <up> <up> ....● grep .bash_history
Good:● <c-r>, start typing, <c-r> to scroll results
![Page 8: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/8.jpg)
#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
![Page 9: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/9.jpg)
#3 I need to switch to a different applicatione.g., I am in vim and want to try something in irb
Wrong:● open new terminal window
Good● <c-z> to suspend● fg to resume
![Page 10: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/10.jpg)
#4 I need to disconnect from remote machineWrong● Ok, I'll wait
Good● <c-z> to suspend● bg to run in background● disown to ignore SIGHUP
![Page 11: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/11.jpg)
#5 I forgot sudoWrong● <up> <c-a> sudo <cr>
Good● sudo !!● !! is alias for last command
Better● Custom keybinding that inserts sudo
![Page 12: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/12.jpg)
#6 I want to change this file's extensionWrong● cp /opt/nginx/conf/nginx.conf
/opt/nginx/conf/nginx.conf.bak
Good● cp /opt/nginx/conf/nginx.conf{,.bak}
![Page 13: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/13.jpg)
#7 I want to exit the shellWrong● type 'exit'● click close button
Good● <c-d>
![Page 14: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/14.jpg)
Keybindings work everywhere (readline).● mysql● psql● irb● ..● even browser's textarea
![Page 15: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/15.jpg)
ZSH
![Page 16: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/16.jpg)
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
![Page 17: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/17.jpg)
Moving around
![Page 18: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/18.jpg)
Stupid tricks● autocomplete● "cd" (no args) back to home● "cd -" back to previous directory
![Page 19: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/19.jpg)
Use the dirstack● dirs -v● pushd/popd
Or
● setopt auto_pushd● cd +3
![Page 20: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/20.jpg)
Ranger● https://github.com/hut/ranger● OSX Finder \w vim keybindings● Integrates with shell easily
![Page 21: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/21.jpg)
Terminal multiplexor
![Page 22: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/22.jpg)
tmux● multiplexes several virtual terminals● sessions/windows● tile management
![Page 23: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/23.jpg)
Composing commands
![Page 24: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/24.jpg)
How do you identify your largest files?
![Page 25: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/25.jpg)
How do you identify your largest files?
wc -l **/*.rb | tac | tail -n +2 | sort -n -r | head -10
![Page 26: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/26.jpg)
Customizing applications
![Page 27: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/27.jpg)
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
![Page 28: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/28.jpg)
dotfiles● Most applications are configurable in plain
text○ .vimrc, .zshrc, .ranger, .rvm, .ssh ...○ Transfer between machines, backup, restore
![Page 29: Unix is my IDE](https://reader034.vdocuments.us/reader034/viewer/2022051818/54b746e14a7959f72e8b4574/html5/thumbnails/29.jpg)
Resources● http://dotfiles.github.com/● https://github.com/kremso/dotfiles
● https://github.com/robbyrussell/oh-my-zsh