• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Unix is my IDE
 

Unix is my IDE

on

  • 4,720 views

 

Statistics

Views

Total Views
4,720
Views on SlideShare
4,626
Embed Views
94

Actions

Likes
5
Downloads
40
Comments
1

5 Embeds 94

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

Accessibility

Categories

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.

Cancel

11 of 1 previous next

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

    Unix is my IDE Unix is my IDE Presentation Transcript

    • Unix is my IDETomáš Kramár, @tkramar
    • 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.
    • Using UNIX as IDE● Shell tips● ZSH● Moving around● Terminal multiplexor● Composing commands● Customizing applications
    • Shell tips
    • #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
    • #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
    • #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
    • #4 I need to disconnectfrom remote machineWrong● Ok, Ill waitGood● <c-z> to suspend● bg to run in background● disown to ignore SIGHUP
    • #5 I forgot sudoWrong● <up> <c-a> sudo <cr>Good● sudo !!● !! is alias for last commandBetter● Custom keybinding that inserts sudo
    • #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}
    • #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 filesystems ○ context-sensitive completion (e.g., dvips, git) ○ kill● Fuzzy autocompletion● Globbing ○ ls **/*.txt
    • 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-directories-first"alias pacman="sudo pacman"Application level aliases● git la
    • dotfiles● Most applications are configurable in plain text ○ .vimrc, .zshrc, .ranger, .rvm, .ssh ... ○ Transfer between machines, backup, restore
    • Resources● http://dotfiles.github.com/● https://github.com/kremso/dotfiles● https://github.com/robbyrussell/oh-my-zsh