zoukankan      html  css  js  c++  java
  • mac下安装autojump

    最近安装了iTerm,被小伙伴推荐了一个插件autojump,感觉真是又好看又好用啊!默认的主题已经很好用了!在此分享给大家~

    看图解释:

    一行命令就可以直接搜索曾经打开过的文件夹,Project是文件夹的名字,如此清楚,简直不能更美好~

    1,安装zsh,执行
    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    
    2,将zsh设置为默认的shell:
    chsh -s /bin/zsh (重启shell)
    
    3,查看当前默认是哪个shell(bash or zsh)
    echo $SHELL
    
    4,安装autojump(确保有brew)
    brew install autojump
    
    5,安装了zsh之后会默认有一个文件.zshrc,可以打开终端并且ls -a查看,使用vim .zshrc打开.zshrc
    6,点击i编辑文件
    (1).在文件中搜索“plugins=”,
    • 如果有修改为:plugins=(git autojump);
    • 如果没有就在文件第一行写plugins=(git autojump);
    (2).然后在新的一行添加写:
    [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

    (3).然后在新的一行添加写:

    alias code="'/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code'"

    alias gs="git status "

    alias gc="git add . && git commit -am "

    
    
    (4).保存更改后的配置文件,并且:wq保存退出。
    7,然后执行    source .zshrc ,autojump就可以直接使用啦~
    8.具体使用方法有两种:
    (1)添加一条快捷键设置:
    code . 会直接打开vsCode

    简写 gs, gc
    (2)直接输入 j project

    也会自动定位到曾经去过的project目录文件夹下,此时的目录一定不能写错!

    (3)打开当前路径下的文件的快捷键 ‘o’

    前提请配置一下

    alias o="ofd"

     

    plugins=(git osx)

    //plugins=(git osx autojump)
    //[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

     
  • 相关阅读:
    城市的划入划出效果
    文本溢出省略解决笔记css
    长串英文数字强制折行解决办法css
    Poj 2352 Star
    树状数组(Binary Indexed Trees,二分索引树)
    二叉树的层次遍历
    Uva 107 The Cat in the Hat
    Uva 10336 Rank the Languages
    Uva 536 Tree Recovery
    Uva10701 Pre, in and post
  • 原文地址:https://www.cnblogs.com/xuLessReigns/p/11005435.html
Copyright © 2011-2022 走看看