Advertisement
Guest User

Untitled

a guest
Aug 31st, 2019
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.13 KB | None | 0 0
  1. " An example for a vimrc file.
  2. "
  3. " Maintainer: Yichun Zhang <yichun@openresty.com>
  4. " Credit: Bram Moolenaar <Bram@vim.org> and Audrey Tang
  5. " Last change: 2019 Aug 19
  6. "
  7. " To use it, copy it to
  8. " for Unix and OS/2: ~/.vimrc
  9. " for Amiga: s:.vimrc
  10. " for MS-DOS and Win32: $VIM\_vimrc
  11. " for OpenVMS: sys$login:.vimrc
  12.  
  13. " When started as "evim", evim.vim will already have done these settings.
  14. if v:progname =~? "evim"
  15. finish
  16. endif
  17.  
  18. set expandtab
  19. set shiftwidth=4
  20. set softtabstop=4
  21. set tabstop=4
  22.  
  23. " Use Vim settings, rather then Vi settings (much better!).
  24. " This must be first, because it changes other options as a side effect.
  25. set nocompatible
  26.  
  27. " allow backspacing over everything in insert mode
  28. set backspace=indent,eol,start
  29.  
  30. if has("vms")
  31. set nobackup " do not keep a backup file, use versions instead
  32. else
  33. set backup " keep a backup file
  34. endif
  35. set history=500 " keep 50 lines of command line history
  36. set ruler " show the cursor position all the time
  37. set showcmd " display incomplete commands
  38. set incsearch " do incremental searching
  39.  
  40. " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
  41. " let &guioptions = substitute(&guioptions, "t", "", "g")
  42.  
  43. " Don't use Ex mode, use Q for formatting
  44. map Q gq
  45.  
  46. " This is an alternative that also works in block mode, but the deleted
  47. " text is lost and it only works for putting the current register.
  48. "vnoremap p "_dp
  49.  
  50. " Switch syntax highlighting on, when the terminal has colors
  51. " Also switch on highlighting the last used search pattern.
  52. if &t_Co > 2 || has("gui_running")
  53. syntax on
  54. set hlsearch
  55. endif
  56.  
  57. " Only do this part when compiled with support for autocommands.
  58. if has("autocmd")
  59.  
  60. " Enable file type detection.
  61. " Use the default filetype settings, so that mail gets 'tw' set to 72,
  62. " 'cindent' is on in C files, etc.
  63. " Also load indent files, to automatically do language-dependent indenting.
  64. filetype plugin indent on
  65.  
  66. " Put these in an autocmd group, so that we can delete them easily.
  67. augroup vimrcEx
  68. au!
  69.  
  70. " For all text files set 'textwidth' to 78 characters.
  71. autocmd FileType text setlocal textwidth=78
  72.  
  73. " When editing a file, always jump to the last known cursor position.
  74. " Don't do it when the position is invalid or when inside an event handler
  75. " (happens when dropping a file on gvim).
  76. autocmd BufReadPost *
  77. \ if line("'\"") > 0 && line("'\"") <= line("$") |
  78. \ exe "normal g`\"" |
  79. \ endif
  80.  
  81. augroup END
  82.  
  83. else
  84.  
  85. set autoindent " always set autoindenting on
  86.  
  87. endif " has("autocmd")
  88. " Metadata: {{{
  89. set nocompatible
  90. set title
  91. let g:Header_name="Yichun Zhang"
  92. let g:Header_email="agentzh@gmail.com"
  93. " }}}
  94. " Encodings: {{{
  95. set termencoding=utf-8
  96. set encoding=utf-8
  97. set fileencodings=utf8,big5-hkscs,utf-8,iso8859-1
  98. set expandtab
  99. set grepprg=grep\ -nH\ $*
  100. " ,gbk,euc-jp,euc-kr,utf-bom,iso8859-1
  101. " }}}
  102. " Terminal: {{{
  103. "noremap Bs Del
  104. "noremap Del Bs
  105. "noremap!Bs Del
  106. "noremap!Del Bs
  107. set bs=2
  108. "noremap! <Del> <BS>
  109. "noremap! <BS> <Del>
  110.  
  111. " insert-mode cursors
  112. "map! OA ka
  113. "map! OB ja
  114. "map! OC lli
  115. "map! OD i
  116.  
  117. " Alt now serves as window commands (^W)
  118. "noremap  
  119. "norgmap <Tab> p
  120. noremap gh <C-W>h
  121. noremap gk <C-W>k
  122. noremap gl <C-W>l
  123. noremap gj <C-W>j
  124. noremap F gf
  125. " }}}
  126. " Utilities: {{{
  127. " }}}
  128. " Utilities: {{{
  129. " map <C-A> :!svk add '%'
  130. " map <C-D> :!svk di '%'
  131. " map <C-U> :!svk pull
  132. " map <C-I> :!svk ci
  133. "map W :!chmod +w %
  134. " }}}
  135. " Environment: {{{
  136. "set shiftround
  137. set writeany autoread autowrite
  138. set tabstop=8 " so tabs look right for us
  139. set softtabstop=4
  140. set shiftwidth=4 " so ^T and << are smaller
  141. set report=1 " so we our told whenever we affect more than 1 line
  142. set nomesg " because being talked to during an edit is aggravating
  143. set autoindent " so i don't have to tab in
  144.  
  145. set wrap
  146. set breakat=
  147. "set wrapmargin=1 " Wrap slightly in from the margin
  148. set linebreak
  149. "set virtualedit=block " 'Free' editing in visual block mode
  150. set dictionary+=/usr/share/dict/words " dictionary
  151.  
  152. set splitbelow " horizontally split below
  153. set splitright " vertically split to the right
  154.  
  155. set smartcase " be sensible when searching 'ic'
  156. set incsearch
  157. set hlsearch
  158. "set ttyfast
  159. set timeoutlen=500 " Fastish for slow connections
  160. " }}}
  161. " Shortcuts: {{{
  162. " edit previously editted file
  163. "noremap = :MBEbn
  164. " write out the file
  165. "map  :w!
  166. " noremap  
  167. " split line
  168. " map * i
  169. 
  170. " because it's easier to type
  171. "noremap g G
  172. "noremap G g
  173. " so we return to exact position
  174. map ' `
  175. " so Y is analagous to C and D
  176. map Y y$
  177. " single-key save+quit
  178. map Q :wq
  179. " go to next file in arg list, same position
  180. map  :n +/
  181. " set textwidth to cursor's column
  182. "map #tw :set textwidth=<C-R>=col(".")<C-M>
  183. " }}}
  184. " Commands: {{{
  185. " Sorting, uniquing and shuffling
  186. command -nargs=* -range=% Sort <line1>,<line2>!sort <args>
  187. command -nargs=* -range=% Uniq <line1>,<line2>!uniq <args>
  188. command -nargs=* -range=% Rand <line1>,<line2>!rand <args>
  189.  
  190. command Nl :if (&nu) <Bar> set nonu <Bar> else <Bar> set nu <Bar> endif
  191.  
  192. command Q :q!
  193. command W :w!
  194. command Wq :wq!
  195. command WQ :wq!
  196. " }}}
  197. " Perl: {{{
  198. map <C-P> :make
  199. map <F4> :call MakeTest()
  200.  
  201. fun! MakeTest()
  202. set makeprg=make\ test
  203. make
  204. set makeprg=perl\ %
  205. endfun
  206.  
  207. let current_compiler = "perl"
  208.  
  209. autocmd FileType perl set makeprg=perl\ -w\ %
  210. autocmd FileType perl6 set makeprg=pugs\ %
  211. autocmd FileType scheme set makeprg=mzscheme\ -g\ -r\ %
  212. autocmd FileType scheme set shiftwidth=2
  213. autocmd FileType mzperl set makeprg=mzperl\ %
  214. autocmd FileType mzperl set shiftwidth=2
  215. autocmd FileType imc set makeprg=parrot\ %
  216.  
  217. let perl_include_POD=1
  218. let perl_want_scope_in_variables=1
  219. let perl_extended_vars=1
  220. let perl_fold=1
  221. " }}}
  222. " Filetypes: {{{
  223. filetype indent on
  224. filetype plugin on
  225.  
  226. " Ignore filenames with any of the following suffices
  227. set suffixes+=.aux,.bak,.dvi,.gz,.idx,.log,.ps,.swp,.tar,.class.,~
  228. set suffixes+=.o,.bbl,.log,.blg,.ilg,.ind,.toc,.pdf,.lof
  229.  
  230. " Suffices when doing 'gf' stuff.
  231. set suffixesadd+=.html,.pl,.pm,.tex,.sty,.css,.xml,.xsd,.txt,.ict
  232. set suffixesadd+=.shtml,.phtml,.ehtml,.epl,.rss,.rdf,.pod,.asp
  233. if has("wildignore") | set wildignore+=&suffixes | endif
  234.  
  235. fun! FTCheck()
  236. let lines = getline(1)
  237. if lines =~? "\[<%]\[#&% ]"
  238. setf mason
  239. elseif lines =~? "--- #YAML:"
  240. setf yaml
  241. elseif lines =~? "[%"
  242. setf tt2
  243. elseif lines =~? "==="
  244. setf diff
  245. elseif lines =~? "pugs"
  246. setf perl6
  247. endif
  248. endfun
  249. " }}}
  250. " Color: {{{
  251. syntax on
  252. set bg=dark
  253. let html_number_color=1
  254. "colorscheme darkblue
  255. "colorscheme ron
  256. "colorscheme peachpuff
  257. colorscheme delek
  258. "colorscheme print_bw
  259. "colorscheme habiLight
  260. "colorscheme proton
  261. "colorscheme blueshift
  262. "colorscheme desert
  263. " }}}
  264. " Folding: {{{
  265. set foldmethod=marker
  266. set foldtext=AutFoldText()
  267. set nofoldenable
  268.  
  269. function ExpandTo(xlen,xstr)
  270. let hey = a:xstr
  271. while strlen(hey) < a:xlen
  272. let hey = hey . ' '
  273. endwhile
  274. return hey
  275. endfunction
  276.  
  277. function AutFoldText()
  278. let line = getline(v:foldstart)
  279. let tail = (v:foldend - v:foldstart + 1) . ' lines'
  280. return ExpandTo((winwidth(0) - strlen(tail)), line) . tail
  281. endfunction
  282.  
  283. set fillchars=stlnc:-,vert:\|,fold:\ ,diff:-
  284. if has("win32")
  285. hi Folded ctermbg=blue ctermfg=yellow
  286. else
  287. hi Folded cterm=underline ctermfg=Gray
  288. endif
  289. autocmd FileType human syn region FoldMarker start="^[1234567890]" end="^[1234567890]"me=e-1 fold keepend
  290. " }}}
  291. " Autocommands: {{{
  292. function! CHANGE_CURR_DIR()
  293. let _dir = expand("%:p:h")
  294. if _dir !~ '^/tmp'
  295. exec 'cd ' . _dir
  296. endif
  297. unlet _dir
  298. endfunction
  299.  
  300. "autocmd BufEnter * call CHANGE_CURR_DIR()
  301.  
  302. autocmd BufNewFile,BufRead * set path+=**
  303. autocmd BufReadPost * if line("'\"")|execute("normal `\"")|endif
  304. "autocmd BufNewFile,BufRead *.t setf perl
  305. autocmd BufNewFile,BufRead *.dasc setf c
  306. autocmd BufNewFile,BufRead *.y setf c
  307. autocmd BufNewFile,BufRead *.yaml,*.yml setf yaml
  308. autocmd BufNewFile,BufRead *.ss setf scheme
  309. autocmd BufNewFile,BufRead *.c setf c
  310. autocmd BufNewFile,BufRead *.sxx setf stp
  311. autocmd BufNewFile,BufRead *.stp setf stp
  312. autocmd BufNewFile,BufRead *.mzp setf mzperl
  313. autocmd BufNewFile,BufRead *.mas setf mason
  314. autocmd BufNewFile,BufRead *.hta setf mason
  315. autocmd BufNewFile,BufRead *.p6 setf perl6
  316. autocmd BufNewFile,BufRead *.tdy setf perl
  317. autocmd BufNewFile,BufRead *.edge setf edge
  318. autocmd BufNewFile,BufRead *.el setf edge
  319. autocmd BufNewFile,BufRead *.ops setf ops
  320. autocmd BufNewFile,BufRead *.pmc setf pmc
  321. autocmd BufNewFile,BufRead *.yy setf yacc
  322. autocmd BufNewFile,BufRead *.fan setf perl6
  323. autocmd BufNewFile,BufRead * call FTCheck()
  324. autocmd BufNewFile,BufRead *.hsc setf haskell
  325. autocmd BufNewFile,BufRead *.hs-drift setf haskell
  326. autocmd BufNewFile,BufRead *.tt setf tt2
  327. autocmd BufNewFile,BufRead *.emt setf c
  328. autocmd BufNewFile,BufRead *.pod hi perlPOD ctermfg=Gray
  329. autocmd BufNewFile,BufRead *.0 24
  330. autocmd BufNewFile,BufRead w3m* set fileencoding=utf-8
  331. au BufNewFile,BufRead *.pmc set ft=pmc cindent
  332. au BufNewFile,BufRead *.pasm set ft=pasm ai sw=4
  333. au BufNewFile,BufRead *.imc,*.imcc,*.pir set ft=pir ai sw=4
  334. au BufNewFile *.imc,*.imcc,*.pir 0r ~/.vim/skeleton.pir
  335. let Tlist_Ctags_Cmd='/usr/local/bin/exctags'
  336. let Tlist_Inc_Winwidth=0
  337. highlight WhiteSpaceEOL ctermbg=darkgreen guibg=lightgreen
  338. match WhiteSpaceEOL /\s$/
  339. autocmd WinEnter * match WhiteSpaceEOL /\s$/
  340. "set sessionoptions=buffers,help,tabpages,winsize,winpos,sesdir
  341. set path+=**
  342. set et
  343. set smarttab
  344. " vim: foldmethod=marker shiftwidth=4 expandtab
  345. set guifont=Consolas\ 11
  346. set pastetoggle=<F9>
  347. set mouse=
  348. imap <F2> <C-R>=strftime("%c")<CR>
  349. set wrapscan
  350.  
  351. hi Search cterm=NONE ctermfg=black ctermbg=blue
  352. "highlight Search guibg='Purple' guifg='NONE'
  353.  
  354. " Allow saving of files as sudo when I forgot to start vim using sudo.
  355. cmap w!! w !sudo tee > /dev/null %
  356.  
  357. " AnsiHighlight: Allows for marking up a file, using ANSI color escapes when
  358. " the syntax changes colors, for easy, faithful reproduction.
  359. " Author: Matthew Wozniski (mjw@drexel.edu)
  360. " Date: Fri, 01 Aug 2008 05:22:55 -0400
  361. " Version: 1.0 FIXME
  362. " History: FIXME see :help marklines-history
  363. " License: BSD. Completely open source, but I would like to be
  364. " credited if you use some of this code elsewhere.
  365.  
  366. " Copyright (c) 2008, Matthew J. Wozniski {{{1
  367. " All rights reserved.
  368. "
  369. " Redistribution and use in source and binary forms, with or without
  370. " modification, are permitted provided that the following conditions are met:
  371. " * Redistributions of source code must retain the above copyright
  372. " notice, this list of conditions and the following disclaimer.
  373. " * Redistributions in binary form must reproduce the above copyright
  374. " notice, this list of conditions and the following disclaimer in the
  375. " documentation and/or other materials provided with the distribution.
  376. " * The names of the contributors may not be used to endorse or promote
  377. " products derived from this software without specific prior written
  378. " permission.
  379. "
  380. " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY
  381. " EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  382. " WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  383. " DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
  384. " DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  385. " (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  386. " LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  387. " ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  388. " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  389. " SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  390.  
  391. " Turn off vi-compatible mode, unless it's already off {{{1
  392. if &cp
  393. set nocp
  394. endif
  395.  
  396. let s:type = 'cterm'
  397. if &t_Co == 0
  398. let s:type = 'term'
  399. endif
  400.  
  401. " Converts info for a highlight group to a string of ANSI color escapes {{{1
  402. function! s:GroupToAnsi(groupnum)
  403. if ! exists("s:ansicache")
  404. let s:ansicache = {}
  405. endif
  406.  
  407. let groupnum = a:groupnum
  408.  
  409. if groupnum == 0
  410. let groupnum = hlID('Normal')
  411. endif
  412.  
  413. if has_key(s:ansicache, groupnum)
  414. return s:ansicache[groupnum]
  415. endif
  416.  
  417. let fg = synIDattr(groupnum, 'fg', s:type)
  418. let bg = synIDattr(groupnum, 'bg', s:type)
  419. let rv = synIDattr(groupnum, 'reverse', s:type)
  420. let bd = synIDattr(groupnum, 'bold', s:type)
  421.  
  422. " FIXME other attributes?
  423.  
  424. if rv == "" || rv == -1
  425. let rv = 0
  426. endif
  427.  
  428. if bd == "" || bd == -1
  429. let bd = 0
  430. endif
  431.  
  432. if rv
  433. let temp = bg
  434. let bg = fg
  435. let fg = temp
  436. endif
  437.  
  438. if fg == "" || fg == -1
  439. unlet fg
  440. endif
  441.  
  442. if !exists('fg') && !groupnum == hlID('Normal')
  443. let fg = synIDattr(hlID('Normal'), 'fg', s:type)
  444. if fg == "" || fg == -1
  445. unlet fg
  446. endif
  447. endif
  448.  
  449. if bg == "" || bg == -1
  450. unlet bg
  451. endif
  452.  
  453. if !exists('bg')
  454. let bg = synIDattr(hlID('Normal'), 'bg', s:type)
  455. if bg == "" || bg == -1
  456. unlet bg
  457. endif
  458. endif
  459.  
  460. let retv = "\<Esc>[efg"
  461.  
  462. if bd
  463. let retv .= ";1"
  464. endif
  465.  
  466. if exists('fg') && fg < 8
  467. let retv .= ";3" . fg
  468. elseif exists('fg') && fg < 16 "use aixterm codes
  469. let retv .= ";9" . (fg - 8)
  470. elseif exists('fg') "use xterm256 codes
  471. let retv .= ";38;5;" . fg
  472. else
  473. let retv .= ";39"
  474. endif
  475.  
  476. if exists('bg') && bg < 8
  477. let retv .= ";4" . bg
  478. elseif exists('bg') && bg < 16 "use aixterm codes
  479. let retv .= ";10" . (bg - 8)
  480. elseif exists('bg') "use xterm256 codes
  481. let retv .= ";48;5;" . bg
  482. else
  483. let retv .= ";49"
  484. endif
  485.  
  486. let retv .= "m"
  487.  
  488. let s:ansicache[groupnum] = retv
  489.  
  490. return retv
  491. endfunction
  492.  
  493. function! AnsiHighlight(output_file)
  494. let retv = []
  495.  
  496. for lnum in range(1, line('$'))
  497. let last = hlID('Normal')
  498. let output = s:GroupToAnsi(last) . "\<Esc>[K" " Clear to right
  499.  
  500. " Hopefully fix highlighting sync issues
  501. exe "norm! " . lnum . "G$"
  502.  
  503. let line = getline(lnum)
  504.  
  505. for cnum in range(1, col('.'))
  506. if synIDtrans(synID(lnum, cnum, 1)) != last
  507. let last = synIDtrans(synID(lnum, cnum, 1))
  508. let output .= s:GroupToAnsi(last)
  509. endif
  510.  
  511. let output .= matchstr(line, '\%(\zs.\)\{'.cnum.'}')
  512. "let line = substitute(line, '.', '', '')
  513. "let line = matchstr(line, '^\@<!.*')
  514. endfor
  515. let retv += [output]
  516. endfor
  517. " Reset the colors to default after displaying the file
  518. let retv[-1] .= "\<Esc>[0m"
  519.  
  520. return writefile(retv, a:output_file)
  521. endfunction
  522.  
  523. " See copyright in the vims cript above (for the vim script) and in
  524. " vimcat.md for the whole script.
  525. "
  526. " The list of contributors is at the bottom of the vimpager script in this
  527. " project.
  528. "
  529. "set clipboard=unnamed
  530. cmap cs! ConqueTermSplit bash
  531. cmap cv! ConqueTermVSplit bash
  532. cmap ct! ConqueTerm bash
  533. cmap spell! setlocal spell spelllang=en_us
  534.  
  535. set clipboard=unnamedplus
  536.  
  537. "au BufNewFile,BufRead *.edge setf edge
  538. au BufRead,BufNewFile *.edge set filetype=edge
  539. au BufRead,BufNewFile *.conf set filetype=nginx
  540.  
  541. "
  542. " Maintainer: Bram Moolenaar <Bram@vim.org>
  543. " Last change: 2002 Sep 19
  544. "
  545. " To use it, copy it to
  546. " for Unix and OS/2: ~/.vimrc
  547. " for Amiga: s:.vimrc
  548. " for MS-DOS and Win32: $VIM\_vimrc
  549. " for OpenVMS: sys$login:.vimrc
  550.  
  551. " When started as "evim", evim.vim will already have done these settings.
  552. if v:progname =~? "evim"
  553. finish
  554. endif
  555.  
  556. " Use Vim settings, rather then Vi settings (much better!).
  557. " This must be first, because it changes other options as a side effect.
  558. set nocompatible
  559.  
  560. " allow backspacing over everything in insert mode
  561. set backspace=indent,eol,start
  562.  
  563. if has("vms")
  564. set nobackup " do not keep a backup file, use versions instead
  565. else
  566. set backup " keep a backup file
  567. endif
  568. set history=500 " keep 50 lines of command line history
  569. set ruler " show the cursor position all the time
  570. set showcmd " display incomplete commands
  571. set incsearch " do incremental searching
  572.  
  573. " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
  574. " let &guioptions = substitute(&guioptions, "t", "", "g")
  575.  
  576. " Don't use Ex mode, use Q for formatting
  577. map Q gq
  578.  
  579. " This is an alternative that also works in block mode, but the deleted
  580. " text is lost and it only works for putting the current register.
  581. "vnoremap p "_dp
  582.  
  583. " Switch syntax highlighting on, when the terminal has colors
  584. " Also switch on highlighting the last used search pattern.
  585. if &t_Co > 2 || has("gui_running")
  586. syntax on
  587. set hlsearch
  588. endif
  589.  
  590. " Only do this part when compiled with support for autocommands.
  591. if has("autocmd")
  592.  
  593. " Enable file type detection.
  594. " Use the default filetype settings, so that mail gets 'tw' set to 72,
  595. " 'cindent' is on in C files, etc.
  596. " Also load indent files, to automatically do language-dependent indenting.
  597. filetype plugin indent on
  598.  
  599. " Put these in an autocmd group, so that we can delete them easily.
  600. augroup vimrcEx
  601. au!
  602.  
  603. " For all text files set 'textwidth' to 78 characters.
  604. autocmd FileType text setlocal textwidth=78
  605.  
  606. " When editing a file, always jump to the last known cursor position.
  607. " Don't do it when the position is invalid or when inside an event handler
  608. " (happens when dropping a file on gvim).
  609. autocmd BufReadPost *
  610. \ if line("'\"") > 0 && line("'\"") <= line("$") |
  611. \ exe "normal g`\"" |
  612. \ endif
  613.  
  614. augroup END
  615.  
  616. else
  617.  
  618. set autoindent " always set autoindenting on
  619.  
  620. endif " has("autocmd")
  621. " Metadata: {{{
  622. set nocompatible
  623. set title
  624. let g:Header_name="Yichun Zhang"
  625. let g:Header_email="agentzh@gmail.com"
  626. " }}}
  627. " Encodings: {{{
  628. set termencoding=utf-8
  629. set encoding=utf-8
  630. set fileencodings=utf8,big5-hkscs,utf-8,iso8859-1
  631. set expandtab
  632. set grepprg=grep\ -nH\ $*
  633. " ,gbk,euc-jp,euc-kr,utf-bom,iso8859-1
  634. " }}}
  635. " Terminal: {{{
  636. "noremap Bs Del
  637. "noremap Del Bs
  638. "noremap!Bs Del
  639. "noremap!Del Bs
  640. set bs=2
  641. "noremap! <Del> <BS>
  642. "noremap! <BS> <Del>
  643.  
  644. " insert-mode cursors
  645. "map! OA ka
  646. "map! OB ja
  647. "map! OC lli
  648. "map! OD i
  649.  
  650. " Alt now serves as window commands (^W)
  651. "noremap
  652. "nmap <F8> :TagbarToggle<CR>
  653.  
  654. "set autoindent
  655. "set cindent
  656. set expandtab
  657. set shiftwidth=4
  658. set softtabstop=4
  659. set tabstop=4
  660.  
  661. let $BASH_ENV="~/.bash_aliases"
  662.  
  663. " Show trailing whitepace and spaces before a tab:
  664. "autocmd BufWinEnter * if line2byte(line("$") + 1) > 1000000 | syntax clear | endif
  665.  
  666. highlight WhiteSpaceEOL ctermbg=darkgreen guibg=lightgreen
  667. match WhiteSpaceEOL /\s$/
  668. autocmd WinEnter * match WhiteSpaceEOL /\s$/
  669.  
  670. autocmd BufNewFile,BufRead *.fan set filetype=perl6
  671. set colorcolumn=81
  672.  
  673. highlight ColorColumn ctermbg=8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement