VIM configuration file 20171221

Source: Internet
Author: User
Tags comments define function manual set background
Map <F9>: Call Saveinputdata () <CR> func! Saveinputdata () exec "tabnew" exec ' normal ' +gp ' exec ' w! /tmp/input_data "Endfunc" Youcompleteme set Runtimepath+=~/.vim/bundle/youcompleteme let G:ycm_collect_identifiers_ From_tags_files = 1 "Turn on YCM-based tag engine let g:ycm_collect_identifiers_from_comments_and_strings = 1" "Comment and the contents of the string are also used for Complete let g:syntastic_ignore_files=[". *\.py$"] Let G:ycm_seed_identifiers_with_syntax = 1 "syntax keyword completion let G:YC m_complete_in_comments = 1 Let g:ycm_confirm_extra_conf = 0 let g:ycm_key_list_select_completion = [' <c-n> ', ' <D
Own> '] "map button," No this will intercept tab, resulting in other plug-in tab is not available.                          Let g:ycm_key_list_previous_completion = [' <c-p> ', ' <Up> '] let g:ycm_complete_in_comments = 1 "Let G:ycm_complete_in_strings = 1" In note input can also complement let G:ycm_collect_identifi in string input Ers_from_comments_and_strings = 1 "comments and text in the string will also be earned by the g:ycm_global_ycm_extra_conf= ' ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py ' Let g:ycm_show_diagnostics_ui = 0 "Disable grammar check inoremap <expr> <CR> pumvisible ()?"            \<c-y> ":" \<cr> "|     "Enter to select the current item Nnoremap <c-j>: Ycmcompleter gotodefinitionelsedeclaration<cr>|


"Jump to Definition Let g:ycm_min_num_of_chars_for_completion=2" starts by typing a character from 2nd to list the match "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Let g:ycm_global_ycm_extra_conf= ' ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py ' "Let G: Ycm_global_ycm_extra_conf=0 "ColorScheme torte" ColorScheme Murphy "ColorScheme Desert" ColorScheme Desert "Colorschem E Elflord colorscheme Ron set Completeopt=longest,menu "makes Vim's complement menu behavior consistent with the General IDE (reference VimTip1228) autocmd Insertleave * if PU Mvisible () = = 0|pclose|endif "Automatically closes the preview window after leaving insert mode Inoremap <expr> <CR> pumvisible ()?" \<c-y> ":" \<cr> "" Enter to select the current item "next to the next key behavior will show additional information" Inoremap <expr> <Down> PUMVIsible ()? "\<c-n>": "\<down>" "Inoremap <expr> <Up> pumvisible ()?" \<c-p> ":" \<up> "" Inoremap <expr> <PageDown> pumvisible ()? " \<pagedown>\<c-p>\<c-n> ":" \<pagedown> "" Inoremap <expr> <PageUp> pumvisible ()? " \<pageup>\<c-p>\<c-n> ":" \<pageup> "" "" youcompleteme default tab S-TAB and auto-complete conflict "let G:ycm_key_list_ select_completion=[' <c-n> '] "let g:ycm_key_list_select_completion = [' <Down> ']" "Let G:ycm_key_list_ previous_completion=[' <c-p> ' g:ycm_key_list_previous_completion = [' <Up> '] let G:ycm_confirm_extra_ Conf=0 "off load. ycm_extra_conf.py prompt Let G:ycm_collect_identifiers_from_tags_files=1" turn on ycm tag engine let G:ycm_min_num_of_ chars_for_completion=2 "Start listing matches from 2nd, let g:ycm_cache_omnifunc=0" suppress cache matches, regenerate matches every time let G:ycm_seed_identifiers_ With_syntax=1 "Syntax keyword completion nnoremap <F5>:ycmforcecompileanddiagnostics<cr>" Force RecomileWith syntastic "Nnoremap <leader>lo:lopen<CR>" open locationlist "" Nnoremap &LT;LEADER&GT;LC:LCLOSE&LT;CR > "Close locationlist inoremap <leader><leader> <C-x><C-o>" can be complete in comment input "let G:ycm_complete_ in_comments = 1 "" In the string input can also be complete let g:ycm_complete_in_strings = 1 "comments and text in the string will also be revenue complement" let G:ycm_collect_identifiers_from_ comments_and_strings = 0 "" Nnoremap <leader>jd:ycmcompleter gotodefinitionelsedeclaration<cr> "Jump to Definition" "" Set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936 "Set Termencoding=utf-8" Set Encoding=utf-8 "set fileencodings=ucs-bom,utf-8,cp936 "Set Fileencoding=utf-8" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "" "" "" "" "" "" "" "" "" "" "Set Shortmess=ati" do not show the hint of assistance to Ugandan children at startup "Winpos 5 5" Set window position "set lines=40 Columns=1 55 "Set Window size set go=" Do not graphic button "color AsmanIan2 "Set Background theme" Set Guifont=courier_new:h10:cansi "setting font" syntax on "syntax highlighting autocmd insertleave * se n Ocul "Highlight current line with light autocmd insertenter * se cul" highlight current line set ruler "show ruler set ShowCmd" Come out and see clearly the height of the "set cmdheight=1" command line (under the status line), set to 1 "Set Whichwrap+=<,>,h,l" allows backspace and cursor keys to cross the line boundary (not recommended) "set Scrolloff=3 "The cursor moves to the top and bottom of the buffer, keep 3 lines distance set Novisualbell" Do not blink (do not understand) set statusline=%f%m%r%h%w\ [format=%{&f f}]\ [type=%y]\ [pos=%l,%v][%p%%]\%{strftime (\ "%d/%m/%y\-\%h:%m\")} "status line display contents set Laststatus=1" Start Display status line (1), always display Status line (2) Set foldenable "Allow collapse set foldmethod=manual" manual collapse "set Background=dark" background using black set nocompatible "remove Nasty about VI consistency mode, avoid some bugs and limitations of previous versions "show Chinese help if version >= 603 set HELPLANG=CN set encoding=utf-8 endif" Set color scheme "C Olorscheme Murphy "Font" if (Has ("gui_running")) "Set guifont=bitstream\ vera\ sans\ mono\" endif "" "" "" "" "" "" "" " """""""""""""""""""""""""" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "New File title" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""  [Ch],*.sh,*.java exec]: Call Settitle () "" "Define function Settitle, automatically insert file header func settitle ()" If file type is. sh file if &filetype = = ' sh ' call Setline (1, "\#########################################################################") CA ll append ("."), "\# File Name:". Expand ("%")) call Append (".") +1, "\# author:ma6174") Call Append (".") +2, "\# mail:ma6174@163.com") Call Append (".") +3, "\# Created Time:". Strftime ("%c")) Call Append (".") +4, "\#########################################################################") Call Append (".") +5, "\#!/bin/bash") Call Append (".") +6, "") Else call Setline (1, "/***********************************************************Call Append ("."), "> File Name:". Expand ("%")) call Append (".") +1, "> Author:lgj") Call Append (".") +2, "> mail:liang_gj18@163.com") Call Append (".") +3, "> Created time:". Strftime ("%c")) Call Append (".") +4, "************************************************************************/") Call Append (".") +5, "") endif if &filetype = = ' cpp ' Call append (".") +6, "#include <iostream>") Call Append (".")
        +7, "using namespace std;") Call Append (".") +8, "") Call Append (".") +9, "int main (void)") Call Append (".") +10, "{") Call Append (".") +11, "") Call Append (".")

        +12, "cout <<\" ********system start***********\ "<< Endl;") Call Append (".")

        +13, "return 0;") Call Append (".")
        +14, "}") endif if &filetype = = ' C 'Call Append (".") +6, "#include <stdio.h>") Call Append (".") +7, "") Call Append (".") +8, "int main (int argc, char *argv[])") Call Append (".") +9, "{") Call Append (".") +10, "") Call Append (".")
        +11, "printf (\" \\r\\n********systerm start **************\\r\\n\ ");") Call Append (".") +12, "") Call Append (".")
        +13, "printf (\" \\r\\n********systerm finish **************\\r\\n\ ");") Call Append (".")

        +14, "return 1;") Call Append (".") +15, "}") endif "if &filetype = = ' java '" Call Append (".") +6, "public class". Expand ("%")) "Call Append (". ") +7, "") "endif" new file, automatically navigates to the end of file autocmd bufnewfile * Normal G Endfunc "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " """"""""""""""""""""""""""""""""""""""""""""""""""""""""" "" "" "Nmap <leader>w:w!<cr> nmap <leader>f:find<cr>" Map Select all + Copy CTRL + a map <C-A> ggvgy ma P! <C-A> <esc>ggvgy Map <F12> gg=g "Select Ctrl + C copy vmap <C-c>" +y "Go to Empty line Nnoremap <F2>: g/^\s *$/d<cr> "Compare files Nnoremap <C-F2>: Vert diffsplit" new label map <M-F2>:tabnew<cr> "List current directory file Ma P <F3>: Tabnew .<cr> "Open tree file directory map <C-F3> \be" c,c++ run map by F5 compile <F5>: Call COMPILERUNGCC () & Lt Cr> func! COMPILERUNGCC () Exec "W" if &filetype = = ' C ' exec "!g++%-o%<" exec "! ./%<" Elsei 
        F &filetype = = ' cpp ' EXEC "!g++%-o%<" exec "! ./%<" elseif &filetype = = ' java ' Exec "!javac%" exec "!java%<" elseif &filetype = = ' sh ':!. /% ElseIf &filetype = = ' py ' exec '!python% ' exec '!python%< ' endif endfunc ' c,c++ debug map
<F8>: Call Rungdb () <CR>func! Rungdb () Exec "W" exec "!g++%-g-o%<" exec "!gdb ./%<" Endfunc "" "" "
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.