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

    vim 配置c++编辑器环境

    set nocompatible "去掉讨厌的有关vim一致性模式,避免以前版本的一些bug和局限.
    set number "显示行号.
    set ruler "显示当前光标的行列信息
    syntax on "语法高亮显示.(这个肯定是要的.)
    set background=dark "背景颜色暗色.(我觉得不错,保护眼睛.)
    set history=50 "设置命令历史记录为50条.
    set hls "寻找匹配是高亮度显示的
    set lbr "不在单词中间断行。
    set fo+=mB "打开断行模块对亚洲语言支持
    set backspace=indent,eol,start "
    set tabstop=4 "设置tab键为4个空格.
    set shiftwidth=4 "设置当行之间交错时使用4个空格
    set whichwrap=b,s,<,>,[,] "
    filetype on "检测文件的类型
    set autoindent "使用自动对起,也就是把当前行的对起格式应用到下一行.
    set smartindent "依据上面的对起格式,智能的选择对起方式,对于类似C语言编.
    set showmatch "设置匹配模式,显示括号配对情况。
    set cin " 打开 C/C++ 风格的自动缩进。
    set cino=:4g4t4(sus "设定 C/C++ 风格自动缩进的选项
    set vb t_vb= "当vim进行编辑时,如果命令错误,会发出一个响声,该设置去掉响
    set incsearch  "搜索时在未完全输入完毕要检索的文本时就开始检索。
    filetype plugin indent on "开启了Vim的三种智能:自动识别文件类型、
    autocmd FileType text setlocal textwidth=78
    autocmd BufReadPost *
      if line("°"")>0&&line("°"")<=line("$")|
        exe "normal g`""|
      endif
    highlight Search term=reverse ctermbg=4 ctermfg=7
    highlight Normal ctermbg=black ctermfg=white "
    highlight Comment ctermfg=Cyan "
    set completeopt=longest,menu "
    set tags=../tags
    set tags=tags
    " 用空格键来开关折叠
    set foldenable "
    set foldmethod=manual "
    nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
    "if has(“vms”)
    "" set nobackup
    "else
    "" set backup

    文件下载:http://files.cnblogs.com/files/lwngreat/vimrc.rar

    2.搜索头文件路径的添加方法(添加include目录):

    在Home目录下的.bashrc或.bash_profile里增加下面的内容

    #在PATH中找到可执行文件程序的路径 冒号分割多个目录
    export PATH =$PATH:$HOME/bin
    #gcc找到头文件的路径
    C_INCLUDE_PATH=/usr/include/libxml2:/MyLib
    export C_INCLUDE_PATH
    #g++找到头文件的路径
    CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/pcl:/home/dell/include
    export CPLUS_INCLUDE_PATH
    #找到动态链接库的路径
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    #找到静态库的路径
    LIBRARY_PATH=$LIBRARY_PATH
    export LIBRARY_PATH

     

  • 相关阅读:
    使用cmd命令行窗口操作SqlServer
    .net core compatibility windows & windows compatible Linux
    Microsoft Azure Tutorial: Build your first movie inventory web app with just a few lines of code
    Running ASP.NET Core applications on Windows Subsystem for Linux
    Simple Use IEnumerable<T>
    JSON in SQL Server 2016
    [开源 .NET 跨平台 Crawler 数据采集 爬虫框架: DotnetSpider] [一] 初衷与架构设计
    NotBacon
    Create an Azure SQL database in the Azure portal
    Cisco IP 电话 将它的voice mail 发送到手机
  • 原文地址:https://www.cnblogs.com/lwngreat/p/4708061.html
Copyright © 2011-2022 走看看