Created
November 29, 2016 01:46
-
-
Save SuoXC/5c15fc2dbd5b4b246d01b046d2684cef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"原生设置 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
filetype on | |
filetype indent on | |
filetype plugin on | |
filetype plugin indent on | |
"set foldmethod=syntax "set default foldmethod | |
set foldminlines=10 | |
"manual | |
"indent | |
"expr | |
"syntax | |
"diff | |
"marker | |
" | |
"zi 打开关闭折叠 | |
"zv 查看此行 | |
"zm 关闭折叠 | |
"zM 关闭所有 | |
"zr 打开 | |
"zR 打开所有 | |
"zc 折叠当前行 | |
"zo 打开当前折叠 | |
"zd 删除折叠 | |
"zD 删除所有折叠 | |
"默认使用中文帮助 | |
"set helplang=cn | |
"不使用vi兼容 | |
set nocp | |
"历史记录数量 | |
set history=100 | |
"弹出确认 | |
set confirm | |
"语法检测开启 | |
syntax on | |
"行号 | |
set number | |
"set relativenumber | |
"设置配色方案 | |
colo koehler | |
"colo molokai | |
"colo solarized | |
"set background=light | |
"设置搜索结果高亮和增量搜索 | |
set hlsearch | |
set incsearch | |
"显示标尺 | |
set ruler | |
"caseinsensitive when searching | |
set ignorecase | |
set smartcase | |
set showmatch " show maching ()... | |
set ai " auto indent | |
set smartindent | |
set cindent | |
set smarttab | |
"set textwidth=80 | |
"set columns=80 | |
" tab translate to 4 space | |
set expandtab | |
set shiftwidth=4 | |
set tabstop=4 | |
"set formatoptions+=tcarmM | |
"backspace enable | |
set backspace=2 | |
"noback up,noswapfile | |
set nobackup | |
set noswapfile | |
"don't show the welcom ui | |
set shortmess=atI | |
"command line height | |
set cmdheight=1 | |
"font setting | |
"set guifont=Monospac821_BT:h11 | |
set guifont=Consolas:h12 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"编码设置 | |
set encoding=utf-8 | |
set fileencodings=utf-8,chinese,latin-1 | |
if has("win32") | |
set fileencoding=chinese | |
else | |
set fileencoding=utf-8 | |
endif | |
"解决菜单乱码 | |
source $VIMRUNTIME/delmenu.vim | |
source $VIMRUNTIME/menu.vim | |
"解决consle输出乱码 | |
language messages zh_CN.utf-8 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"光标上下两侧最少保留的屏幕行数 | |
"set scrolloff=1 | |
"set magic | |
"当文件更改时自动更新 | |
set autoread | |
"翻页设置 | |
nmap <C-k> <C-u> | |
nmap <C-j> <C-d> | |
"buffexplorer key map | |
nmap <F4> :bp<CR> | |
"search in project | |
"map <F5> :Ack | |
nmap <F5> :vimgrep/ | |
"wrap line moving | |
nmap j gj | |
nmap k gk | |
"nmap <SPACE> <C-F> | |
"nmap <S-Space> <C-B> | |
nmap <C-q> "*p | |
imap <C-l> <right> | |
imap <C-h> <left> | |
nnoremap Y y$ | |
"brackets completion | |
"imap ( ()<left> | |
"imap [ []<left> | |
"imap ) <right> | |
"imap ] <right> | |
imap {<Enter> {<Enter>}<Esc>O | |
"强制文件编码 | |
nmap <F12> :set fileencoding=utf-8<CR> | |
"默认打开位置和大小,GUI设置 | |
if has("gui_running") | |
"au GUIEnter * simalt ~x | |
"au GUIEnter * winpos 683 0 | |
winpos 400 200 | |
set lines=40 columns=105 | |
set guioptions-=T | |
set showtabline=1 | |
endif | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"插件设置 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"complete | |
set completeopt=menu | |
"for pathogen | |
call pathogen#infect() | |
"for supertab | |
"let g:SuperTabDefaultCompletionType = "context" | |
"let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>" | |
"for snipmate | |
"let g:SuperTabMappingForward="<tab>" | |
"for select and search | |
let g:select_and_search_active = 1 | |
"for taglist | |
nnoremap <F3> :TlistToggle <CR> | |
"for php | |
autocmd FileType php nmap <F9> :!php -f "%" <CR> | |
autocmd FileType php nmap <F8> :!phpunit "%" <CR> | |
"for bash | |
autocmd FileType sh nmap <F9> :!bash "%" <CR> | |
autocmd FileType javascript nmap <F9> :!node "%" <CR> | |
""""""""""""""" MiniBufExpl Colors | |
hi MBENormal guifg=#808080 guibg=fg | |
hi MBEChanged guifg=#CD5907 guibg=fg | |
hi MBEVisibleNormal guifg=#5DC2D6 guibg=fg | |
hi MBEVisibleChanged guifg=#F1266F guibg=fg | |
hi MBEVisibleActiveNormal guifg=#A6DB29 guibg=fg | |
hi MBEVisibleActiveChanged guifg=#F1266F guibg=fg | |
"""""""""""""""""""""""""""""""""""""""""""""" | |
"ex-acp | |
if !exists('g:AutoComplPop_Behavior') | |
let g:AutoComplPop_Behavior = {} | |
let g:AutoComplPop_Behavior['php'] = [] | |
call add(g:AutoComplPop_Behavior['php'], { | |
\ 'command' : "\\", | |
\ 'pattern' : printf('\(->\|::\|\$\)\k\{%d,}$', 0), | |
\ 'repeat' : 0, | |
\}) | |
endif | |
let g:AutoComplPop_Behavior = { | |
\ 'c': [ {'command' : "\\", | |
\ 'pattern' : ".", | |
\ 'repeat' : 0} | |
\ ] | |
\} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment