标签:
"vimrc配置 map <F5> :call CompileRunGcc()<CR> " 按F5键根据文本后缀启动相应程序 func! CompileRunGcc() exec "w" if &filetype == ‘c‘ exec "!g++ % -o %<" exec "! ./%<" elseif &filetype == ‘cpp‘ exec "!g++ % -o %<" exec "! ./%<" elseif &filetype == ‘java‘ exec "!javac %" exec "!java %<" elseif &filetype == ‘sh‘ :!./% elseif &filetype=="html" exec "! firefox %" endif endfunc :nmap <silent> <Leader>i <Plug>IndentGuidesToggle filetype on "侦测文件类型 filetype plugin indent on " 载入文件类型插件 filetype indent on "为特定文件类型载入相关缩进文件 map <F3> :NERDTreeMirror<CR> "按F3启本资源管理脚本 map <F3> :NERDTreeToggle<CR> let g:SuperTabDefaultCompletionType = "<c-x><c-o>" "按Tab键自动补全 "let g:indent_guides_enable_on_vim_startup=1 " let g:indent_guides_start_level=2 " let g:indent_guides_guide_size=1 " set fileencodings=utf-8,gbk,gb18030,utf-16,big5 "依次检测使用文本编码 set fileencoding=gbk "set encoding=utf-8 set nocompatible "不要使用vi的键盘模式,而是vim自己的 set incsearch "开启实时搜索功能 set ignorecase " 搜索时大小写不敏感 set nocompatible "关闭兼容模式 set wildmenu "vim命令行模式补全 set laststatus=2 "总显示状态栏 set nowrap "不自动换行 set expandtab set tabstop=4 set shiftwidth=4 set softtabstop=4 "set foldmethod=indent set foldmethod=syntax " 基于缩进或语法进行代码折叠 set nofoldenable "启动 vim 时关闭折叠代码 set guioptions-=T " 禁止显示工具条 set guioptions+=b set guioptions-=m set shortmess=atI "不显示援助乌干达儿童 syntax on syntax enable map <c-c> "+y map <c-d> "+p if strftime("%H")>=16||strftime("%H")<8 "早上8点到16点用 Tomorrow主题 其他用solarized主题 "set guifont=宋体\ 13 "set guifont=yaHei\ Consolas\ Hybrid\ 13 set guifont=Monaco\ 12 "set guifont=Bitstream\ Vera\ Sans\ Mono\ 12 "set background=dark colorscheme railscasts "solarized \"molokai let g:Powerline_colorscheme=‘solarized256‘ else colorscheme Tomorrow set guifont=YaHei\ Consolas\ Hybrid\ 13 endif startinsert "启用时使用插入模式 exec "cd /home/fhw360/桌面" set showcmd
标签:
原文地址:http://www.cnblogs.com/fhw360/p/4265795.html