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

     
  • 相关阅读:
    如何把新加的分区挂载到指定目录下
    怎样通过U盘安装启动Centos6.8
    Redis 单机安装【一】
    Linux漏洞扫描工具【lynis】
    mysql 主从 重新同步
    Centos 6.8下安装oracle10g数据库、
    监控服务supervisor服务的安装及使用
    制作c#桌面应用程序 安装程序 卸载程序
    Microsoft Visual SourceSafe 2005 服务端安装配置过程以及出现的问题,以及解决方法!
    .NET中的CSV导入导出
  • 原文地址:https://www.cnblogs.com/xuLessReigns/p/11005435.html
Copyright © 2011-2022 走看看