Home > OS >  Ubuntu 18.04 vim mapping
Ubuntu 18.04 vim mapping

Time:11-25

"Shift the enter, the next line input
Inoremap & lt; S - cr>
"CTRL enter, end-of-line
Inoremap & lt; C - cr> A

Don't know why these two keys in ubuntu18.04 mapping out

All vimrc:
"================================================================
"The Author: Dgimo
"================================================================

"Close the compatibility mode, by default, Vim will compatible Vi mode, so be sure to shut down.
The set nocompatible


"================================================================
"Environment determine
"================================================================
"Judgment is a Windows or Linux.
Let g: isWindows=0
Let g: isLinux=0
If (from (" win32 ") | | has (" win64 "))
Let g: isWindows=1
The else
Let g: isLinux=1
Endif
"Judgment is a terminal or gVim
Let g: isGUI=1
If has (" gui_running ")
Let g: isGUI=1
The else
Let g: isGUI=0
Endif


"================================================================
"GVim original configuration
"================================================================
If (g: isWindows)
"Load some default configuration
The source $VIMRUNTIME/vimrc_example vim
"Imitate Windows shortcuts, such as CTRL - s, ctrl-c, CTRL - v, etc.
The source $VIMRUNTIME/mswin vim
"To imitate the behavior of the Windows, this line is very important, no this line, maximize often out of the question.
Concerns mswin
Elseif (g: isLinux)
If (g: isGUI)
"The Source of a global configuration file if the available
If filereadable ("/etc/vim/gvimrc. Local ")
The source/etc/vim/gvimrc. Local
Endif
The else
Set the mouse=a "enabling the mouse in any mode
Opening in terminal set t_Co=256 "256
Set backspace=2 "setting the backspace key available
"The Source of a global configuration file if the available
If filereadable ("/etc/vim/vimrc. Local ")
The source/etc/vim/vimrc. Local
Endif
Endif
Endif


"================================================================
"The UI and the basic configuration
"================================================================
"Set font
If (g: isWindows)
The set guifont=Consolas: h11
Elseif (g: isLinux)
The set guifont=Monospace \ Regular \ 14
Endif

"GUI Settings
If (g: isGUI)
"Shut down menu
The set guioptions -=m
"Close the toolbar
The set guioptions -=T
"Shut down the scroll bar on the left
The set guioptions -=L
"Close the scroll bar on the right side
The set guioptions -=r
"Starts to maximize
Autocmd GUIEnter * simalt ~ x
Endif

"Only when needed to redraw interface (for example, during the implementation of the macro do not need to be redrawn interface)
The set lazyredraw
"When an error occurs not ring, also not flicker
The set noerrorbells
The set belloff=all

"Keep equal split window width/height
The set equalalways
"Vertical split open on the right
The set splitright
"The level of the split, below open
The set splitbelow
"Global copy-and-paste
Set the clipboard=unnamedplus

"================================================================
"Code
"================================================================
"Setting vim internal encoding
The set encoding=utf-8
"Setting the edit file encoding
The set fileencoding=utf-8
"Setting Vim can identify coding
Set fileencodings=ucs - bom, utf-8, cp936, gb18030, gb2312, big5, cuc - jp, cuc - kr, Latin
"Set up the terminal mode (non-gui) under the code
The set termencoding=utf-8
"To prevent special symbol cannot show
The set ambiwidth=double
"To address the console output garbled
Language messages zh_CN. Utf-8


"================================================================
"Relevant configuration file
"
"For an explanation of backup files: backup files, temporary files, undo file, the best approach is to put the
"They configuration to a separate folder, I temporarily here don't let the generation, later can according to need to modify.
For example:
""Set the directory=~/vim/. SWP//
"Set backupdir=~/vim/backup//
"Set undodir=~/vim/. Undo//
"Pay attention to the two way//, said the absolute path to the file name to use
"================================================================
"Automatically detect file types and the indentation, and depending on the type of file loading plug-ins
Filetype plugin indent on
After "file is external changes, automatic loading
The set autoread
"Don't generate backup file
The set nobackup
"Don't generate temporary files
The set noswapfile
"Don't generate undo file
The set noundofile


"================================================================
"The editor configuration
"================================================================
"Shows the line number
The set number
"Show syntax highlighting
Syntax enable
Syntax on
"The show TAB (& gt; -), space (^), line (?)
Set a list
The set listchars=TAB: & gt; -, trail: ^ ", eol:?
Highlight the current line
"The set cursorline
"Open automatically indent
The set autoindent
"Smart indentation
The set smartindent

"Edit to press the Tab key is equal to the input four Spaces
The set tabstop=4
"When formatting the indentation size for 4 Spaces
Set shiftwidth=4
"Make Vim saw continuous space as a Tab and delete can delete one at a time when the number of Spaces Tab
The set softtabstop=4
"Convert tabs to more Spaces, specific Spaces quantity reference tabstop and shiftwidth
The set expandtab
"The beginning of the line segment and the use of Tab
The set smarttab

"Merger of two lines in Chinese, not in the middle add space
The set formatoptions +=B
"Merge rows do not add extra space
The set nojoinspaces


"================================================================
"Search and matching
"================================================================
"Highlighting the matching brackets
The set showmatch
"Highlighting the search keyword
The set hlsearch
"Instant search
The set incsearch
"Intelligence is case sensitive, as long as there is a letter, is case sensitive, otherwise not sensitive
The set ignorecase smartcase


nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related