Просмотр исходного кода

Added version check to vim relativenumber and columncolor

Weiyi Lou 14 лет назад
Родитель
Сommit
2dde504f3a
2 измененных файлов с 9 добавлено и 3 удалено
  1. 8 2
      vim/vimrc
  2. 1 1
      zsh/zshrc

+ 8 - 2
vim/vimrc

@@ -30,18 +30,24 @@ set smartindent "guess harder, based on C-like language
 
 
 syntax on
 syntax on
 colorscheme desert
 colorscheme desert
-set colorcolumn=80
 hi Folded ctermfg=darkred "set colour for folded lines
 hi Folded ctermfg=darkred "set colour for folded lines
 
 
+if version >= 730
+    set colorcolumn=80
+endif
+
 
 
 """"""""
 """"""""
 "" UI - Numbering
 "" UI - Numbering
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 
 set number "show line numbers
 set number "show line numbers
-set relativenumber "current line always 0 (requires 7.3 and up)
 set ruler "show row,col count in status line
 set ruler "show row,col count in status line
 
 
+if version >= 730
+    set relativenumber "current line always 0 (requires 7.3 and up)
+endif
+
 
 
 """"""""
 """"""""
 "" UI - Code Folding
 "" UI - Code Folding

+ 1 - 1
zsh/zshrc

@@ -129,7 +129,7 @@ alias igrep='grep -i'
 alias rgrep='grep -R'
 alias rgrep='grep -R'
 alias rigrep='grep -iR'
 alias rigrep='grep -iR'
 
 
-alias proxy='export http_proxy=http://192.168.1.248:3128;export HTTP_PROXY=$http_proxy;export FTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy;'
+alias proxy="export http_proxy=http://192.168.1.248:3128;export HTTP_PROXY=$http_proxy;export FTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy;"
 alias noproxy="export http_proxy='';export HTTP_PROXY=$http_proxy;export FTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy;"
 alias noproxy="export http_proxy='';export HTTP_PROXY=$http_proxy;export FTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy;"
 alias hosts='vim /etc/hosts'
 alias hosts='vim /etc/hosts'
 alias graceful='apachectl graceful'
 alias graceful='apachectl graceful'