• 我的vi 启动配置文件


    VI帮助文档    http://vimdoc.sourceforge.net/htmldoc/usr_toc.html

    1) ================================

    set nocompatible " 不使用vi默认键盘布局
    set number " 显示行号
    set autoindent " 自动对齐
    set smartindent " 智能对齐
    set showmatch " 括号匹配模式
    set ruler " 显示状态行
    set incsearch " 搜索时一边输入一边显示效果
    set tabstop=4 " tab键为4个空格
    set shiftwidth=4
    set softtabstop=4
    set cindent " C语言格式对齐
    set nobackup " 不要备份文件
    set clipboard+=unnamed " 与windows共享剪贴板

    2)==================================

    """"""""""""""""""""""""""""""""""
    "configure file for program's vim.
    "From net.
    "Edit in 2008.6.17
    """"""""""""""""""""""""""""""""""
    "no compatible with previous version.
    set nocompatible

    "show line number.
    set number

    "ctags setting
    set tags=tags;
    " set autochdir
    "set tags=/home/desktop/fh35_Gemini_DVS/source/tags
    "set tags=/home/desktop/fh35_Gemini_DVS/source/goahead/tags
    "set tags=/home/desktop/fh35_Gemini_DVS/source/kernel/linux/tags

    "detect file type.
    filetype on

    "background color.
    set background=light

    "syntax hightlighting.
    syntax enable

    set hlsearch

    "enable mouse.
    set mouse=a

    "the following setting is used for format when writting code.
    set autoindent
    set smartindent
    set cindent

    set tabstop=4
    set shiftwidth=4

    "match () and {}
    set showmatch

    "show current mode
    set showmode

    "remove toolbar of GUI version vim.
    "set guioption-=T

    "remove belling when command error.
    set vb t_vb=

    "show cursor position status in lowleft corner.
    set ruler

    "close hight lighting search.
    "set nohls

    "realtime search word.
    set incsearch

    "auto backup when file changed,as FILENAME~
    "if has("vms")
    set nobackup
    "else
    "set backup
    "endif

    "Word encodeing.
    "set fenc=chinese
    "set enc=gb2312
    "set fenc=gb2312
    "set fencs=gb2312,utf-8,gbk,gb18030

    "status line content
    set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [HEX=0x\%B]\ [POS=%l,%v][%p%%]\ [%{strftime(\"%y/%m/%d\-\%H:%M\")}]

    "always show status line.
    set laststatus=2

    "set mapleader.
    let mapleader="/"
    let g:mapleader="/"

    map <leader>1 :buffer 1<cr>
    map <leader>2 :buffer 2<cr>
    map <leader>3 :buffer 3<cr>
    map <leader>4 :buffer 4<cr>
    map <leader>ls :buffers<cr>

    map <leader>w :w<cr>

    map <F5> :! make<cr>

  • 相关阅读:
    modesim仿真
    EP3C系列FPGA的JTAG检测不了,JTAG下载失败,AS可以下载,下载完成后不执行程序
    本机修改虚拟机linux中的代码文件
    linux中的diff命令
    php中的elseif和else if
    php将数据写入另外一个文件
    IE6下的png不透明问题
    cookie的封装
    php从接口获取数据转成可以用的数组或其他(含转换编码)
    如何让后加载的元素被一开始就有的css样式渲染成功(强制提升css优先级)
  • 原文地址:https://www.cnblogs.com/bluebbc/p/2513392.html
Copyright © 2020-2023  润新知