• vim配置


     1 let list_Ctags_Cmd='/bin/ctags'
     2 let Tlist_Auto_Open=1
     3 let Tlist_Show_One_File=1
     4 let Tlist_OnlyWindow=0
     5 let Tlist_Use_Right_Window=0
     6 let Tlist_Sort_Type='name'
     7 let Tlist_Exit_OnlyWindow=1
     8 let Tlist_Show_Menu=1
     9 let Tlist_Max_Submenu_Items=10
    10 let Tlist_Max_Tag_length=20
    11 let Tlist_Use_SingleClick=0
    12 let Tlist_Close_On_Select=0
    13 let Tlist_File_Fold_Auto_Close=1
    14 let Tlist_GainFocus_On_ToggleOpen=0
    15 let Tlist_Process_File_Always=1
    16 let Tlist_WinHeight=10
    17 let Tlist_WinWidth=30
    18 let Tlist_Use_Horiz_Window=0
    19 let Tlist_Compact_Format=1
    20 let Tlist_Display_Prototype=1
    21 let &termencoding=&encoding
    22 
    23 nnoremap <silent> <F3> :Grep<CR>    "按键映射
    24 nnoremap <silent> <F8> :Tlist<CR>   "按键映射
    25 nnoremap <silent> <F9> :set paste<CR>   "设置粘贴模式
    26 nnoremap <silent> <F12> :set nopaste<CR>    "取消粘贴模式
    27 
    28 "OmniCppComplete 补全
    29 set nocp
    30 filetype plugin on  
    31 
    32 "代码补全
    33 set completeopt=preview,menu
    34 inoremap ( ()<ESC>i
    35 inoremap [ []<ESC>i
    36 inoremap { {}<ESC>i
    37 "inoremap < <><ESC>i 
    38 inoremap " ""<ESC>i
    39 inoremap ' ''<ESC>i
    40 
    41 filetype plugin indent on
    42 "打开文件类型检测, 加了这句才可以用智能补全
    43 set completeopt=longest,menu
    44 
    45 set completeopt=menu,menuone
    46 let OmniCpp_MayCompleteDot=1    "  打开  . 操作符
    47 let OmniCpp_MayCompleteArrow=1  "打开 -> 操作符
    48 let OmniCpp_MayCompleteScope=1  "打开 :: 操作符
    49 let OmniCpp_NamespaceSearch=1   "打开命名空间
    50 let OmniCpp_GlobalScopeSearch=1
    51 let OmniCpp_DefaultNamespace=["std"]
    52 let OmniCpp_ShowPrototypeInAbbr=1  "打开显示函数原型
    53 let OmniCpp_SelectFirstItem = 2 "自动弹出时自动跳至第一
    54 
    55 "线对齐
    56 let g:indent_guides_auto_colors = 0
    57 let g:indent_guides_guide_size = 1
    58 "let g:indent_guides_enable_on_vim_startup=1
    59 autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  guibg=red   ctermbg=3
    60 autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4
    61 hi IndentGuidesOdd guibg=red ctermbg=3
    62 hi IndentGuidesEven guibg=green ctermbg=4
    63 
    64 set tags+=/root/桌面/s3_tank/s3_tank/tank_trunk/tags
    65 
    66 "启用鼠标,按住shift,选择,复制,粘贴
    67 "if has('mouse') 
    68 "   set mouse=a     
    69 "endif
    70 
    71 set tabstop=4
    72 set cindent
    73 set fileencodings=utf-8,gbk
    74 set tags=tags;
    75 set autochdir
    76 syntax enable
    77 set showmatch
    78 set si
    79 set autowrite
    80 set shiftwidth=4    " 换行拆入4个字符宽
    81 set pastetoggle=<F11>   "F11 绑定set paste
    82 
    83 
    84 if &term=="xterm"
    85   set t_Co=8
    86   set t_Sb=^[[4%dm
    87   set t_Sf=^[[3%dm
    88 endif
    89 " 映射全选+复制 ctrl+a
    90 "map <C-A> ggVGY
    91 "map! <C-A> <Esc>ggVGY
    92 
    93 "map <F12> gg=G
    94 "选中状态下 Ctrl+c 复制
    95 "vmap <C-c> "+y
  • 相关阅读:
    Kafka Streams演示程序
    大全Kafka Streams
    简介Kafka Streams
    初识Kafka
    面试常考各类排序算法总结.(c#)
    php程序员的成长之路
    web前端研发工程师编程能力成长之路
    CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3
    【转】OkHttp使用进阶 译自OkHttp Github官方教程
    排序算法一:桶排序
  • 原文地址:https://www.cnblogs.com/chris-cp/p/3964605.html
Copyright © 2020-2023  润新知