我的vimrc和gvimrc配置

vimrc:

" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim

" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
set tags=tags;
set autochdir




hi Normal ctermbg=Black  ctermfg=White
set cursorline  
"hi CursorLine cterm=NONE ctermbg=0 ctermfg=Green

"color  murphy

set number
set cindent
set autoindent
set ruler
set tabstop=8
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
if has("syntax")
  syntax on
endif

" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark

" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif

" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
"  filetype plugin indent on
"endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd		" Show (partial) command in status line.
"set showmatch		" Show matching brackets.
"set ignorecase		" Do case insensitive matching
"set smartcase		" Do smart case matching
"set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make
"set hidden             " Hide buffers when they are abandoned
"set mouse=a		" Enable mouse usage (all modes)

" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

let g:neocomplcache_enable_at_startup = 1

gvimrc:

if has("gui_gtk2")
set guifont=DejaVu\ Sans\ Mono\ 11                                  
elseif has("gui_macvim")
set guifont=DejaVu_Sans_Mono:h11
elseif has("gui_win32")
set guifont=DejaVu_Sans_Mono:h11
end

" Make external commands work through a pipe instead of a pseudo-tty
"set noguipty

"set guifont=DejaVu_Sans_mono:h11
hi Normal guibg=White guifg=Black  
hi "LineNr guibg=#003366 guifg=#99ccff ctermbg=7777 ctermfg=blue  
set cursorline  
hi CursorLine cterm=NONE ctermbg=Black ctermfg=white
" You can also specify a different font, overriding the default font
"if has('gui_gtk2')
"  set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
"else
"  set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
"endif

" If you want to run gvim with a dark background, try using a different
" colorscheme or running 'gvim -reverse'.
" http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/ has examples and
" downloads for the colorschemes on vim.org

" Source a global configuration file if available
if filereadable("/etc/vim/gvimrc.local")
  source /etc/vim/gvimrc.local
endif


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"-------------------------------------------------------------------------------- " 一般设定 "-------------------------------------------------------------------------------- set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1 set encoding=utf-8 set termencoding=cp936 language messages zh_CN.UTF-8 "解决输出乱码 source $VIMRUNTIME/delmenu.vim "解决菜单乱码 source $VIMRUNTIME/menu.vim "解决consle输出乱码 set nocompatible " 不要使用vi的键盘模式,而是vim自己的 set history=100 " history文件中需要记录的行数 set clipboard+=unnamed " 与windows共享剪贴板 set viminfo+=! " 保存全局变量 set iskeyword+=_,$,@,%,#,- " 带有如下符号的单词不要被换行分割 syntax on " 语法高亮 set cursorline " 突出显示当前行 nnoremap c:set cursorline! cursorcolumn! "set cursorline "au! Cursorhold *exe 'match CurrentLine ^%'. line('.').'l.*/' "set ut=100 set nu! " 显示行号 set scrolloff=5 " 在光标接近底端或顶端时,自动下滚或上滚 "hi Comment ctermfg=DarkCyan "修改默认注释颜色 ":highlight OverLength ctermbg=red ctermfg=white guibg=red guifg=white ":match OverLength '\1v.*' " 高亮字符,让其不受100列限制 highlight StatusLine guifg=SlateBlue guibg=Yellow " 状态行颜色 highlight StatusLineNC guifg=Gray guibg=White " 状态行颜色 set laststatus=2 " 进入插入模式时改变状态栏颜色(仅限于Vim 7) if version >= 700 au InsertEnter * hi StatusLine guibg=#818D29 guifg=#FCFCFC gui=none au InsertLeave * hi StatusLine guibg=Yellow guifg=SlateBlue gui=none endif if has("gui_running") "au GUIEnter * simalt ~x " 窗口启动时自动最大化 "set guioptions-=m " 隐藏菜单栏 "set guioptions-=T " 隐藏工具栏 "set guioptions-=L " 隐藏左侧滚动条 "set guioptions-=r " 隐藏右侧滚动条 "set guioptions-=b " 隐藏底部滚动条 "set showtabline=0 " 隐藏Tab栏 endif "-------------------------------------------------------------------------------- " 配色方案(按照当前时间的秒数的个位数决定使用哪个方案) "-------------------------------------------------------------------------------- if (strftime("%S")-floor(strftime("%S")/1

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值