zoukankan      html  css  js  c++  java
  • vim配置文件

    简单记录一下自己的vim配置文件

    整体vim的设置值一般放置在  /etc/vimrc 文件中,不过不建议修改整体设置

    可自行创建.vimrc文件

    文件名是 .vimrc,在个人目录下,运行命令 ll -ah ,即可看到隐藏文件

     1 "Use vundle to manage plugin,required turn file type off and nocompatible"
     2 "filetype off
     3 "set nocompatible
     4 "set rtp+=~/.vim/bundle/vundle
     5 "call vundle#rc()
     6 "Let vundle manage vundle,required"
     7 "Bundle 'gmarik/vundle'
     8 "My bundles here":
     9 "Bundle 'altercation/vim-colors-solarized'
    10 "Brief help of vundle
    11     ":BundleList
    12     ":BundleInstall
    13     ":BundleSearch
    14     ":BundleClean
    15     ":help vundle
    16 "End brief help
    17 
    18 "Show line number,command,status line and so on"
    19 set history=1000
    20 set ruler
    21 set number
    22 set showcmd
    23 set showmode
    24 set laststatus=2
    25 set cmdheight=1
    26 set scrolloff=2
    27 
    28 "Fill space between windows" "在被分割的窗口间显示空白,便于阅读  
    29 set fillchars=stl: ,stlnc: ,vert:
    30 
    31 "Turn off annoying error sound"
    32 set noerrorbells
    33 set novisualbell
    34 set t_vb=
    35 
    36 "Turn off splash screen"
    37 set shortmess=atI
    38 
    39 "syntax adn theme"
    40 syntax enable " 打开语法高亮  
    41 syntax on " 允许按指定主题进行语法高亮,而非默认高亮主题  
    42 colorscheme desert
    43 set background=dark
    44 set cursorline
    45 set cursorcolumn
    46 
    47 "Configure backspace to be able to across two lines"
    48 set backspace=2
    49 set whichwrap+=<,>,h,l
    50 
    51 "Tab and indent"
    52 set expandtab
    53 set smarttab
    54 set shiftwidth=4
    55 set tabstop=4
    56 set softtabstop=4           " 统一缩进为4 
    57 set autoindent              " 设置自动缩排
    58 set cindent
    59 
    60 "Files,backups and encoding"
    61 set nobackup                " 不自动保存备份文件
    62 set noswapfile
    63 set autoread
    64 set autowrite
    65 set autochdir
    66 set fileencodings=utf-8
    67 set fileformats=unix,dos,mac
    68 filetype plugin on
    69 filetype indent on
    70 set fenc=utf-8
    71 set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
    72 
    73 "Text search and replace"
    74 set showmatch " 高亮显示匹配的括号
    75 set matchtime=2 " 匹配括号高亮的时间(单位是十分之一秒)
    76 set hlsearch    " 高亮显示查找搜索的值
    77 set incsearch " 在搜索时,输入的词句的逐字符高亮(类似firefox的搜索)  
    78 set ignorecase
    79 set smartcase
    80 set magic
    81 set lazyredraw
    82 set nowrapscan " 搜索时,不循环搜索
    83 set iskeyword+=_,$,@,%,#,-,.
    84 
    85 "Gvim config"
    86 if has("gui_running")
    87     colorscheme solarized
    88 endif
    89 set guifont=DejaVu Sans Mono 15
    90 set guioptions=aegic
  • 相关阅读:
    20200318
    20200317
    Thinkphp 操作多个数据库
    base格式图片转文件存储
    Thinkphp POST 和 GET 传值
    Thinkphp调用微信扫一扫实例,学会再也不怕客户在微信提的奇葩要求了
    centos 安装ngnix mysql php
    PHP 区分微信、支付宝、QQ扫码
    PHP秒数计算时分秒
    Thinkphp 获取访问者的ip
  • 原文地址:https://www.cnblogs.com/fanfan259/p/4428122.html
Copyright © 2011-2022 走看看