bash alias, VIM配置,和使用的插件 RAILS开发相关

一. VIM
这样的配置是比较基本上,而且用来开发rails是足够用的。 

     set hlsearch         #搜索结果高亮                    
     syntax on            #代码高亮
     set number          # 显示行数    

    # 自动记住上一回光标的位置 , 纯属抄来的代码
     if has("autocmd")
            autocmd BufRead *.txt set tw=78
            autocmd BufReadPost *
                 \ if line("'\"") > 0 && line ("'\"") <= line("$") |
                 \     exe "normal g'\"" |
                 \ endif
    endif



插件
1. rails
http://www.vim.org/scripts/script.php?script_id=1567
这个是必备的,详细可以看文档

2. project
http://www.vim.org/scripts/script.php?script_id=69
显示目录数,方便开发,如果你很牛,这玩意就不需要了

二. bash配置,主要是alias, linux(.bashrc), mac ( .profile)
下面是mac下的配置
14 alias ss="ruby script/server"
15 alias cs="ruby script/console"
16 alias ml="mysql -u root"
17 alias w="cd ~/work"
18 alias d="cd ~/Desktop"
19 alias mg="rake db:migrate"
20 alias addgem="sudo gem install \$1 --no-rdoc --no-ri"
21 alias listgem="sudo gem list"
22 alias gp="ps aux|grep"
23 alias ll="ls -l"
24 alias ld="tail -f log/development.log"
25 alias create="mysqladmin -h localhost -u root create \$1"
26 alias drop="mysqladmin -u root drop"
27 alias m="mate app config db lib public vendor &"
28 alias vp="vim +Project"
29 alias ns="ruby script/generate nifty_scaffold"   #nifty_scaffold是个好东西
31 alias start_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM start"
32 alias stop_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM stop"

相对于linux, start_mysql | stop_mysql 应是 sudo /etc/init.d/mysqld start|stop






你可能感兴趣的:(职场,vim,bash,Rails,休闲)