Created
February 22, 2017 07:18
-
-
Save appleshan/91affee1f40e714a8a150dfb4da6997f 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
""""""""""""""""""""""""""""""""""""""" | |
" IdeaVim | |
""""""""""""""""""""""""""""""""""""""" | |
""""""""""""""""""""""""""""""""""""""" | |
"Gerneral | |
""""""""""""""""""""""""""""""""""""""" | |
" Set to auto read when a file is changed from the outside | |
set autoread | |
" 禁用Vi的兼容模式 | |
set nocompatible | |
" 设定状态栏多显示信息 | |
set laststatus=2 | |
" 设置系统剪切板为默认剪切板 | |
" set clipboard+=unnamed | |
" 突出显示当前行 | |
set cursorline | |
" 在状态栏显示正在输入的命令 | |
set showcmd | |
" 在上下移动光标时,光标的上方或下方至少会保留显示的行数 | |
set scrolloff=3 | |
set showmode | |
set number | |
set history=100000 | |
set noerrorbells | |
set novisualbell | |
" 分割窗口时保持相等的宽/高 | |
set equalalways | |
" 设置编码 | |
set fileencodings=utf-8,gbk,ucs-bom,default,latin1 | |
set termencoding=utf-8 | |
set encoding=utf-8 | |
""""""""""""""""""""""""""""""""""""""" | |
"Colors and Fonts | |
""""""""""""""""""""""""""""""""""""""" | |
" syntax enable "Enable syntax hl | |
set ambiwidth=double " 设定某些标点符号为宽字符 | |
" 设定行首tab为灰色 | |
highlight LeaderTab guifg=#666666 | |
""""""""""""""""""""""""""""""""""""""" | |
"VIM user interface | |
""""""""""""""""""""""""""""""""""""""" | |
" 修改leader键 | |
let mapleader=' ' | |
" 设置文内智能搜索提示 | |
" 高亮search命中的文本 | |
set hlsearch | |
" 打开增量搜索模式,随着键入即时搜索 | |
set incsearch | |
" 搜索时忽略大小写 | |
set ignorecase | |
" 有一个或以上大写字母时仍大小写敏感 | |
set smartcase | |
" 去掉搜索高亮 | |
nnoremap <leader>/ :nohls<CR> | |
" clear the highlighted search result | |
nnoremap <Leader>sc :nohlsearch<CR> | |
" Quit normal mode | |
nnoremap <Leader>q :q<CR> | |
nnoremap <Leader>Q :qa!<CR> | |
" Move half page faster | |
nnoremap <Leader>d <C-d> | |
nnoremap <Leader>u <C-u> | |
" Move to the start of line | |
nnoremap H ^ | |
" Move to the end of line | |
nnoremap L $ | |
" Redo | |
nnoremap U <C-r> | |
" Yank to the end of line | |
nnoremap Y y$ | |
" Tab operation | |
nnoremap tn gt | |
nnoremap tp gT | |
" built in search looks better | |
nnoremap / :action Find<CR> | |
nnoremap <Leader>;; :action CommentByLineComment<CR> | |
nnoremap <Leader>bb :action ToggleLineBreakpoint<CR> | |
nnoremap <Leader>br :action ViewBreakpoints<CR> | |
nnoremap <Leader>cv :action ChangeView<CR> | |
nnoremap <Leader>dc :action ChooseDebugConfiguration<CR> | |
nnoremap <Leader>ga :action GotoAction<CR> | |
nnoremap <Leader>gc :action GotoClass<CR> | |
nnoremap <Leader>gd :action GotoDeclaration<CR> | |
nnoremap <Leader>gi :action GotoImplementation<CR> | |
nnoremap <Leader>gs :action GotoSuperMethod<CR> | |
nnoremap <Leader>gt :action GotoTest<CR> | |
nnoremap <Leader>fs :w<CR> | |
nnoremap <Leader>fp :action ShowFilePath<CR> | |
nnoremap <Leader>fu :action FindUsages<CR> | |
nnoremap <leader>fS :action FileStructurePopup<CR> | |
nnoremap <Leader>ic :action InspectCode<CR> | |
nnoremap <Leader>mv :action ActivateMavenProjectsToolWindow<CR> | |
nnoremap <Leader>oi :action OptimizeImports<CR> | |
nnoremap <Leader>rc :action ChooseRunConfiguration<CR> | |
nnoremap <Leader>re :action RenameElement<CR> | |
nnoremap <Leader>rf :action RenameFile<CR> | |
nnoremap <Leader>se :action SearchEverywhere<CR> | |
nnoremap <Leader>su :action ShowUsages<CR> | |
nnoremap <Leader>pm :action ShowPopupMenu<CR> | |
nnoremap <Leader>tc :action CloseActiveTab<CR> | |
nnoremap <leader>th :action TypeHierarchy<CR> | |
nnoremap <Leader>tl Vy<CR>:action ActivateTerminalToolWindow<CR> | |
vnoremap <Leader>tl y<CR>:action ActivateTerminalToolWindow<CR> | |
" Insert mode shortcut | |
inoremap <C-h> <Left> | |
inoremap <C-j> <Down> | |
inoremap <C-k> <Up> | |
inoremap <C-l> <Right> | |
inoremap <C-a> <Home> | |
inoremap <C-e> <End> | |
inoremap <C-d> <Delete> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tks ,it's very helpful to me .