.vimrc .emacs

(setq inhibit-startup-message t)
;(add-to-list 'load-path "D:/root/soft/emacs/site-lisp/color-theme-6.6.0")

 

(setq visible-bell t)
(setq frame-title-format "%b")
(setq initial-frame-alist
   (append
  '((top                 . 485)    ; フレームの Y 位置(ピクセル数)
    (left                . 580)   ; フレームの X 位置(ピクセル数)
    (width               . 81)    ; フレーム幅(文字数)
    (height              . 20))   ; フレーム高(文字数)
  initial-frame-alist))
(tool-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode -1)
(setq backup-inhibited t)
(blink-cursor-mode 0)
(column-number-mode t)
(line-number-mode t)
(setq scroll-step 1)
(setq next-line-add-newlines nil)
(setq require-final-newline t)
(setq fill-column 80)
(setq-default auto-fill-mode t)
(display-time)
(require 'time-stamp)
(setq time-stamp-format "%3a %3b %02d %02H:%02M:%02S %Z %:y")

 

(add-to-list 'load-path "D:/root/soft/emacs/site-lisp/muse-latest")

(require 'muse-mode)     ; load authoring mode

(require 'muse-html)     ; load publishing styles I use
(require 'muse-latex)
(require 'muse-texinfo)
(require 'muse-docbook)
(require 'muse-project)

(setq muse-project-alist
      '(("website"                      ; my various writings
         ("~/FG/muse" :default "index")
         (:base "html" :path "~/FG/html"))))
(require 'color-theme)
(color-theme-initialize)
;(color-theme-arjen)  ;Red and Black
;(color-theme-late-night) ;black and gray
;(color-theme-robin-hood)
;(color-theme-marquardt)


;; Use cperl mode instead of the default perl mode
(defalias 'perl-mode 'cperl-mode)

;; turn autoindenting on
(global-set-key "/r" 'newline-and-indent)

;; Use 4 space indents via cperl mode
(custom-set-variables
 '(cperl-close-paren-offset -4)
 '(cperl-continued-statement-offset 4)
 '(cperl-indent-level 4)
'(cperl-indent-parens-as-block t)
 '(cperl-tab-always-indent t))

;; Insert spaces instead of tabs
(setq-default indent-tabs-mode nil)

;; Set line width to 78 columns...
(setq fill-column 78)
(setq auto-fill-mode t)

;; Use % to match various kinds of brackets...
;; See: http://www.lifl.fr/~hodique/uploads/Perso/patches.el
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
  "Go to the matching paren if on a paren; otherwise insert %."
  (interactive "p")
  (let ((prev-char (char-to-string (preceding-char)))
        (next-char (char-to-string (following-char))))
    (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
          ((string-match "[/]})>]" prev-char) (backward-sexp 1))
          (t (self-insert-command (or arg 1))))))

;; Load an application template in a new unattached buffer...
(defun application-template-pl (  )
  "Inserts the standard Perl application template"  ; For help and info.
  (interactive "*")                                ; Make this user accessible.
  (switch-to-buffer "application-template-pl")
  (insert-file "~/.code_templates/perl_application.pl"))
;; Set to a specific key combination...
(global-set-key "/C-ca" 'application-template-pl)

;; Load a module template in a new unattached buffer...
(defun module-template-pm (  )
  "Inserts the standard Perl module template"       ; For help and info.
  (interactive "*")                                 ; Make this user accessible.
  (switch-to-buffer "module-template-pm")
  (insert-file "~/.code_templates/perl_module.pm"))
;; Set to a specific key combination...
(global-set-key "/C-cm" 'module-template-pm)
;; Use cperl mode instead of the default perl mode
(defalias 'perl-mode 'cperl-mode)

;; turn autoindenting on
(global-set-key "/r" 'newline-and-indent)

;; Use 4 space indents via cperl mode
(custom-set-variables
 '(cperl-close-paren-offset -4)
 '(cperl-continued-statement-offset 4)
 '(cperl-indent-level 4)
'(cperl-indent-parens-as-block t)
 '(cperl-tab-always-indent t))

;; Insert spaces instead of tabs
(setq-default indent-tabs-mode nil)

;; Set line width to 78 columns...
(setq fill-column 78)
(setq auto-fill-mode t)

;; Use % to match various kinds of brackets...
;; See: http://www.lifl.fr/~hodique/uploads/Perso/patches.el
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
  "Go to the matching paren if on a paren; otherwise insert %."
  (interactive "p")
  (let ((prev-char (char-to-string (preceding-char)))
        (next-char (char-to-string (following-char))))
    (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
          ((string-match "[/]})>]" prev-char) (backward-sexp 1))
          (t (self-insert-command (or arg 1))))))

;; Load an application template in a new unattached buffer...
(defun application-template-pl (  )
  "Inserts the standard Perl application template"  ; For help and info.
  (interactive "*")                                ; Make this user accessible.
  (switch-to-buffer "application-template-pl")
  (insert-file "~/.code_templates/perl_application.pl"))
;; Set to a specific key combination...
(global-set-key "/C-ca" 'application-template-pl)

;; Load a module template in a new unattached buffer...
(defun module-template-pm (  )
  "Inserts the standard Perl module template"       ; For help and info.
  (interactive "*")                                 ; Make this user accessible.
  (switch-to-buffer "module-template-pm")
  (insert-file "~/.code_templates/perl_module.pm"))
;; Set to a specific key combination...
(global-set-key "/C-cm" 'module-template-pm)

;; Expand the following abbreviations while typing in text files...
(abbrev-mode 1)

(define-abbrev-table 'global-abbrev-table '(
    ("pdbg"   "use Data::Dumper qw( Dumper );/nwarn Dumper[];"   nil 1)
    ("phbp"   "#! /usr/bin/perl -w"                              nil 1)
    ("pbmk"   "use Benchmark qw( cmpthese );/ncmpthese -10, {};" nil 1)
    ("pusc"   "use Smart::Comments;/n/n### "                     nil 1)
    ("putm"   "use Test::More 'no_plan';"                        nil 1)
    ))


(add-hook 'text-mode-hook (lambda (  ) (abbrev-mode 1)))
;; Expand the following abbreviations while typing in text files...
(abbrev-mode 1)

(define-abbrev-table 'global-abbrev-table '(
    ("pdbg"   "use Data::Dumper qw( Dumper );/nwarn Dumper[];"   nil 1)
    ("phbp"   "#! /usr/bin/perl -w"                              nil 1)
    ("pbmk"   "use Benchmark qw( cmpthese );/ncmpthese -10, {};" nil 1)
    ("pusc"   "use Smart::Comments;/n/n### "                     nil 1)
    ("putm"   "use Test::More 'no_plan';"                        nil 1)
    ))


(add-hook 'text-mode-hook (lambda (  ) (abbrev-mode 1)))
------------------------------------------

set guifont=MS_ゴシック:h10:cSHIFTJIS
"set guifont=NSimSun:h10
"set encoding=utf-8
"set helplang=cn

"最大化窗口
"au GUIEnter * simalt ~x
set go=r
set nu
set ts=1
set nobackup
"colorscheme evening
"colorscheme wombat
"colorscheme default
"colorscheme darkblue
syntax on
" *.gg ファイルを自動的にロード
augroup filetypedetect
        au BufNewFile,BufRead *.mm setf mm
        au BufNewFile,BufRead *.gg setf gg
augroup END

"Start the gvim with the Maximized window
"au GUIEnter * simalt ~x

cd $HOME
iab nn [未][2008/10/00 金]
iab // /*  */
"map <C-w> :wq!<CR>
map ,w :w!<CR>
"map <C-q> :q!<CR>
map <S-ESC> :q!<CR>
map ,q :q!<CR>
map <C-o> :browse confirm e<CR>
"format sql text
map <F12> :so D:/root/soft/vim/vim72/sqlFormat.vim<CR>
map <F9> :set ft=sql<CR>:so D:/root/soft/vim/vim72/sqlitab.vim<CR>
map <F8> :colorscheme evening<CR>
map <F5> :e! $VIM/vim72/.vimrc<CR>
map <C-j> :simalt ~x<CR>

winpos 800 100
set lines=40
set columns=120
"set columns=60

autocmd BufEnter * lcd %:p:h  

 


"-----------------  SETTINGS FOR PLSQL --------------------
set diffexpr=MyDiff2()
function MyDiff2()
        let opt = '-a --binary '
        if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
        if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
        let arg1 = v:fname_in
        if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
        let arg2 = v:fname_new
        if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
        let arg3 = v:fname_out
        if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
        silent execute '!d:Vimvim63diff ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
endfunction
if version > 600
        set helplang=cn
endif
set nobackup
set ts=4
set expandtab
set ignorecase
set filetype=sql
set showmatch
set number
"我是色弱。
"colorscheme evening
"iab begin BEGIN
"iab declare DECLARE
"iab end END
"iab if IF
"iab msg DBMS_OUTPUT.PUT_LINE
"iab select SELECT
"iab from FROM
"iab cursor CURSOR
"iab pragma PRAGMA
"iab exception EXCEPTION
"iab when WHEN
"iab then THEN
"iab loop LOOP
"iab while WHILE
"iab update UPDATE
"iab delete DELETE
"iab insert INSERT
"iab values VALUES
"iab long LONG
"iab rownum ROWNUM
"iab where WHERE
"iab type TYPE
"iab rowtype ROWTYPE
"iab for FOR
"iab else ELSE
"iab to_char TO_CHAR
"iab sysdate SYSDATE
"iab varchar2 VARCHAR2
"iab char CHAR
"iab number NUMBER
"iab boolean BOOLEAN
"iab dual DUAL
"iab dbms_utility DBMS_UTILITY
"iab rowidtochar ROWIDTOCHAR
"iab variable VARIABLE
"iab null NULL
"iab date DATE
"iab default DEFAULT
"iab not NOT
"iab no_data_found NO_DATA_FOUND
"iab others OTHERS
"iab exception_init EXCEPTION_INIT
"iab in IN
"iab is IS
"iab elsif ELSIF
"iab nvl NVL
"iab procedure PROCEDURE
"iab function FUNCTION
"iab integer INTEGER
"iab and AND
"iab or OR
"iab intersect INTERSECT
"iab minus MINUS
"iab union UNION
"iab record RECORD
"iab exit EXIT
"iab raise RAISE
"iab open OPEN
"iab isopen ISOPEN
"iab fetch FETCH
"iab close CLOSE
"iab notfound NOTFOUND
"iab into INTO
"iab found FOUND
"iab rowcount ROWCOUNT
"iab count COUNT
"iab enable ENABLE
"iab ref REF
"iab return RETURN
"iab by BY
"iab index INDEX
"iab binary BINARY
"iab table TABLE
"iab of OF
"iab binary_integer BINARY_INTEGER
"iab add_months ADD_MONTHS
"iab last_day LAST_DAY
"iab round ROUND
"iab trunc TRUNC
"iab months_between MONTHS_BETWEEN
"iab out OUT
"iab commit COMMIT
"iab replace REPLACE
"iab create CREATE
"iab having HAVING
"iab group GROUP
"iab sum SUM
"iab allfee fee1+fee2+fee3+fee4+fee11+fee12+fee13+fee14
"iab decode DECODE
"iab substr SUBSTR
"iab lpad LPAD
"iab like LIKE
"iab ceil CEIL
"iab ltrim LTRIM
"iab rtrim RTRIM
"iab max MAX
"iab min MIN
"iab avg AVG
"iab on ON
"iab trigger TRIGGER
"iab each EACH
"iab row ROW
"iab new NEW
"iab before BEFORE
"iab after AFTER
"iab rem ----
"iab qq SELECT * FROM
""空行
"iab spacel                                                                  --NullLine
"iab remn ------------------------------------------------------------------
"iab remm ------******************************************************------
"iab exists EXISTS
"iab sqlcode SQLCODE
"iab sqlerrm SQLERRM
""?些是我常用到的表
"iab bbs bb_service_relation_t
"iab bbms bb_month_service_relation_t
"iab ura user_record_array
"iab pmon TO_CHAR(ADD_MONTHS(SYSDATE,-1),'YYYYMM')
""消除?声
set vb t_vb=".

set autoindent                   "Preserve current indent on new lines
set textwidth=78                 "Wrap at this column
set backspace=indent,eol,start    "Make backspaces delete sensibly
 
set tabstop=4                     "Indentation levels every four columns
set expandtab                     "Convert all tabs typed to spaces
set shiftwidth=4                  "Indent/outdent by four columns
set shiftround                    "Indent/outdent to nearest tabstop

set matchpairs+=<:>               "Allow % to bounce between angles too

"Inserting these abbreviations inserts the corresponding Perl statement...
iab phbp  #! /usr/bin/perl -w
iab pdbg  use Data::Dumper 'Dumper';^Mwarn Dumper [];^[hi
iab pbmk  use Benchmark qw( cmpthese );^Mcmpthese -10, {};^[O
iab pusc  use Smart::Comments;^M^M###
iab putm  use Test::More qw( no_plan );

iab papp  ^[:r ~/.code_templates/perl_application.pl^M

iab pmod  ^[:r ~/.code_templates/perl_module.pm^M

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值