首页 > 其他 > 详细

备份.vimrc

时间:2014-05-09 23:20:39      阅读:481      评论:0      收藏:0      [点我收藏+]

经过不懈努力,终于把vi搞的有点人样了,现在备份.vimrc

奶奶的,新手们啊,血的教训啊,如果说一寸光阴一寸金的话,那么我已经失去了很多金了

提请你们,当出现不是vim命令^M,你们可以set fileformats=unix,但是前辈提醒你,你一定不要向我一样偷懒粘贴复制,一定要用手打进去,然后再去删除^M

 

" This is my _vimrc under windows platform
" and it can be used on *nix too
" all the difference of them is the font setting session
" happy Viming,
" copyLeft (#) Abruzzi John
set linebreak " line break
set nocompatible " no compatible
set history=400 " history
set ruler "没办法了,只能这么去掉^M了
set number " line number
set hlsearch " highlight search
set noincsearch " no in C search
set expandtab " expand table
set t_vb= "close bell
set foldmethod=marker "没办法了,只能这么去掉^M了
set tabstop=4 " table step
set shiftwidth=4 "没办法了,只能这么去掉^M了
set nobackup " don‘t backup
set smarttab " smart table
set smartindent " smart indent
set autoindent " auto indent
set cindent "cindent
set cursorline " hightlight cursor line 高亮光标所在行
set cursorcolumn "没办法了,只能这么去掉^M了
set fileformats=unix "没办法了,只能这么去掉^M了
" set the back space
set backspace=indent,eol,start "这行比较重要,刚接触vim的朋友会发现有时候backspace键删不了文字
"没办法了,只能这么去掉^M了
colorscheme desert " color scheme

let Tlist_Use_Right_Window=0 " for tag_list plugin only
let Tlist_File_Fold_Auto_Close=1 " for tag_list plugin only

let g:winManagerWindowLayout="FileExplorer|TagList" " for winmanager

filetype plugin indent on " filetype setting
set completeopt=longest,menu " for code complete

" the following function is used for show the status bar on the buttom
function! CurrectDir()
let curdir = substitute(getcwd(), "", "", "g")
return curdir
endfunction
set statusline=\ [File]\ %F%m%r%h\ %w\ \ [PWD]\ %r%{CurrectDir()}%h\ \ %=[Line]\ %l,%c\ %=\ %P

" this is a setting of font
if has("win32")
set guifont=Courier_New:h10:cANSI
endif
" make sure that syntax always on
if exists("syntax_on")
syntax reset
else
syntax on
endif


" java complete
if has("autocmd")
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let performance_mode=1

function MySys()
if has("win32")
return "win32"
elseif has("unix")
return "unix"
else
return "mac"
endif
endfunction

if MySys() == "unix" || MySys() == "mac"
set shell=bash
else
" set win32 shell
endif

" set auto read when file is changed from outside
if exists("&autoread")
set autoread
endif

" enable the mouse
if exists("&mouse")
set mouse=a
endif

" set mapleader
let mapleader=","
let g:mapleader=","

"fast saving
nmap <leader>x :xa!<cr>
nmap <leader>w :w!<cr>

"switch to current directory
map <leader>cd :cd %:p:h<cr>

" just for fun
map <F9> ggVGg?

" folding code
if exists("&foldenable")
set fen
endif

if exists("&foldlevel")
set fdl=0
endif
" tag list -
map <F3> :Tlist<cr>
"remove the windows ^ windows系统中常常可以看到文本中夹杂着^M这样的控制字符,用此命令删除之
"noremap <leader>m :%s/

备份.vimrc,布布扣,bubuko.com

备份.vimrc

原文:http://www.cnblogs.com/zhaoshuireshui/p/3718785.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!